Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/source4/libcli/clifile.c

    r740 r988  
    5252
    5353/****************************************************************************
    54  Map standard UNIX permissions onto wire representations.
    55 ****************************************************************************/
    56 uint32_t unix_perms_to_wire(mode_t perms)
    57 {
    58         unsigned int ret = 0;
    59 
    60         ret |= ((perms & S_IXOTH) ?  UNIX_X_OTH : 0);
    61         ret |= ((perms & S_IWOTH) ?  UNIX_W_OTH : 0);
    62         ret |= ((perms & S_IROTH) ?  UNIX_R_OTH : 0);
    63         ret |= ((perms & S_IXGRP) ?  UNIX_X_GRP : 0);
    64         ret |= ((perms & S_IWGRP) ?  UNIX_W_GRP : 0);
    65         ret |= ((perms & S_IRGRP) ?  UNIX_R_GRP : 0);
    66         ret |= ((perms & S_IXUSR) ?  UNIX_X_USR : 0);
    67         ret |= ((perms & S_IWUSR) ?  UNIX_W_USR : 0);
    68         ret |= ((perms & S_IRUSR) ?  UNIX_R_USR : 0);
    69 #ifdef S_ISVTX
    70         ret |= ((perms & S_ISVTX) ?  UNIX_STICKY : 0);
    71 #endif
    72 #ifdef S_ISGID
    73         ret |= ((perms & S_ISGID) ?  UNIX_SET_GID : 0);
    74 #endif
    75 #ifdef S_ISUID
    76         ret |= ((perms & S_ISUID) ?  UNIX_SET_UID : 0);
    77 #endif
    78         return ret;
    79 }
    80 
    81 /****************************************************************************
    8254 Symlink a file (UNIX extensions).
    8355****************************************************************************/
     
    682654        TALLOC_CTX *mem_ctx;
    683655        NTSTATUS status;
     656        int ret = -1;
    684657
    685658        mem_ctx = talloc_init("raw_open");
    686         if (!mem_ctx) return -1;
     659        if (!mem_ctx) return ret;
    687660
    688661        open_parms.openx.level = RAW_OPEN_CTEMP;
     
    692665
    693666        status = smb_raw_open(tree, mem_ctx, &open_parms);
    694         if (tmp_path) {
    695                 *tmp_path = strdup(open_parms.ctemp.out.name);
     667        if (NT_STATUS_IS_OK(status)) {
     668                if (tmp_path) {
     669                        *tmp_path = strdup(open_parms.ctemp.out.name);
     670                }
     671                ret = open_parms.ctemp.out.file.fnum;
    696672        }
    697673        talloc_free(mem_ctx);
    698         if (NT_STATUS_IS_OK(status)) {
    699                 return open_parms.ctemp.out.file.fnum;
    700         }
    701         return -1;
    702 }
     674        return ret;
     675}
Note: See TracChangeset for help on using the changeset viewer.