Restrict UCF_UNIX_NAME_LOOKUP (symlink allowed) to restricted set of calls.
authorJeremy Allison <jra@samba.org>
Fri, 16 Dec 2011 19:26:41 +0000 (11:26 -0800)
committerJeremy Allison <jra@samba.org>
Fri, 16 Dec 2011 20:54:23 +0000 (21:54 +0100)
source3/smbd/trans2.c

index 4417cb27e72256eff7ff3cfabd9f7f6f15710103..ec9901b99e7a98f1ffa01842cdec6e8b846459b6 100644 (file)
@@ -8024,7 +8024,10 @@ static void call_trans2setfilepathinfo(connection_struct *conn,
                        return;
                }
 
-               if (INFO_LEVEL_IS_UNIX(info_level)) {
+               if (info_level == SMB_SET_FILE_UNIX_BASIC ||
+                               info_level == SMB_SET_FILE_UNIX_INFO2 ||
+                               info_level == SMB_FILE_RENAME_INFORMATION ||
+                               info_level == SMB_POSIX_PATH_UNLINK) {
                        ucf_flags |= UCF_UNIX_NAME_LOOKUP;
                }