summaryrefslogtreecommitdiffstats
path: root/source/param/loadparm.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/param/loadparm.c')
-rw-r--r--source/param/loadparm.c33
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);
+}