diff options
author | Jeremy Allison <jra@samba.org> | 2001-11-28 04:47:46 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-11-28 04:47:46 +0000 |
commit | 1a50b36d978416e7c08423296db351e434bdea50 (patch) | |
tree | d56716d4e3ef0702d7797f0ce5a6383244200062 /source3/smbd | |
parent | 241b1b9aa67fe4d6bdc5583f80b21d9c163ee252 (diff) | |
download | samba-1a50b36d978416e7c08423296db351e434bdea50.tar.gz samba-1a50b36d978416e7c08423296db351e434bdea50.tar.bz2 samba-1a50b36d978416e7c08423296db351e434bdea50.zip |
Re-added "Share modes" meaning don't allow deny mode conflict. Due to
user demand (don't talk to me about removing parameters.... :-).
Jeremy.
(This used to be commit b69127391b322d81cc648f73a601ed61e79c8a44)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/open.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index 67be12626b..487a8a71a8 100644 --- a/source3/smbd/open.c +++ b/source3/smbd/open.c @@ -352,7 +352,7 @@ static int access_table(int new_deny,int old_deny,int old_mode, check if we can open a file with a share mode ****************************************************************************/ -static int check_share_mode( share_mode_entry *share, int share_mode, +static BOOL check_share_mode(connection_struct *conn, share_mode_entry *share, int share_mode, const char *fname, BOOL fcbopen, int *flags) { int deny_mode = GET_DENY_MODE(share_mode); @@ -360,6 +360,14 @@ static int check_share_mode( share_mode_entry *share, int share_mode, int old_deny_mode = GET_DENY_MODE(share->share_mode); /* + * share modes = false means don't bother to check for + * DENY mode conflict. This is a *really* bad idea :-). JRA. + */ + + if(!lp_share_modes(SNUM(conn))) + return True; + + /* * Don't allow any opens once the delete on close flag has been * set. */ @@ -514,7 +522,7 @@ dev = %x, inode = %.0f\n", old_shares[i].op_type, fname, (unsigned int)dev, (dou /* someone else has a share lock on it, check to see if we can too */ - if(check_share_mode(share_entry, share_mode, fname, fcbopen, p_flags) == False) { + if(check_share_mode(conn, share_entry, share_mode, fname, fcbopen, p_flags) == False) { SAFE_FREE(old_shares); errno = EACCES; return -1; |