mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
clientgen.c: Added cli_ulogoff() call.
password.c: Added call to cli_ulogoff on successfull sessionsetup. Jeremy.
This commit is contained in:
parent
093d060a06
commit
77882f002b
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user