Ignore:
Timestamp:
Nov 29, 2012, 1:59:04 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/source3/smbd/trans2.c

    r745 r751  
    876876                reply_outbuf(req, 10, total_sent_thistime + alignment_offset
    877877                             + data_alignment_offset);
    878 
    879                 /*
    880                  * We might have SMBtrans2s in req which was transferred to
    881                  * the outbuf, fix that.
    882                  */
    883                 SCVAL(req->outbuf, smb_com, SMBtrans2);
    884878
    885879                /* Set total params and data to be sent */
     
    10971091        }
    10981092
    1099         if (!map_open_params_to_ntcreate(smb_fname, deny_mode, open_ofun,
     1093        if (!map_open_params_to_ntcreate(smb_fname->base_name, deny_mode,
     1094                                         open_ofun,
    11001095                                         &access_mask, &share_mode,
    11011096                                         &create_disposition,
     
    22842279        struct dptr_struct *dirptr = NULL;
    22852280        struct smbd_server_connection *sconn = req->sconn;
     2281        uint32_t ucf_flags = (UCF_SAVE_LCOMP | UCF_ALWAYS_ALLOW_WCARD_LCOMP);
    22862282
    22872283        if (total_params < 13) {
     
    23272323                                goto out;
    23282324                        }
     2325                        ucf_flags |= UCF_UNIX_NAME_LOOKUP;
    23292326                        break;
    23302327                default:
     
    23442341                                    req->flags2 & FLAGS2_DFS_PATHNAMES,
    23452342                                    directory,
    2346                                     (UCF_SAVE_LCOMP |
    2347                                         UCF_ALWAYS_ALLOW_WCARD_LCOMP),
     2343                                    ucf_flags,
    23482344                                    &mask_contains_wcard,
    23492345                                    &smb_dname);
     
    46864682                case SMB_QUERY_FILE_STREAM_INFO:
    46874683                case SMB_FILE_STREAM_INFORMATION: {
    4688                         unsigned int num_streams;
    4689                         struct stream_struct *streams;
     4684                        unsigned int num_streams = 0;
     4685                        struct stream_struct *streams = NULL;
    46904686
    46914687                        DEBUG(10,("smbd_do_qfilepathinfo: "
     
    46964692                        }
    46974693
    4698                         status = SMB_VFS_STREAMINFO(
    4699                                 conn, fsp, smb_fname->base_name, talloc_tos(),
    4700                                 &num_streams, &streams);
     4694                        status = vfs_streaminfo(conn, fsp, smb_fname->base_name,
     4695                                                talloc_tos(), &num_streams, &streams);
    47014696
    47024697                        if (!NT_STATUS_IS_OK(status)) {
     
    51175112                uint32_t name_hash;
    51185113                char *fname = NULL;
     5114                uint32_t ucf_flags = 0;
    51195115
    51205116                /* qpathinfo */
     
    51285124                DEBUG(3,("call_trans2qfilepathinfo: TRANSACT2_QPATHINFO: level = %d\n", info_level));
    51295125
    5130                 if (INFO_LEVEL_IS_UNIX(info_level) && !lp_unix_extensions()) {
    5131                         reply_nterror(req, NT_STATUS_INVALID_LEVEL);
    5132                         return;
     5126                if (INFO_LEVEL_IS_UNIX(info_level)) {
     5127                        if (!lp_unix_extensions()) {
     5128                                reply_nterror(req, NT_STATUS_INVALID_LEVEL);
     5129                                return;
     5130                        }
     5131                        if (info_level == SMB_QUERY_FILE_UNIX_BASIC ||
     5132                                        info_level == SMB_QUERY_FILE_UNIX_INFO2 ||
     5133                                        info_level == SMB_QUERY_FILE_UNIX_LINK) {
     5134                                ucf_flags |= UCF_UNIX_NAME_LOOKUP;
     5135                        }
    51335136                }
    51345137
     
    51455148                                        req->flags2 & FLAGS2_DFS_PATHNAMES,
    51465149                                        fname,
    5147                                         0,
     5150                                        ucf_flags,
    51485151                                        NULL,
    51495152                                        &smb_fname);
     
    58415844        /* The set is across all open files on this dev/inode pair. */
    58425845        if (!set_delete_on_close(fsp, delete_on_close,
     5846                                 conn->session_info->security_token,
    58435847                                 &conn->session_info->utok)) {
    58445848                return NT_STATUS_ACCESS_DENIED;
     
    79988002        } else {
    79998003                char *fname = NULL;
     8004                uint32_t ucf_flags = 0;
    80008005
    80018006                /* set path info */
     
    80148019                }
    80158020
     8021                if (info_level == SMB_SET_FILE_UNIX_BASIC ||
     8022                                info_level == SMB_SET_FILE_UNIX_INFO2 ||
     8023                                info_level == SMB_FILE_RENAME_INFORMATION ||
     8024                                info_level == SMB_POSIX_PATH_UNLINK) {
     8025                        ucf_flags |= UCF_UNIX_NAME_LOOKUP;
     8026                }
     8027
    80168028                status = filename_convert(req, conn,
    80178029                                         req->flags2 & FLAGS2_DFS_PATHNAMES,
    80188030                                         fname,
    8019                                          0,
     8031                                         ucf_flags,
    80208032                                         NULL,
    80218033                                         &smb_fname);
     
    88448856        show_msg((char *)req->inbuf);
    88458857
     8858        /* Windows clients expect all replies to
     8859           a transact secondary (SMBtranss2 0x33)
     8860           to have a command code of transact
     8861           (SMBtrans2 0x32). See bug #8989
     8862           and also [MS-CIFS] section 2.2.4.47.2
     8863           for details.
     8864        */
     8865        req->cmd = SMBtrans2;
     8866
    88468867        if (req->wct < 8) {
    88478868                reply_nterror(req, NT_STATUS_INVALID_PARAMETER);
Note: See TracChangeset for help on using the changeset viewer.