1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

s3-pysmbd: Try opening as a file, then as a directory

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Aug  7 08:59:21 CEST 2012 on sn-devel-104
This commit is contained in:
Andrew Bartlett 2012-08-07 14:19:06 +10:00
parent e571d5c03e
commit f06c216d0b

View File

@ -129,9 +129,9 @@ static NTSTATUS set_nt_acl_no_snum(const char *fname,
flags = O_RDONLY;
#endif
fsp->fh->fd = SMB_VFS_OPEN(conn, smb_fname, fsp, flags, 00400);
fsp->fh->fd = SMB_VFS_OPEN(conn, smb_fname, fsp, O_RDWR, 00400);
if (fsp->fh->fd == -1 && errno == EISDIR) {
fsp->fh->fd = SMB_VFS_OPEN(conn, smb_fname, fsp, O_RDWR, 00400);
fsp->fh->fd = SMB_VFS_OPEN(conn, smb_fname, fsp, flags, 00400);
}
if (fsp->fh->fd == -1) {
printf("open: error=%d (%s)\n", errno, strerror(errno));