diff options
author | Jeremy Allison <jra@samba.org> | 2004-11-30 00:22:04 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 10:53:27 -0500 |
commit | 46f546571bc2429c4ee6ef86866520c4b5d4bcc7 (patch) | |
tree | 2bd319bd5210f140a84b975f7d2e8b25d0bb04fa /source3/smbd/open.c | |
parent | b9fcb5b961fc4165899487c7cb368ab2d8d15e8a (diff) | |
download | samba-46f546571bc2429c4ee6ef86866520c4b5d4bcc7.tar.gz samba-46f546571bc2429c4ee6ef86866520c4b5d4bcc7.tar.bz2 samba-46f546571bc2429c4ee6ef86866520c4b5d4bcc7.zip |
r4007: Fix bug #2088 - ensure inherit permissions is only applied on a new file,
not an existing one.
Jeremy.
(This used to be commit fbbdb72cf1adfe567112556626f26b031747f440)
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r-- | source3/smbd/open.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 1b5ba1228f..7cadf5adba 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -979,7 +979,7 @@ files_struct *open_file_shared1(connection_struct *conn,char *fname, SMB_STRUCT_ struct pending_message_list *pml = NULL; uint16 mid = get_current_mid(); /* We add aARCH to this as this mode is only used if the file is created new. */ - mode_t mode = unix_mode(conn,new_dos_mode | aARCH,fname); + mode_t mode = unix_mode(conn,new_dos_mode | aARCH,fname, True); if (oplock_request == INTERNAL_OPEN_ONLY) { internal_only_open = True; @@ -1440,7 +1440,7 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n", if (action == FILE_WAS_OVERWRITTEN || action == FILE_WAS_CREATED) { /* Files should be initially set as archive */ if (lp_map_archive(SNUM(conn)) || lp_store_dos_attributes(SNUM(conn))) { - file_set_dosmode(conn, fname, new_dos_mode | aARCH, NULL); + file_set_dosmode(conn, fname, new_dos_mode | aARCH, NULL, True); } } @@ -1601,7 +1601,7 @@ files_struct *open_directory(connection_struct *conn, char *fname, SMB_STRUCT_ST return NULL; } - if(vfs_MkDir(conn,fname, unix_mode(conn,aDIR, fname)) < 0) { + if(vfs_MkDir(conn,fname, unix_mode(conn,aDIR, fname, True)) < 0) { DEBUG(2,("open_directory: unable to create %s. Error was %s\n", fname, strerror(errno) )); file_free(fsp); |