mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
Mask off the aDIR on setfileinfo.
Jeremy. (This used to be commit d9cb1bf20ac8a739102b03d9a70e34fe5cb2f0f7)
This commit is contained in:
parent
308b222ffd
commit
5d1db25abd
@ -195,6 +195,8 @@ int file_chmod(connection_struct *conn,char *fname,int dosmode,SMB_STRUCT_STAT *
|
||||
|
||||
if (S_ISDIR(st->st_mode))
|
||||
dosmode |= aDIR;
|
||||
else
|
||||
dosmode &= ~aDIR;
|
||||
|
||||
if (dos_mode(conn,fname,st) == dosmode)
|
||||
return(0);
|
||||
|
@ -517,6 +517,9 @@ int reply_setatr(connection_struct *conn, char *inbuf,char *outbuf, int dum_size
|
||||
|
||||
if (VALID_STAT_OF_DIR(sbuf))
|
||||
mode |= aDIR;
|
||||
else
|
||||
mode &= ~aDIR;
|
||||
|
||||
if (check_name(fname,conn))
|
||||
ok = (file_chmod(conn,fname,mode,NULL) == 0);
|
||||
if (ok)
|
||||
|
@ -2225,6 +2225,11 @@ static int call_trans2setfilepathinfo(connection_struct *conn,
|
||||
DEBUG(6,("size: %.0f ", (double)size));
|
||||
DEBUG(6,("mode: %x\n" , mode));
|
||||
|
||||
if (S_ISDIR(sbuf.st_mode))
|
||||
mode |= aDIR;
|
||||
else
|
||||
mode &= ~aDIR;
|
||||
|
||||
if(!((info_level == SMB_SET_FILE_END_OF_FILE_INFO) ||
|
||||
(info_level == SMB_SET_FILE_ALLOCATION_INFO) ||
|
||||
(info_level == SMB_FILE_ALLOCATION_INFORMATION) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user