Ignore:
Timestamp:
Jul 6, 2011, 8:21:13 PM (14 years ago)
Author:
Herwig Bauernfeind
Message:

Samba 3.5: Update trunk to 3.5.9

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/source3/lib/util_seaccess.c

    r596 r599  
    113113
    114114        if (is_sid_in_token(token, sd->owner_sid)) {
    115                 granted |= SEC_STD_WRITE_DAC | SEC_STD_READ_CONTROL | SEC_STD_DELETE;
    116         } else if (user_has_privileges(token, &se_restore)) {
    117                 granted |= SEC_STD_DELETE;
     115                granted |= SEC_STD_WRITE_DAC | SEC_STD_READ_CONTROL;
    118116        }
    119117
     
    172170                access_desired &= ~SEC_FLAG_MAXIMUM_ALLOWED;
    173171                *access_granted = access_desired;
    174                 bits_remaining = access_desired & ~SEC_STD_DELETE;
     172                bits_remaining = access_desired;
    175173
    176174                DEBUG(10,("se_access_check: MAX desired = 0x%x, granted = 0x%x, remaining = 0x%x\n",
     
    188186        }
    189187
     188
     189
     190
     191
     192
     193
     194
     195
     196
     197
    190198        /* a NULL dacl allows access */
    191199        if ((sd->type & SEC_DESC_DACL_PRESENT) && sd->dacl == NULL) {
    192200                *access_granted = access_desired;
    193201                return NT_STATUS_OK;
    194         }
    195 
    196         /* the owner always gets SEC_STD_WRITE_DAC, SEC_STD_READ_CONTROL and SEC_STD_DELETE */
    197         if ((bits_remaining & (SEC_STD_WRITE_DAC|SEC_STD_READ_CONTROL|SEC_STD_DELETE)) &&
    198             is_sid_in_token(token, sd->owner_sid)) {
    199                 bits_remaining &= ~(SEC_STD_WRITE_DAC|SEC_STD_READ_CONTROL|SEC_STD_DELETE);
    200         }
    201         if ((bits_remaining & SEC_STD_DELETE) &&
    202             user_has_privileges(token, &se_restore)) {
    203                 bits_remaining &= ~SEC_STD_DELETE;
    204202        }
    205203
Note: See TracChangeset for help on using the changeset viewer.