Ignore:
Timestamp:
Mar 11, 2009, 9:14:55 AM (16 years ago)
Author:
Paul Smedley
Message:

Add 'missing' 3.0.34 diffs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.0/source/libsmb/libsmbclient.c

    r134 r165  
    45274527         */
    45284528        if (ipc_cli && (all || some_nt || all_nt_acls)) {
     4529                pstring targetpath;
     4530                struct cli_state *targetcli;
     4531
    45294532                /* Point to the portion after "system.nt_sec_desc." */
    45304533                name += 19;     /* if (all) this will be invalid but unused */
    45314534
     4535                if (!cli_resolve_path("", cli, filename,
     4536                                      &targetcli, targetpath))
     4537                {
     4538                        d_printf("Could not resolve %s\n", filename);
     4539                        return -1;
     4540                }
     4541
    45324542                /* ... then obtain any NT attributes which were requested */
    4533                 fnum = cli_nt_create(cli, filename, CREATE_ACCESS_READ);
     4543                fnum = cli_nt_create(targetcli, targetpath, CREATE_ACCESS_READ);
    45344544
    45354545                if (fnum == -1) {
    45364546                        DEBUG(5, ("cacl_get failed to open %s: %s\n",
    4537                                   filename, cli_errstr(cli)));
     4547                                  targetpath, cli_errstr(targetcli)));
    45384548                        errno = 0;
    45394549                        return -1;
    45404550                }
    45414551
    4542                 sd = cli_query_secdesc(cli, fnum, ctx);
     4552                sd = cli_query_secdesc(targetcli, fnum, ctx);
    45434553
    45444554                if (!sd) {
     
    45494559                }
    45504560
    4551                 cli_close(cli, fnum);
     4561                cli_close(targetcli, fnum);
    45524562
    45534563                if (! exclude_nt_revision) {
     
    51495159        BOOL numeric = True;
    51505160
     5161        pstring targetpath;
     5162        struct cli_state *targetcli;
     5163
    51515164        /* the_acl will be null for REMOVE_ALL operations */
    51525165        if (the_acl) {
     
    51785191        }
    51795192
     5193        if (!cli_resolve_path("", cli, filename,
     5194                              &targetcli, targetpath))
     5195        {
     5196                d_printf("Could not resolve %s\n", filename);
     5197                errno = ENOENT;
     5198                return -1;
     5199        }
     5200
    51805201        /* The desired access below is the only one I could find that works
    51815202           with NT4, W2KP and Samba */
    51825203
    5183         fnum = cli_nt_create(cli, filename, CREATE_ACCESS_READ);
     5204        fnum = cli_nt_create(targetcli, targetpath, CREATE_ACCESS_READ);
    51845205
    51855206        if (fnum == -1) {
    51865207                DEBUG(5, ("cacl_set failed to open %s: %s\n",
    5187                           filename, cli_errstr(cli)));
     5208                          targetpath, cli_errstr(targetcli)));
    51885209                errno = 0;
    51895210                return -1;
    51905211        }
    51915212
    5192         old = cli_query_secdesc(cli, fnum, ctx);
     5213        old = cli_query_secdesc(targetcli, fnum, ctx);
    51935214
    51945215        if (!old) {
     
    51985219        }
    51995220
    5200         cli_close(cli, fnum);
     5221        cli_close(targetcli, fnum);
    52015222
    52025223        switch (mode) {
     
    52875308                           owner_sid, group_sid, NULL, dacl, &sd_size);
    52885309
    5289         fnum = cli_nt_create(cli, filename,
     5310        fnum = cli_nt_create(targetcli, targetpath,
    52905311                             WRITE_DAC_ACCESS | WRITE_OWNER_ACCESS);
    52915312
    52925313        if (fnum == -1) {
    52935314                DEBUG(5, ("cacl_set failed to open %s: %s\n",
    5294                           filename, cli_errstr(cli)));
     5315                          targetpath, cli_errstr(targetcli)));
    52955316                errno = 0;
    52965317                return -1;
    52975318        }
    52985319
    5299         if (!cli_set_secdesc(cli, fnum, sd)) {
    5300                 DEBUG(5, ("ERROR: secdesc set failed: %s\n", cli_errstr(cli)));
     5320        if (!cli_set_secdesc(targetcli, fnum, sd)) {
     5321                DEBUG(5, ("ERROR: secdesc set failed: %s\n", cli_errstr(targetcli)));
    53015322                ret = -1;
    53025323        }
     
    53055326
    53065327 failed:
    5307         cli_close(cli, fnum);
     5328        cli_close(targetcli, fnum);
    53085329
    53095330        if (err != 0) {
Note: See TracChangeset for help on using the changeset viewer.