Ignore:
Timestamp:
Nov 12, 2012, 5:09:31 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: update branche to 3.5.13

Location:
branches/samba-3.5.x/source3/modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.5.x/source3/modules/vfs_acl_common.c

    r732 r733  
    374374                        }
    375375                }
    376                 is_directory = S_ISDIR(sbuf.st_ex_mode);
     376                is_directory = S_ISDIR(psbuf->st_ex_mode);
    377377
    378378                if (ignore_file_system_acl) {
     
    409409        }
    410410        if (!(security_info & DACL_SECURITY_INFORMATION)) {
     411                psd->type &= ~SEC_DESC_DACL_PRESENT;
    411412                psd->dacl = NULL;
    412413        }
    413414        if (!(security_info & SACL_SECURITY_INFORMATION)) {
     415                psd->type &= ~SEC_DESC_SACL_PRESENT;
    414416                psd->sacl = NULL;
    415417        }
     
    533535                                        (SECINFO_OWNER |
    534536                                         SECINFO_GROUP |
    535                                          SECINFO_DACL),
     537                                         SECINFO_DACL  |
     538                                         SECINFO_SACL),
    536539                                        pp_parent_desc);
    537540
     
    616619                                (OWNER_SECURITY_INFORMATION |
    617620                                 GROUP_SECURITY_INFORMATION |
    618                                  DACL_SECURITY_INFORMATION),
     621                                 DACL_SECURITY_INFORMATION  |
     622                                 SACL_SECURITY_INFORMATION),
    619623                                &pdesc);
    620624        if (NT_STATUS_IS_OK(status)) {
     
    627631                if (!NT_STATUS_IS_OK(status)) {
    628632                        DEBUG(10,("open_acl_xattr: %s open "
     633                                "for access 0x%x (0x%x) "
    629634                                "refused with error %s\n",
    630635                                fsp_str_dbg(fsp),
     636                                (unsigned int)fsp->access_mask,
     637                                (unsigned int)access_granted,
    631638                                nt_errstr(status) ));
    632639                        goto err;
     
    912919        int ret;
    913920
     921        /* Try the normal rmdir first. */
    914922        ret = SMB_VFS_NEXT_RMDIR(handle, path);
    915         if (!(ret == -1 && (errno == EACCES || errno == EPERM))) {
    916                 DEBUG(10,("rmdir_acl_common: unlink of %s failed %s\n",
    917                         path,
    918                         strerror(errno) ));
    919                 return ret;
    920         }
    921 
    922         return acl_common_remove_object(handle,
    923                                         path,
    924                                         true);
     923        if (ret == 0) {
     924                return 0;
     925        }
     926        if (errno == EACCES || errno == EPERM) {
     927                /* Failed due to access denied,
     928                   see if we need to root override. */
     929                return acl_common_remove_object(handle,
     930                                                path,
     931                                                true);
     932        }
     933
     934        DEBUG(10,("rmdir_acl_common: unlink of %s failed %s\n",
     935                path,
     936                strerror(errno) ));
     937        return -1;
    925938}
    926939
     
    10401053        int ret;
    10411054
     1055        /* Try the normal unlink first. */
    10421056        ret = SMB_VFS_NEXT_UNLINK(handle, smb_fname);
    1043         if (!(ret == -1 && (errno == EACCES || errno == EPERM))) {
    1044                 DEBUG(10,("unlink_acl_common: unlink of %s failed %s\n",
    1045                         smb_fname->base_name,
    1046                         strerror(errno) ));
    1047                 return ret;
    1048         }
    1049         /* Don't do anything fancy for streams. */
    1050         if (smb_fname->stream_name) {
    1051                 return ret;
    1052         }
    1053 
    1054         return acl_common_remove_object(handle,
     1057        if (ret == 0) {
     1058                return 0;
     1059        }
     1060        if (errno == EACCES || errno == EPERM) {
     1061                /* Failed due to access denied,
     1062                   see if we need to root override. */
     1063
     1064                /* Don't do anything fancy for streams. */
     1065                if (smb_fname->stream_name) {
     1066                        return -1;
     1067                }
     1068                return acl_common_remove_object(handle,
    10551069                                        smb_fname->base_name,
    10561070                                        false);
     1071        }
     1072
     1073        DEBUG(10,("unlink_acl_common: unlink of %s failed %s\n",
     1074                smb_fname->base_name,
     1075                strerror(errno) ));
     1076        return -1;
    10571077}
    10581078
  • branches/samba-3.5.x/source3/modules/vfs_commit.c

    r414 r733  
    232232        }
    233233
    234         return 0;
     234        return fd;
    235235}
    236236
Note: See TracChangeset for help on using the changeset viewer.