Create widelinks_warning(int snum) to cover the message needed in make_connection.
Jeremy.
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);
+void widelinks_warning(int snum);
/* The following definitions come from param/util.c */
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)
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);
}
}
}
- if (!lp_safe_widelinks(SNUM(conn)) || !lp_symlinks(SNUM(conn))) {
+ if (!lp_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,
conn);
}
-/* ROOT Activities: */
- /* explicitly check with lp_widelinks() instead of using
- * lp_safe_widelinks() here so that we can correctly warn
+/* ROOT Activities: */
+ /* explicitly check widelinks here so that we can correctly warn
* in the logs. */
+ widelinks_warning(snum);
+
if (lp_unix_extensions() && lp_widelinks(snum)) {
DEBUG(0,("Share '%s' has wide links and unix extensions enabled. "
"These parameters are incompatible. "
* 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_safe_widelinks(snum)) {
+ if (!lp_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_safe_widelinks(SNUM(conn))) {
+ if (!lp_widelinks(SNUM(conn))) {
const char *conn_rootdir;
conn_rootdir = SMB_VFS_CONNECTPATH(conn, fname);