Timestamp:
Nov 27, 2012, 4:43:17 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: updated trunk to 3.6.0

Location:
trunk/server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/server

  • trunk/server/source3/modules/vfs_acl_common.c

    r599 r745  
    2020 */
    2121
     22
     23
     24
     25
     26
    2227static NTSTATUS create_acl_blob(const struct security_descriptor *psd,
    2328                        DATA_BLOB *pblob,
     
    3540                        DATA_BLOB *pblob);
    3641
    37 #define HASH_SECURITY_INFO (OWNER_SECURITY_INFORMATION | \
    38                                 GROUP_SECURITY_INFORMATION | \
    39                                 DACL_SECURITY_INFORMATION | \
    40                                 SACL_SECURITY_INFORMATION)
     42#define HASH_SECURITY_INFO ( | \
     43                                | \
     44                                | \
     45                                S)
    4146
    4247/*******************************************************************
     
    7883        size_t sd_size;
    7984
    80         ndr_err = ndr_pull_struct_blob(pblob, ctx, NULL, &xacl,
     85        ndr_err = ndr_pull_struct_blob(pblob, ctx, &xacl,
    8186                        (ndr_pull_flags_fn_t)ndr_pull_xattr_NTACL);
    8287
     
    8489                DEBUG(5, ("parse_acl_blob: ndr_pull_xattr_NTACL failed: %s\n",
    8590                        ndr_errstr(ndr_err)));
    86                 return ndr_map_error2ntstatus(ndr_err);;
     91                return ndr_map_error2ntstatus(ndr_err);
    8792        }
    8893
    8994        switch (xacl.version) {
    9095                case 2:
    91                         *ppdesc = make_sec_desc(ctx, SEC_DESC_REVISION,
     96                        *ppdesc = make_sec_desc(ctx, S_REVISION,
    9297                                        xacl.info.sd_hs2->sd->type | SEC_DESC_SELF_RELATIVE,
    9398                                        xacl.info.sd_hs2->sd->owner_sid,
     
    101106                        break;
    102107                case 3:
    103                         *ppdesc = make_sec_desc(ctx, SEC_DESC_REVISION,
     108                        *ppdesc = make_sec_desc(ctx, S_REVISION,
    104109                                        xacl.info.sd_hs3->sd->type | SEC_DESC_SELF_RELATIVE,
    105110                                        xacl.info.sd_hs3->sd->owner_sid,
     
    145150
    146151        ndr_err = ndr_push_struct_blob(
    147                         pblob, ctx, NULL, &xacl,
     152                        pblob, ctx, &xacl,
    148153                        (ndr_push_flags_fn_t)ndr_push_xattr_NTACL);
    149154
     
    151156                DEBUG(5, ("create_acl_blob: ndr_push_xattr_NTACL failed: %s\n",
    152157                        ndr_errstr(ndr_err)));
    153                 return ndr_map_error2ntstatus(ndr_err);;
     158                return ndr_map_error2ntstatus(ndr_err);
    154159        }
    155160
     
    250255        DATA_BLOB blob;
    251256        NTSTATUS status;
    252         uint16_t hash_type;
     257        uint16_t hash_type;
    253258        uint8_t hash[XATTR_SD_HASH_SIZE];
    254259        uint8_t hash_tmp[XATTR_SD_HASH_SIZE];
     
    402407        }
    403408
    404         if (!(security_info & OWNER_SECURITY_INFORMATION)) {
     409        if (!(security_info & )) {
    405410                psd->owner_sid = NULL;
    406411        }
    407         if (!(security_info & GROUP_SECURITY_INFORMATION)) {
     412        if (!(security_info & )) {
    408413                psd->group_sid = NULL;
    409414        }
    410         if (!(security_info & DACL_SECURITY_INFORMATION)) {
     415        if (!(security_info & )) {
    411416                psd->dacl = NULL;
    412417        }
    413         if (!(security_info & SACL_SECURITY_INFORMATION)) {
     418        if (!(security_info & S)) {
    414419                psd->sacl = NULL;
    415420        }
     
    444449        struct dom_sid *owner_sid = NULL;
    445450        struct dom_sid *group_sid = NULL;
    446         uint32_t security_info_sent = (OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION | DACL_SECURITY_INFORMATION);
    447         size_t size;
     451        uint32_t security_info_sent = (SECINFO_OWNER | SECINFO_GROUP | SECINFO_DACL);
    448452        bool inherit_owner = lp_inherit_owner(SNUM(handle->conn));
    449453        bool inheritable_components = sd_has_inheritable_components(parent_desc,
    450454                                        is_directory);
     455
    451456
    452457        if (!inheritable_components && !inherit_owner) {
     
    470475
    471476        if (owner_sid == NULL) {
    472                 owner_sid = &handle->conn->server_info->ptok->user_sids[PRIMARY_USER_SID_INDEX];
     477                owner_sid = &handle->conn->sesids[PRIMARY_USER_SID_INDEX];
    473478        }
    474479        if (group_sid == NULL) {
    475                 group_sid = &handle->conn->server_info->ptok->user_sids[PRIMARY_GROUP_SID_INDEX];
     480                group_sid = &handle->conn->sesids[PRIMARY_GROUP_SID_INDEX];
    476481        }
    477482
     
    566571        status = smb1_file_se_access_check(handle->conn,
    567572                                        parent_desc,
    568                                         handle->conn->server_info->ptok,
     573                                        ,
    569574                                        access_mask,
    570575                                        &access_granted);
     
    614619                                NULL,
    615620                                fname,
    616                                 (OWNER_SECURITY_INFORMATION |
    617                                  GROUP_SECURITY_INFORMATION |
    618                                  DACL_SECURITY_INFORMATION),
     621                                ( |
     622                                  |
     623                                 ),
    619624                                &pdesc);
    620625        if (NT_STATUS_IS_OK(status)) {
     
    622627                status = smb1_file_se_access_check(handle->conn,
    623628                                        pdesc,
    624                                         handle->conn->server_info->ptok,
     629                                        ,
    625630                                        fsp->access_mask,
    626631                                        &access_granted);
     
    837842                parent_dir, final_component ));
    838843
    839         /* cd into the parent dir to pin it. */
     844       /* cd into the parent dir to pin it. */
    840845        ret = SMB_VFS_CHDIR(conn, parent_dir);
    841846        if (ret == -1) {
     
    856861        /* Ensure we have this file open with DELETE access. */
    857862        id = vfs_file_id_from_sbuf(conn, &local_fname.st);
    858         for (fsp = file_find_di_first(id); fsp; file_find_di_next(fsp)) {
     863        for (fsp = file_find_di_first(conn->sconn, id); fsp;
     864             file_find_di_next(fsp)) {
    859865                if (fsp->access_mask & DELETE_ACCESS &&
    860866                                fsp->delete_on_close) {
     
    927933                                uint32_t oplock_request,
    928934                                uint64_t allocation_size,
     935
    929936                                struct security_descriptor *sd,
    930937                                struct ea_list *ea_list,
     
    949956                                        oplock_request,
    950957                                        allocation_size,
     958
    951959                                        sd,
    952960                                        ea_list,
Note: See TracChangeset for help on using the changeset viewer.