Ignore:
Timestamp:
Oct 30, 2009, 9:39:05 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update 3.3 to 3.3.9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/smbd/reply.c

    r242 r342  
    958958        }
    959959
    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                }
    964973        }
    965974
     
    10681077                        return;
    10691078                }
    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                        }
    10751093                }
    10761094
     
    23022320        files_struct *fsp;
    23032321        uint32 dirtype_orig = dirtype;
     2322        bool posix_paths = lp_posix_pathnames();
     2323        int ret;
    23042324        NTSTATUS status;
    23052325
     
    23102330        }
    23112331
    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) {
    23132338                return map_nt_error_from_unix(errno);
    23142339        }
     
    23962421                 FILE_OPEN,             /* create_disposition*/
    23972422                 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,
    23992426                 0,                     /* oplock_request */
    24002427                 0,                     /* allocation_size */
Note: See TracChangeset for help on using the changeset viewer.