Changeset 342 for branches/samba-3.3.x/source/smbd/reply.c
- Timestamp:
- Oct 30, 2009, 9:39:05 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.3.x/source/smbd/reply.c
r242 r342 958 958 } 959 959 960 if (!VALID_STAT(sbuf) && (SMB_VFS_STAT(conn,name,&sbuf) != 0)) { 961 DEBUG(3,("reply_checkpath: stat of %s failed (%s)\n",name,strerror(errno))); 962 status = map_nt_error_from_unix(errno); 963 goto path_err; 960 if (!VALID_STAT(sbuf)) { 961 int ret; 962 963 if (lp_posix_pathnames()) { 964 ret = SMB_VFS_LSTAT(conn,name,&sbuf); 965 } else { 966 ret = SMB_VFS_STAT(conn,name,&sbuf); 967 } 968 if (ret != 0) { 969 DEBUG(3,("reply_checkpath: stat of %s failed (%s)\n",name,strerror(errno))); 970 status = map_nt_error_from_unix(errno); 971 goto path_err; 972 } 964 973 } 965 974 … … 1068 1077 return; 1069 1078 } 1070 if (!VALID_STAT(sbuf) && (SMB_VFS_STAT(conn,fname,&sbuf) != 0)) { 1071 DEBUG(3,("reply_getatr: stat of %s failed (%s)\n",fname,strerror(errno))); 1072 reply_unixerror(req, ERRDOS,ERRbadfile); 1073 END_PROFILE(SMBgetatr); 1074 return; 1079 if (!VALID_STAT(sbuf)) { 1080 int ret; 1081 1082 if (lp_posix_pathnames()) { 1083 ret = SMB_VFS_LSTAT(conn,fname,&sbuf); 1084 } else { 1085 ret = SMB_VFS_STAT(conn,fname,&sbuf); 1086 } 1087 if (ret != 0) { 1088 DEBUG(3,("reply_getatr: stat of %s failed (%s)\n",fname,strerror(errno))); 1089 reply_unixerror(req, ERRDOS,ERRbadfile); 1090 END_PROFILE(SMBgetatr); 1091 return; 1092 } 1075 1093 } 1076 1094 … … 2302 2320 files_struct *fsp; 2303 2321 uint32 dirtype_orig = dirtype; 2322 bool posix_paths = lp_posix_pathnames(); 2323 int ret; 2304 2324 NTSTATUS status; 2305 2325 … … 2310 2330 } 2311 2331 2312 if (SMB_VFS_LSTAT(conn,fname,&sbuf) != 0) { 2332 if (posix_paths) { 2333 ret = SMB_VFS_LSTAT(conn,fname,&sbuf); 2334 } else { 2335 ret = SMB_VFS_STAT(conn,fname,&sbuf); 2336 } 2337 if (ret != 0) { 2313 2338 return map_nt_error_from_unix(errno); 2314 2339 } … … 2396 2421 FILE_OPEN, /* create_disposition*/ 2397 2422 FILE_NON_DIRECTORY_FILE, /* create_options */ 2398 FILE_ATTRIBUTE_NORMAL, /* file_attributes */ 2423 /* file_attributes */ 2424 posix_paths ? FILE_FLAG_POSIX_SEMANTICS|0777 : 2425 FILE_ATTRIBUTE_NORMAL, 2399 2426 0, /* oplock_request */ 2400 2427 0, /* allocation_size */
Note:
See TracChangeset
for help on using the changeset viewer.