summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/vfs.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index c3c7b1a66b..3b482e7f0c 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -975,26 +975,26 @@ NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
/* Check for widelinks allowed. */
if (!lp_widelinks(SNUM(conn))) {
- const char *conn_rootdir;
-
- conn_rootdir = SMB_VFS_CONNECTPATH(conn, fname);
- if (conn_rootdir == NULL) {
- DEBUG(2, ("check_reduced_name: Could not get "
- "conn_rootdir\n"));
- SAFE_FREE(resolved_name);
- return NT_STATUS_ACCESS_DENIED;
- }
+ const char *conn_rootdir;
+
+ conn_rootdir = SMB_VFS_CONNECTPATH(conn, fname);
+ if (conn_rootdir == NULL) {
+ DEBUG(2, ("check_reduced_name: Could not get "
+ "conn_rootdir\n"));
+ SAFE_FREE(resolved_name);
+ return NT_STATUS_ACCESS_DENIED;
+ }
- if (strncmp(conn_rootdir, resolved_name,
+ if (strncmp(conn_rootdir, resolved_name,
strlen(conn_rootdir)) != 0) {
- DEBUG(2, ("check_reduced_name: Bad access "
- "attempt: %s is a symlink outside the "
- "share path\n", fname));
- DEBUGADD(2, ("conn_rootdir =%s\n", conn_rootdir));
- DEBUGADD(2, ("resolved_name=%s\n", resolved_name));
- SAFE_FREE(resolved_name);
- return NT_STATUS_ACCESS_DENIED;
- }
+ DEBUG(2, ("check_reduced_name: Bad access "
+ "attempt: %s is a symlink outside the "
+ "share path\n", fname));
+ DEBUGADD(2, ("conn_rootdir =%s\n", conn_rootdir));
+ DEBUGADD(2, ("resolved_name=%s\n", resolved_name));
+ SAFE_FREE(resolved_name);
+ return NT_STATUS_ACCESS_DENIED;
+ }
}
/* Check if we are allowing users to follow symlinks */