Ignore:
Timestamp:
Nov 12, 2012, 4:35:55 PM (13 years ago)
Author:
Silvan Scherrer
Message:

Samba Server 3.5: update branche to 3.5.12

File:
1 edited

Legend:

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

    r599 r732  
    248248                                struct security_descriptor **ppdesc)
    249249{
    250         DATA_BLOB blob;
     250        DATA_BLOB blob = data_blob_null;
    251251        NTSTATUS status;
    252252        uint16_t hash_type;
     
    826826        struct smb_filename local_fname;
    827827        int saved_errno = 0;
     828        char *saved_dir = NULL;
     829
     830        saved_dir = vfs_GetWd(talloc_tos(),conn);
     831        if (!saved_dir) {
     832                saved_errno = errno;
     833                goto out;
     834        }
    828835
    829836        if (!parent_dirname(talloc_tos(), path,
     
    838845
    839846        /* cd into the parent dir to pin it. */
    840         ret = SMB_VFS_CHDIR(conn, parent_dir);
     847        ret = vfs_ChDir(conn, parent_dir);
    841848        if (ret == -1) {
    842849                saved_errno = errno;
     
    856863        /* Ensure we have this file open with DELETE access. */
    857864        id = vfs_file_id_from_sbuf(conn, &local_fname.st);
    858         for (fsp = file_find_di_first(id); fsp; file_find_di_next(fsp)) {
     865        for (fsp = file_find_di_first(id); fsp; fsp = file_find_di_next(fsp)) {
    859866                if (fsp->access_mask & DELETE_ACCESS &&
    860867                                fsp->delete_on_close) {
     
    891898        TALLOC_FREE(parent_dir);
    892899
    893         vfs_ChDir(conn, conn->connectpath);
     900        if (saved_dir) {
     901                vfs_ChDir(conn, saved_dir);
     902        }
    894903        if (saved_errno) {
    895904                errno = saved_errno;
Note: See TracChangeset for help on using the changeset viewer.