diff options
author | Jeremy Allison <jra@samba.org> | 1998-04-21 02:23:24 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 1998-04-21 02:23:24 +0000 |
commit | 2dee1ed38867504d067d593c62734ecff0eca77c (patch) | |
tree | bbcb60b9be39fc12a09f65b8d0735c3f93cf0d7c /source3 | |
parent | 2beb8f3cb5437cb2b214c9be0c919c1b3988a857 (diff) | |
download | samba-2dee1ed38867504d067d593c62734ecff0eca77c.tar.gz samba-2dee1ed38867504d067d593c62734ecff0eca77c.tar.bz2 samba-2dee1ed38867504d067d593c62734ecff0eca77c.zip |
clientgen.c: Added cli_ulogoff() call.
password.c: Added call to cli_ulogoff on successfull sessionsetup.
Jeremy.
(This used to be commit 77882f002b2a8203aad419e485fc885303d999a0)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/libsmb/clientgen.c | 19 | ||||
-rw-r--r-- | source3/smbd/password.c | 1 |
3 files changed, 21 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 433e833c31..da1293fa69 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -65,6 +65,7 @@ BOOL cli_session_setup(struct cli_state *cli, char *pass, int passlen, char *ntpass, int ntpasslen, char *workgroup); +BOOL cli_ulogoff(struct cli_state *cli); BOOL cli_send_tconX(struct cli_state *cli, char *share, char *dev, char *pass, int passlen); BOOL cli_tdis(struct cli_state *cli); diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c index 1f2f746576..ea51395a8f 100644 --- a/source3/libsmb/clientgen.c +++ b/source3/libsmb/clientgen.c @@ -528,6 +528,25 @@ BOOL cli_session_setup(struct cli_state *cli, return True; } +/**************************************************************************** + Send a uloggoff. +*****************************************************************************/ + +BOOL cli_ulogoff(struct cli_state *cli) +{ + bzero(cli->outbuf,smb_size); + set_message(cli->outbuf,2,0,True); + CVAL(cli->outbuf,smb_com) = SMBulogoffX; + cli_setup_packet(cli); + SSVAL(cli->outbuf,smb_vwv0,0xFF); + SSVAL(cli->outbuf,smb_vwv2,0); /* no additional info */ + + send_smb(cli->fd,cli->outbuf); + if (!client_receive_smb(cli->fd,cli->inbuf,cli->timeout)) + return False; + + return CVAL(cli->inbuf,smb_rcls) == 0; +} /**************************************************************************** send a tconX diff --git a/source3/smbd/password.c b/source3/smbd/password.c index fe3ac5c765..b4d728d0c2 100644 --- a/source3/smbd/password.c +++ b/source3/smbd/password.c @@ -1816,6 +1816,7 @@ BOOL server_validate(char *user, char *domain, DEBUG(3,("password server %s accepted the password\n", cli.desthost)); cli_tdis(&cli); + cli_ulogoff(&cli); return(True); } |