[Samba] disabling version number

Florian Effenberger floeff at arcor.de
Mon Apr 14 15:14:50 GMT 2003


Hi Jerry,

thanks for the reply, that's exactly what I meant. :-)

I know security by obscurity isn't good, but may I suggest a new option in
the smb.conf file, something like

version_string = "Samba %s"?

Thanks,
Florian

----- Original Message -----
From: "Gerald (Jerry) Carter" <jerry at samba.org>
To: "Florian Effenberger" <floeff at arcor.de>
Cc: <samba at lists.samba.org>
Sent: Monday, April 14, 2003 3:33 PM
Subject: Re: [Samba] disabling version number


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, 13 Apr 2003, Florian Effenberger wrote:

> Hi there,
>
> is there any possibility of disabling Samba's version number output (e.g.
> with smbclient) without having to manually edit it in the source code?
>
> I don't want anyone to see my Samba's version number...

You mean here?

  $ smbclient -L shaggy -N
  Anonymous login successful
  Domain=[VALE] OS=[Unix] Server=[Samba 2.2.8]
                                  ^^^^^^^^^^^

You'll have to patch the code.  See smbd/reply.c:
reply_sesssetup_and_X() (line 1090)

  /* it's ok - setup a reply */
  if (Protocol < PROTOCOL_NT1) {
    set_message(outbuf,3,0,True);
  } else {
    char *p;
    set_message(outbuf,3,3,True);
    p = smb_buf(outbuf);
    pstrcpy(p,"Unix"); p = skip_string(p,1);
- ->  pstrcpy(p,"Samba "); pstrcat(p,VERSION); p = skip_string(p,1);
    pstrcpy(p,global_myworkgroup); unix_to_dos(p); p = skip_string(p,1);
    set_message(outbuf,3,PTR_DIFF(p,smb_buf(outbuf)),False);
    /* perhaps grab OS version here?? */
  }





cheers, jerry
 ----------------------------------------------------------------------
 Hewlett-Packard            ------------------------- http://www.hp.com
 SAMBA Team                 ---------------------- http://www.samba.org
 GnuPG Key                  ---- http://www.plainjoe.org/gpg_public.asc
 "You can never go home again, Oatman, but I guess you can shop there."
                            --John Cusack - "Grosse Point Blank" (1997)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE+mrjBIR7qMdg1EfYRAubWAJ9MjEDyYQ80+9r3tUTidzATgIng3gCdEDbj
JddnXyvvm4+At0hfNrXhRKs=
=ra7j
-----END PGP SIGNATURE-----



More information about the samba mailing list