summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-09-13 16:42:09 -0700
committerJeremy Allison <jra@samba.org>2011-09-14 03:55:45 +0200
commitfbbfdbd64818252784e9ba2ab87af3a02bacde22 (patch)
treec1bc314c351dfe6bbfdfb4b7b27712e271430cb7 /source3
parent84a4289b5236e38ab0afc6ef3c784d202c6b3c2c (diff)
downloadsamba-fbbfdbd64818252784e9ba2ab87af3a02bacde22.tar.gz
samba-fbbfdbd64818252784e9ba2ab87af3a02bacde22.tar.bz2
samba-fbbfdbd64818252784e9ba2ab87af3a02bacde22.zip
Fix bug #8229 - git patch attached against 3.6.0-rc2 to fix 'widelinks' regression intro'd in 3.2
Add "allow insecure widelinks" to re-enable the ability (requested by some sites) to have "widelinks = yes" and "unix extensions = yes". Based on an original patch by Linda Walsh <samba@tlinx.org> Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Wed Sep 14 03:55:45 CEST 2011 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r--source3/include/proto.h1
-rw-r--r--source3/param/loadparm.c22
2 files changed, 22 insertions, 1 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 47321f3aa4..d3ea6fc883 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -1473,6 +1473,7 @@ bool lp_oplocks(int );
bool lp_level2_oplocks(int );
bool lp_onlyuser(int );
bool lp_manglednames(const struct share_params *p );
+bool lp_allow_insecure_widelinks(void);
bool lp_widelinks(int );
bool lp_symlinks(int );
bool lp_syncalways(int );
diff --git a/source3/param/loadparm.c b/source3/param/loadparm.c
index 3b5c4df35d..01f6fa2942 100644
--- a/source3/param/loadparm.c
+++ b/source3/param/loadparm.c
@@ -3900,6 +3900,15 @@ static struct parm_struct parm_table[] = {
.flags = FLAG_ADVANCED | FLAG_SHARE,
},
{
+ .label = "allow insecure wide links",
+ .type = P_BOOL,
+ .p_class = P_GLOBAL,
+ .offset = GLOBAL_VAR(bAllowInsecureWidelinks),
+ .special = NULL,
+ .enum_list = NULL,
+ .flags = FLAG_ADVANCED,
+ },
+ {
.label = "wide links",
.type = P_BOOL,
.p_class = P_LOCAL,
@@ -5390,6 +5399,7 @@ FN_GLOBAL_INTEGER(lp_ctdb_timeout, ctdb_timeout)
FN_GLOBAL_INTEGER(lp_ctdb_locktime_warn_threshold, ctdb_locktime_warn_threshold)
FN_GLOBAL_BOOL(lp_async_smb_echo_handler, bAsyncSMBEchoHandler)
FN_GLOBAL_BOOL(lp_multicast_dns_register, bMulticastDnsRegister)
+FN_GLOBAL_BOOL(lp_allow_insecure_widelinks, bAllowInsecureWidelinks)
FN_GLOBAL_INTEGER(lp_winbind_cache_time, winbind_cache_time)
FN_GLOBAL_INTEGER(lp_winbind_reconnect_delay, winbind_reconnect_delay)
FN_GLOBAL_INTEGER(lp_winbind_max_clients, winbind_max_clients)
@@ -9637,6 +9647,10 @@ static bool lp_widelinks_internal(int snum)
void widelinks_warning(int snum)
{
+ if (lp_allow_insecure_widelinks()) {
+ return;
+ }
+
if (lp_unix_extensions() && lp_widelinks_internal(snum)) {
DEBUG(0,("Share '%s' has wide links and unix extensions enabled. "
"These parameters are incompatible. "
@@ -9649,7 +9663,13 @@ bool lp_widelinks(int snum)
{
/* wide links is always incompatible with unix extensions */
if (lp_unix_extensions()) {
- return false;
+ /*
+ * Unless we have "allow insecure widelinks"
+ * turned on.
+ */
+ if (!lp_allow_insecure_widelinks()) {
+ return false;
+ }
}
return lp_widelinks_internal(snum);