Changeset 751 for trunk/server/source3/smbd/filename.c
- Timestamp:
- Nov 29, 2012, 1:59:04 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/server/source3/smbd/filename.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/source3/smbd/filename.c
r745 r751 384 384 if((!conn->case_sensitive || !(conn->fs_capabilities & 385 385 FILE_CASE_SENSITIVE_SEARCH)) && 386 stat_cache_lookup(conn, &smb_fname->base_name, &dirpath, &start,386 stat_cache_lookup(conn, &smb_fname->base_name, &dirpath, &start, 387 387 &smb_fname->st)) { 388 388 goto done; … … 978 978 979 979 /**************************************************************************** 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 980 997 Check a filename - possibly calling check_reduced_name. 981 998 This is called by every routine before it allows an operation on a filename. … … 986 1003 NTSTATUS check_name(connection_struct *conn, const char *name) 987 1004 { 988 if (IS_VETO_PATH(conn, name)) { 989 /* Is it not dot or dot dot. */ 990 if (!((name[0] == '.') && (!name[1] || 991 (name[1] == '.' && !name[2])))) { 992 DEBUG(5,("check_name: file path name %s vetoed\n", 993 name)); 994 return map_nt_error_from_unix(ENOENT); 995 } 1005 NTSTATUS status = check_veto_path(conn, name); 1006 1007 if (!NT_STATUS_IS_OK(status)) { 1008 return status; 996 1009 } 997 1010 998 1011 if (!lp_widelinks(SNUM(conn)) || !lp_symlinks(SNUM(conn))) { 999 NTSTATUSstatus = check_reduced_name(conn,name);1012 status = check_reduced_name(conn,name); 1000 1013 if (!NT_STATUS_IS_OK(status)) { 1001 1014 DEBUG(5,("check_name: name %s failed with %s\n",name, … … 1171 1184 { 1172 1185 NTSTATUS status; 1173 unsigned int i, num_streams ;1186 unsigned int i, num_streams; 1174 1187 struct stream_struct *streams = NULL; 1175 1188 … … 1186 1199 1187 1200 /* Fall back to a case-insensitive scan of all streams on the file. */ 1188 status = SMB_VFS_STREAMINFO(conn, NULL, smb_fname->base_name, mem_ctx,1189 &num_streams, &streams);1201 status = (conn, NULL, smb_fname->base_name, mem_ctx, 1202 &num_streams, &streams); 1190 1203 1191 1204 if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) { … … 1315 1328 } 1316 1329 1330 1331 1332 1333 1334 1335 1317 1336 status = check_name(conn, (*pp_smb_fname)->base_name); 1318 1337 if (!NT_STATUS_IS_OK(status)) {
Note:
See TracChangeset
for help on using the changeset viewer.
