summaryrefslogtreecommitdiff
path: root/source3/smbd/trans2.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-02-05 15:20:18 -0800
committerJeremy Allison <jra@samba.org>2010-02-05 15:20:18 -0800
commitbd269443e311d96ef495a9db47d1b95eb83bb8f4 (patch)
tree5324577b3945cd4184da50e8b4f2ccc018a5621a /source3/smbd/trans2.c
parentabbd0f9195fe9b4feb29b86a04c88be001e2737a (diff)
downloadsamba-bd269443e311d96ef495a9db47d1b95eb83bb8f4.tar.gz
samba-bd269443e311d96ef495a9db47d1b95eb83bb8f4.tar.bz2
samba-bd269443e311d96ef495a9db47d1b95eb83bb8f4.zip
Fix bug 7104 - "wide links" and "unix extensions" are incompatible.
Change parameter "wide links" to default to "no". Ensure "wide links = no" if "unix extensions = yes" on a share. Fix man pages to refect this. Remove "within share" checks for a UNIX symlink set - even if widelinks = no. The server will not follow that link anyway. Correct DEBUG message in check_reduced_name() to add missing "\n" so it's really clear when a path is being denied as it's outside the enclosing share path. Jeremy.
Diffstat (limited to 'source3/smbd/trans2.c')
-rw-r--r--source3/smbd/trans2.c36
1 files changed, 0 insertions, 36 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index df61167354..28862d1f4e 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -5836,42 +5836,6 @@ static NTSTATUS smb_set_file_unix_link(connection_struct *conn,
return NT_STATUS_INVALID_PARAMETER;
}
- /* !widelinks forces the target path to be within the share. */
- /* This means we can interpret the target as a pathname. */
- if (!lp_widelinks(SNUM(conn))) {
- char *rel_name = NULL;
- char *last_dirp = NULL;
-
- if (*link_target == '/') {
- /* No absolute paths allowed. */
- return NT_STATUS_ACCESS_DENIED;
- }
- rel_name = talloc_strdup(ctx,newname);
- if (!rel_name) {
- return NT_STATUS_NO_MEMORY;
- }
- last_dirp = strrchr_m(rel_name, '/');
- if (last_dirp) {
- last_dirp[1] = '\0';
- } else {
- rel_name = talloc_strdup(ctx,"./");
- if (!rel_name) {
- return NT_STATUS_NO_MEMORY;
- }
- }
- rel_name = talloc_asprintf_append(rel_name,
- "%s",
- link_target);
- if (!rel_name) {
- return NT_STATUS_NO_MEMORY;
- }
-
- status = check_name(conn, rel_name);
- if (!NT_STATUS_IS_OK(status)) {
- return status;
- }
- }
-
DEBUG(10,("smb_set_file_unix_link: SMB_SET_FILE_UNIX_LINK doing symlink %s -> %s\n",
newname, link_target ));