diff options
author | Gerald Carter <jerry@samba.org> | 2003-05-27 16:31:46 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-05-27 16:31:46 +0000 |
commit | 8056503e4c6de038a141d3faad9b765cb00e0e3a (patch) | |
tree | c3f8be3711ed96ca4deb2af08615993eb891bd41 /source3 | |
parent | 793ea7a428bdada47b70a8fae9f80bd92b96d56f (diff) | |
download | samba-8056503e4c6de038a141d3faad9b765cb00e0e3a.tar.gz samba-8056503e4c6de038a141d3faad9b765cb00e0e3a.tar.bz2 samba-8056503e4c6de038a141d3faad9b765cb00e0e3a.zip |
volker's add_signature() fix; must pass the beginning on the outbuf to get the flags field
(This used to be commit 81cccd25b84871d282815dfa378bd687c5c29cc1)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/sesssetup.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c index 44131b1752..64984d4809 100644 --- a/source3/smbd/sesssetup.c +++ b/source3/smbd/sesssetup.c @@ -57,9 +57,9 @@ static NTSTATUS do_map_to_guest(NTSTATUS status, auth_serversupplied_info **serv /**************************************************************************** Add the standard 'Samba' signature to the end of the session setup. ****************************************************************************/ -static int add_signature(char *outbuf) +static int add_signature(char *outbuf, char *p) { - char *p = outbuf; + char *start = p; fstring lanman; snprintf( lanman, sizeof(lanman), "Samba %s", VERSION ); @@ -68,7 +68,7 @@ static int add_signature(char *outbuf) p += srvstr_push(outbuf, p, lanman, -1, STR_TERMINATE); p += srvstr_push(outbuf, p, lp_workgroup(), -1, STR_TERMINATE); - return PTR_DIFF(p, outbuf); + return PTR_DIFF(p, start); } /**************************************************************************** @@ -91,7 +91,7 @@ static BOOL reply_sesssetup_blob(connection_struct *conn, char *outbuf, memcpy(p, blob.data, blob.length); p += blob.length; - p += add_signature( p ); + p += add_signature( outbuf, p ); set_message_end(outbuf,p); @@ -732,7 +732,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf, set_message(outbuf,3,0,True); if (Protocol >= PROTOCOL_NT1) { char *p = smb_buf( outbuf ); - p += add_signature( p ); + p += add_signature( outbuf, p ); set_message_end( outbuf, p ); /* perhaps grab OS version here?? */ } |