#include "lib/afs/afs_funcs.h"
#include "lib/util_path.h"
-static bool canonicalize_connect_path(connection_struct *conn)
+bool canonicalize_connect_path(connection_struct *conn)
{
bool ret;
struct smb_filename con_fname = { .base_name = conn->connectpath };
conn->connectpath,
NULL,
NULL,
+ 0,
0);
if (conn->cwd_fsp->fsp_name == NULL) {
return false;
uid_t effuid;
gid_t effgid;
NTSTATUS status;
+ bool ok;
fstrcpy(dev, pdev);
/* ROOT Activites: */
/*
- * If widelinks are disallowed we need to canonicalise the connect
+ * Canonicalise the connect
* path here to ensure we don't have any symlinks in the
* connectpath. We will be checking all paths on this connection are
* 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 (!canonicalize_connect_path(conn)) {
- DBG_ERR("canonicalize_connect_path failed "
- "for service %s, path %s\n",
- lp_const_servicename(snum),
- conn->connectpath);
- status = NT_STATUS_BAD_NETWORK_NAME;
- goto err_root_exit;
- }
+ ok = canonicalize_connect_path(conn);
+ if (!ok) {
+ DBG_ERR("canonicalize_connect_path failed "
+ "for service %s, path %s\n",
+ lp_const_servicename(snum),
+ conn->connectpath);
+ status = NT_STATUS_BAD_NETWORK_NAME;
+ goto err_root_exit;
}
/* Add veto/hide lists */
conn->connectpath,
NULL,
NULL,
+ 0,
0);
if (smb_fname_cpath == NULL) {
status = NT_STATUS_NO_MEMORY;