Changeset 124 for branches/samba-3.0/source/smbd/trans2.c
- Timestamp:
- Mar 12, 2008, 9:08:18 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/samba-3.0/source/smbd/trans2.c
r105 r124 2234 2234 } 2235 2235 2236 static void samba_extended_info_version(struct smb_extended_info *extended_info) 2237 { 2238 SMB_ASSERT(extended_info != NULL); 2239 2240 extended_info->samba_magic = SAMBA_EXTENDED_INFO_MAGIC; 2241 extended_info->samba_version = ((SAMBA_VERSION_MAJOR & 0xff) << 24) 2242 | ((SAMBA_VERSION_MINOR & 0xff) << 16) 2243 | ((SAMBA_VERSION_RELEASE & 0xff) << 8); 2244 #ifdef SAMBA_VERSION_REVISION 2245 extended_info->samba_version |= (tolower(*SAMBA_VERSION_REVISION) - 'a' + 1) & 0xff; 2246 #endif 2247 extended_info->samba_subversion = 0; 2248 #ifdef SAMBA_VERSION_RC_RELEASE 2249 extended_info->samba_subversion |= (SAMBA_VERSION_RC_RELEASE & 0xff) << 24; 2250 #else 2251 #ifdef SAMBA_VERSION_PRE_RELEASE 2252 extended_info->samba_subversion |= (SAMBA_VERSION_PRE_RELEASE & 0xff) << 16; 2253 #endif 2254 #endif 2255 #ifdef SAMBA_VERSION_VENDOR_PATCH 2256 extended_info->samba_subversion |= (SAMBA_VERSION_VENDOR_PATCH & 0xffff); 2257 #endif 2258 extended_info->samba_subversion = 0; 2259 #ifdef SAMBA_VERSION_GIT_COMMIT_TIME 2260 unix_to_nt_time(&extended_info->samba_gitcommitdate, SAMBA_VERSION_GIT_COMMIT_TIME); 2261 #endif 2262 2263 memset(extended_info->samba_version_string, 0, 2264 sizeof(extended_info->samba_version_string)); 2265 2266 snprintf (extended_info->samba_version_string, 2267 sizeof(extended_info->samba_version_string), 2268 "%s", samba_version_string()); 2269 } 2270 2236 2271 /**************************************************************************** 2237 2272 Reply to a TRANS2_QFSINFO (query filesystem info). … … 2341 2376 SIVAL(pdata,0,FILE_CASE_PRESERVED_NAMES|FILE_CASE_SENSITIVE_SEARCH| 2342 2377 (lp_nt_acl_support(SNUM(conn)) ? FILE_PERSISTENT_ACLS : 0)| 2378 FILE_UNICODE_ON_DISK| 2343 2379 quota_flag); /* FS ATTRIBUTES */ 2344 2380 … … 2522 2558 #endif /* HAVE_SYS_QUOTAS */ 2523 2559 case SMB_FS_OBJECTID_INFORMATION: 2560 { 2561 /* 2562 * No object id, but we transmit version information. 2563 */ 2564 struct smb_extended_info extended_info; 2565 samba_extended_info_version (&extended_info); 2566 SIVAL(pdata,16,extended_info.samba_magic); 2567 SIVAL(pdata,20,extended_info.samba_version); 2568 SIVAL(pdata,24,extended_info.samba_subversion); 2569 SBIG_UINT(pdata,28,extended_info.samba_gitcommitdate); 2570 memcpy(pdata+36,extended_info.samba_version_string,28); 2524 2571 data_len = 64; 2525 2572 break; 2573 } 2526 2574 2527 2575 /* … … 3310 3358 } 3311 3359 3312 nlink = sbuf.st_nlink;3313 3314 if ((nlink > 0) && S_ISDIR(sbuf.st_mode)) {3315 /* NTFS does not seem to count ".." */3316 nlink -= 1;3317 }3318 3319 if ((nlink > 0) && delete_pending) {3320 nlink -= 1;3321 }3322 3323 3360 if (INFO_LEVEL_IS_UNIX(info_level) && !lp_unix_extensions()) { 3324 3361 return ERROR_NT(NT_STATUS_INVALID_LEVEL); … … 3337 3374 if (!mode) 3338 3375 mode = FILE_ATTRIBUTE_NORMAL; 3376 3377 nlink = sbuf.st_nlink; 3378 3379 if (nlink && (mode&aDIR)) { 3380 nlink = 1; 3381 } 3382 3383 if ((nlink > 0) && delete_pending) { 3384 nlink -= 1; 3385 } 3339 3386 3340 3387 fullpathname = fname;
Note:
See TracChangeset
for help on using the changeset viewer.