diff options
author | Jeremy Allison <jra@samba.org> | 2013-05-06 14:10:15 -0700 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2013-05-06 23:37:20 +0200 |
commit | d25ba3f5a6266c2787ab2cc6b17e0d3cde2e33a9 (patch) | |
tree | d4c4c18718222ec968dc07b7fd38aad0c2b59c2b /source3 | |
parent | 9f36d0c447b2107798e560ce257026318952c5e2 (diff) | |
download | samba-d25ba3f5a6266c2787ab2cc6b17e0d3cde2e33a9.tar.gz samba-d25ba3f5a6266c2787ab2cc6b17e0d3cde2e33a9.tar.bz2 samba-d25ba3f5a6266c2787ab2cc6b17e0d3cde2e33a9.zip |
Allow "store dos attributes" to override the other "map XXX" parameters.
Makes us consistent with what is described in the man pages.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/dosmode.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c index b5346261ce..04d27c7a2e 100644 --- a/source3/smbd/dosmode.c +++ b/source3/smbd/dosmode.c @@ -354,10 +354,6 @@ static bool set_ea_dos_attribute(connection_struct *conn, enum ndr_err_code ndr_err; DATA_BLOB blob; - if (!lp_store_dos_attributes(SNUM(conn))) { - return False; - } - ZERO_STRUCT(dosattrib); ZERO_STRUCT(blob); @@ -773,7 +769,14 @@ int file_set_dosmode(connection_struct *conn, struct smb_filename *smb_fname, } #endif /* Store the DOS attributes in an EA by preference. */ - if (set_ea_dos_attribute(conn, smb_fname, dosmode)) { + if (lp_store_dos_attributes(SNUM(conn))) { + /* + * Don't fall back to using UNIX modes. Finally + * follow the smb.conf manpage. + */ + if (!set_ea_dos_attribute(conn, smb_fname, dosmode)) { + return -1; + } if (!newfile) { notify_fname(conn, NOTIFY_ACTION_MODIFIED, FILE_NOTIFY_CHANGE_ATTRIBUTES, |