Changeset 989 for vendor/current/source3/smbd/open.c
- Timestamp:
- Nov 25, 2016, 8:04:54 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/current/source3/smbd/open.c
r988 r989 884 884 } 885 885 886 if (local_flags & O_NONBLOCK) { 887 /* 888 * GPFS can return ETIMEDOUT for pread on 889 * nonblocking file descriptors when files 890 * migrated to tape need to be recalled. I 891 * could imagine this happens elsehwere 892 * too. With blocking file descriptors this 893 * does not happen. 894 */ 895 ret = set_blocking(fsp->fh->fd, true); 896 if (ret == -1) { 897 status = map_nt_error_from_unix(errno); 898 DBG_WARNING("Could not set fd to blocking: " 899 "%s\n", strerror(errno)); 900 fd_close(fsp); 901 return status; 902 } 903 } 904 886 905 ret = SMB_VFS_FSTAT(fsp, &smb_fname->st); 887 906 if (ret == -1) { … … 2518 2537 new_dos_attributes &= SAMBA_ATTRIBUTES_MASK; 2519 2538 if (file_existed) { 2520 existing_dos_attributes = dos_mode(conn, smb_fname); 2539 /* 2540 * Only use strored DOS attributes for checks 2541 * against requested attributes (below via 2542 * open_match_attributes()), cf bug #11992 2543 * for details. -slow 2544 */ 2545 bool ok; 2546 uint32_t attr = 0; 2547 2548 ok = get_ea_dos_attribute(conn, smb_fname, &attr); 2549 if (ok) { 2550 existing_dos_attributes = attr; 2551 } 2521 2552 } 2522 2553 } … … 3085 3116 return NT_STATUS_SHARING_VIOLATION; 3086 3117 } 3118 3119 fsp->kernel_share_modes_taken = true; 3087 3120 } 3088 3121 … … 3858 3891 TALLOC_CTX *frame = talloc_stackframe(); 3859 3892 NTSTATUS status; 3893 bool saved_posix_pathnames; 3860 3894 3861 3895 status = vfs_streaminfo(conn, NULL, fname, talloc_tos(), … … 3889 3923 goto fail; 3890 3924 } 3925 3926 /* 3927 * Any stream names *must* be treated as Windows 3928 * pathnames, even if we're using UNIX extensions. 3929 */ 3930 3931 saved_posix_pathnames = lp_set_posix_pathnames(false); 3891 3932 3892 3933 for (i=0; i<num_streams; i++) { … … 3957 3998 3958 3999 fail: 4000 4001 (void)lp_set_posix_pathnames(saved_posix_pathnames); 3959 4002 TALLOC_FREE(frame); 3960 4003 return status;
Note:
See TracChangeset
for help on using the changeset viewer.