mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
trans2.h: Added Thursby MAC extension.
smbd/trans2.c: Added Thursby MAX extension. libsmb/clientgen.c: Fixed smbtorture lock code. Jeremy.
This commit is contained in:
parent
fa86770d56
commit
514e52e4b4
@ -231,6 +231,12 @@ Byte offset Type name description
|
||||
#define SMB_SET_FILE_ALLOCATION_INFO 0x103
|
||||
#define SMB_SET_FILE_END_OF_FILE_INFO 0x104
|
||||
|
||||
/*
|
||||
* Thursby MAC extensions....
|
||||
*/
|
||||
|
||||
#define SMB_MAC_QUERY_FS_INFO 0x301
|
||||
|
||||
#define DIRLEN_GUESS (45+MAX(l1_achName,l2_achName))
|
||||
|
||||
#endif
|
||||
|
@ -1126,6 +1126,7 @@ BOOL cli_close(struct cli_state *cli, int fnum)
|
||||
BOOL cli_lock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int timeout)
|
||||
{
|
||||
char *p;
|
||||
int saved_timeout = cli->timeout;
|
||||
|
||||
bzero(cli->outbuf,smb_size);
|
||||
bzero(cli->inbuf,smb_size);
|
||||
@ -1149,10 +1150,16 @@ BOOL cli_lock(struct cli_state *cli, int fnum, uint32 offset, uint32 len, int ti
|
||||
SIVAL(p, 6, len);
|
||||
|
||||
send_smb(cli->fd,cli->outbuf);
|
||||
|
||||
cli->timeout = (timeout == -1) ? 0x7FFFFFFF : timeout;
|
||||
|
||||
if (!client_receive_smb(cli->fd,cli->inbuf,cli->timeout)) {
|
||||
cli->timeout = saved_timeout;
|
||||
return False;
|
||||
}
|
||||
|
||||
cli->timeout = saved_timeout;
|
||||
|
||||
if (CVAL(cli->inbuf,smb_rcls) != 0) {
|
||||
return False;
|
||||
}
|
||||
@ -1315,6 +1322,7 @@ static void cli_issue_write(struct cli_state *cli, int fnum, off_t offset, uint1
|
||||
|
||||
CVAL(cli->outbuf,smb_vwv0) = 0xFF;
|
||||
SSVAL(cli->outbuf,smb_vwv2,fnum);
|
||||
|
||||
SIVAL(cli->outbuf,smb_vwv3,offset);
|
||||
SIVAL(cli->outbuf,smb_vwv5,IS_BITS_SET_ALL(mode, 0x0008) ? 0xFFFFFFFF : 0);
|
||||
SSVAL(cli->outbuf,smb_vwv7,mode);
|
||||
|
@ -1170,6 +1170,13 @@ static int call_trans2qfsinfo(connection_struct *conn,
|
||||
SIVAL(pdata,0,0); /* dev type */
|
||||
SIVAL(pdata,4,0); /* characteristics */
|
||||
break;
|
||||
case SMB_MAC_QUERY_FS_INFO:
|
||||
/*
|
||||
* Thursby MAC extension...
|
||||
*/
|
||||
data_len = 88;
|
||||
SIVAL(pdata,84,0x100); /* Don't support mac... */
|
||||
break;
|
||||
default:
|
||||
return(ERROR(ERRDOS,ERRunknownlevel));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user