From a6f402ad87ff0ae14d57d97278d67d0ceaaa1d82 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 11 Feb 2010 15:16:23 -0800 Subject: Remove lp_safe_widelinks() -> convert to just lp_widelinks. Suggestion from Volker. Create widelinks_warning(int snum) to cover the message needed in make_connection. Jeremy. --- source3/param/loadparm.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'source3/param') diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c index 4b6fa83b04..579f847b97 100644 --- a/source3/param/loadparm.c +++ b/source3/param/loadparm.c @@ -5676,7 +5676,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) @@ -9898,12 +9897,28 @@ void lp_set_passdb_backend(const char *backend) even after a configuration file reload. ********************************************************************/ -bool lp_safe_widelinks(int snum) +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(snum); + return lp_widelinks_internal(snum); } -- cgit