summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2011-04-25 12:45:49 -0700
committerJeremy Allison <jra@samba.org>2011-04-25 23:35:37 +0200
commitd00f1febd50b4779e8c5588055ee1f601448550c (patch)
tree516b12b8b586cd812d3214a77082e765b4442565
parenteeb24c17739dd0bccf561b142841a7d2e560cdd0 (diff)
downloadsamba-d00f1febd50b4779e8c5588055ee1f601448550c.tar.gz
samba-d00f1febd50b4779e8c5588055ee1f601448550c.tar.bz2
samba-d00f1febd50b4779e8c5588055ee1f601448550c.zip
No longer need to call SMB_VFS_LSTAT - check name hasn't changed above is sufficient.
Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Mon Apr 25 23:35:37 CEST 2011 on sn-devel-104
-rw-r--r--source3/smbd/vfs.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c
index a714b86ef2..39b30ecc0d 100644
--- a/source3/smbd/vfs.c
+++ b/source3/smbd/vfs.c
@@ -1005,8 +1005,6 @@ NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
/* Extra checks if all symlinks are disallowed. */
if (!allow_symlinks) {
- struct smb_filename *smb_fname = NULL;
- NTSTATUS status;
/* fname can't have changed in resolved_path. */
const char *p = &resolved_name[rootdir_len];
@@ -1032,27 +1030,6 @@ NTSTATUS check_reduced_name(connection_struct *conn, const char *fname)
SAFE_FREE(resolved_name);
return NT_STATUS_ACCESS_DENIED;
}
-
- /* Check if we are allowing users to follow symlinks */
- /* Patch from David Clerc <David.Clerc@cui.unige.ch>
- University of Geneva */
- status = create_synthetic_smb_fname(talloc_tos(),
- fname, NULL,
- NULL, &smb_fname);
- if (!NT_STATUS_IS_OK(status)) {
- SAFE_FREE(resolved_name);
- return status;
- }
-
- if ( (SMB_VFS_LSTAT(conn, smb_fname) != -1) &&
- (S_ISLNK(smb_fname->st.st_ex_mode)) ) {
- SAFE_FREE(resolved_name);
- DEBUG(3,("check_reduced_name: denied: file path name "
- "%s is a symlink\n",resolved_name));
- TALLOC_FREE(smb_fname);
- return NT_STATUS_ACCESS_DENIED;
- }
- TALLOC_FREE(smb_fname);
}
}