Ignore:
Timestamp:
May 24, 2009, 7:51:24 AM (16 years ago)
Author:
Herwig Bauernfeind
Message:

Update Samba 3.3 branch to 3.3.3

File:
1 edited

Legend:

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

    r222 r223  
    426426                        if (!NT_STATUS_IS_OK(status)) {
    427427                                if (NT_STATUS_EQUAL(status, NT_STATUS_ACCESS_DENIED)) {
     428                                        /*
     429                                         * On NT_STATUS_ACCESS_DENIED, access_granted
     430                                         * contains the denied bits.
     431                                         */
     432
     433                                        if ((access_mask & FILE_WRITE_ATTRIBUTES) &&
     434                                                        (access_granted & FILE_WRITE_ATTRIBUTES) &&
     435                                                        (lp_map_readonly(SNUM(conn)) ||
     436                                                         lp_map_archive(SNUM(conn)) ||
     437                                                         lp_map_hidden(SNUM(conn)) ||
     438                                                         lp_map_system(SNUM(conn)))) {
     439                                                access_granted &= ~FILE_WRITE_ATTRIBUTES;
     440
     441                                                DEBUG(10,("open_file: overrode FILE_WRITE_ATTRIBUTES "
     442                                                        "on file %s\n",
     443                                                        path ));
     444                                        }
     445
    428446                                        if ((access_mask & DELETE_ACCESS) &&
    429                                                         (access_granted == DELETE_ACCESS) &&
     447                                                        (access_granted & DELETE_ACCESS) &&
    430448                                                        can_delete_file_in_directory(conn, path)) {
    431449                                                /* Were we trying to do a stat open
     
    437455                                                 * for details. */
    438456
    439                                                 DEBUG(10,("open_file: overrode ACCESS_DENIED "
     457                                                access_granted &= ~DELETE_ACCESS;
     458
     459                                                DEBUG(10,("open_file: overrode DELETE_ACCESS "
    440460                                                        "on file %s\n",
    441461                                                        path ));
    442                                         } else {
     462                                        }
     463
     464                                        if (access_granted != 0) {
    443465                                                DEBUG(10, ("open_file: Access denied on "
    444466                                                        "file %s\n",
Note: See TracChangeset for help on using the changeset viewer.