diff options
author | Jeremy Allison <jra@samba.org> | 2010-02-11 16:09:59 -0800 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2010-02-24 16:25:10 +0100 |
commit | 7cd8009598af1efa255418562f8b4f9bfdf6a9be (patch) | |
tree | 201307e2e3353a9f6ef596682bc84e8b8b2889e9 /source/param/loadparm.c | |
parent | a056ee7f4f1ecc4e54e3cda58df73e2ed66b41e7 (diff) | |
download | samba-7cd8009598af1efa255418562f8b4f9bfdf6a9be.tar.gz samba-7cd8009598af1efa255418562f8b4f9bfdf6a9be.tar.xz samba-7cd8009598af1efa255418562f8b4f9bfdf6a9be.zip |
Fixes issue with preexec scripts creating a share directory, and problems if a smb.conf reload turns wide links back on after a connection is establised.
Includes git refs :
cd18695fc2e4d09ab75e9eab2f0c43dcc15adf0b
94865e4dbd3d721c9855aada8c55e02be8b3881e
5d92d969dda450cc3564dd2265d2b042d832c542
02a5078f1fe6285e4a0b6ad95a3aea1c5bb3e8cf
a6f402ad87ff0ae14d57d97278d67d0ceaaa1d82
from master.
Jeremy.
Fix bug #7104 ("wide links" and "unix extensions" are incompatible.)
(cherry picked from commit ce04bf60499104c166657df959e4033573b5be5c)
Diffstat (limited to 'source/param/loadparm.c')
-rw-r--r-- | source/param/loadparm.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 6e8a5b7e6a1..ce1e6b639e0 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -5315,7 +5315,6 @@ FN_LOCAL_BOOL(lp_oplocks, bOpLocks) FN_LOCAL_BOOL(lp_level2_oplocks, bLevel2OpLocks) FN_LOCAL_BOOL(lp_onlyuser, bOnlyUser) FN_LOCAL_PARM_BOOL(lp_manglednames, bMangledNames) -FN_LOCAL_BOOL(lp_widelinks, bWidelinks) FN_LOCAL_BOOL(lp_symlinks, bSymlinks) FN_LOCAL_BOOL(lp_syncalways, bSyncAlways) FN_LOCAL_BOOL(lp_strict_allocate, bStrictAllocate) @@ -9563,3 +9562,35 @@ const char *lp_socket_address(void) } return Globals.szSocketAddress; } + +/******************************************************************* + Safe wide links checks. + This helper function always verify the validity of wide links, + even after a configuration file reload. +********************************************************************/ + +static bool lp_widelinks_internal(int snum) +{ + return (bool)(LP_SNUM_OK(snum)? ServicePtrs[(snum)]->bWidelinks : + sDefault.bWidelinks); +} + +void widelinks_warning(int snum) +{ + if (lp_unix_extensions() && lp_widelinks_internal(snum)) { + DEBUG(0,("Share '%s' has wide links and unix extensions enabled. " + "These parameters are incompatible. " + "Wide links will be disabled for this share.\n", + lp_servicename(snum) )); + } +} + +bool lp_widelinks(int snum) +{ + /* wide links is always incompatible with unix extensions */ + if (lp_unix_extensions()) { + return false; + } + + return lp_widelinks_internal(snum); +} |