int lp_min_receive_file_size(void);
char* lp_perfcount_module(void);
void lp_set_passdb_backend(const char *backend);
+bool lp_safe_widelinks(int snum);
/* The following definitions come from param/util.c */
{
string_set(&Globals.szPassdbBackend, backend);
}
+
+/*******************************************************************
+ Safe wide links checks.
+ This helper function always verify the validity of wide links,
+ even after a configuration file reload.
+********************************************************************/
+
+bool lp_safe_widelinks(int snum)
+{
+ /* wide links is always incompatible with unix extensions */
+ if (lp_unix_extensions()) {
+ return false;
+ }
+
+ return lp_widelinks(snum);
+}
}
}
- if (!lp_widelinks(SNUM(conn)) || !lp_symlinks(SNUM(conn))) {
+ if (!lp_safe_widelinks(SNUM(conn)) || !lp_symlinks(SNUM(conn))) {
NTSTATUS status = check_reduced_name(conn,name);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(5,("check_name: name %s failed with %s\n",name,
}
/* ROOT Activities: */
+ /* explicitly check with lp_widelinks() instead of using
+ * lp_safe_widelinks() here so that we can correctly warn
+ * in the logs. */
if (lp_unix_extensions() && lp_widelinks(snum)) {
DEBUG(0,("Share '%s' has wide links and unix extensions enabled. "
"These parameters are incompatible. "
- "Disabling wide links for this share.\n",
+ "Wide links will be disabled for this share.\n",
lp_servicename(snum) ));
- lp_do_parameter(snum, "wide links", "False");
}
/*
* below this directory. We must do this after the VFS init as we
* depend on the realpath() pointer in the vfs table. JRA.
*/
- if (!lp_widelinks(snum)) {
+ if (!lp_safe_widelinks(snum)) {
if (!canonicalize_connect_path(conn)) {
DEBUG(0, ("canonicalize_connect_path failed "
"for service %s, path %s\n",
}
/* Check for widelinks allowed. */
- if (!lp_widelinks(SNUM(conn))) {
+ if (!lp_safe_widelinks(SNUM(conn))) {
const char *conn_rootdir;
conn_rootdir = SMB_VFS_CONNECTPATH(conn, fname);