diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-08-07 14:19:06 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-08-07 08:59:21 +0200 |
commit | f06c216d0b3ffd036ac10f9abe9b2fe3ff319f09 (patch) | |
tree | 97a023c395c79b818c52075ec24cf9bd2e8f941e | |
parent | e571d5c03ef416bc7f6a1eb66567ec2715da9d21 (diff) | |
download | samba-f06c216d0b3ffd036ac10f9abe9b2fe3ff319f09.tar.gz samba-f06c216d0b3ffd036ac10f9abe9b2fe3ff319f09.tar.bz2 samba-f06c216d0b3ffd036ac10f9abe9b2fe3ff319f09.zip |
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
-rw-r--r-- | source3/smbd/pysmbd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/smbd/pysmbd.c b/source3/smbd/pysmbd.c index 8a5bde1090..6bef8af66d 100644 --- a/source3/smbd/pysmbd.c +++ b/source3/smbd/pysmbd.c @@ -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)); |