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

Update Samba 3.3 to 3.3.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/samba-3.3.x/source/libsmb/libsmb_dir.c

    r206 r221  
    15021502        char *password = NULL;
    15031503        char *workgroup = NULL;
     1504        char *targetpath = NULL;
     1505        struct cli_state *targetcli = NULL;
    15041506        char *path = NULL;
    15051507        uint16 mode;
     
    15191521        }
    15201522
    1521         DEBUG(4, ("smbc_chmod(%s, 0%3o)\n", fname, newmode));
     1523        DEBUG(4, ("smbc_chmod(%s, 0%3o)\n", fname, (unsigned int)newmode));
    15221524
    15231525        if (SMBC_parse_path(frame,
     
    15521554                return -1;  /* errno set by SMBC_server */
    15531555        }
     1556       
     1557        /*d_printf(">>>unlink: resolving %s\n", path);*/
     1558        if (!cli_resolve_path(frame, "", srv->cli, path,
     1559                              &targetcli, &targetpath)) {
     1560                d_printf("Could not resolve %s\n", path);
     1561                TALLOC_FREE(frame);
     1562                return -1;
     1563        }
    15541564
    15551565        mode = 0;
     
    15601570        if ((newmode & S_IXOTH) && lp_map_hidden(-1)) mode |= aHIDDEN;
    15611571
    1562         if (!cli_setatr(srv->cli, path, mode, 0)) {
    1563                 errno = SMBC_errno(context, srv->cli);
     1572        if (!cli_setatr(targetcli, targetpath, mode, 0)) {
     1573                errno = SMBC_errno(context, targetcli);
    15641574                TALLOC_FREE(frame);
    15651575                return -1;
     
    19021912        }
    19031913
     1914        /* set the credentials to make DFS work */
     1915        smbc_set_credentials_with_fallback(ocontext,
     1916                                           workgroup,
     1917                                           user1,
     1918                                           password1);
     1919
    19041920        /*d_printf(">>>rename: resolving %s\n", path1);*/
    19051921        if (!cli_resolve_path(frame, "", srv->cli, path1,
     
    19091925                return -1;
    19101926        }
     1927       
     1928        /* set the credentials to make DFS work */
     1929        smbc_set_credentials_with_fallback(ncontext,
     1930                                           workgroup,
     1931                                           user2,
     1932                                           password2);
     1933       
    19111934        /*d_printf(">>>rename: resolved path as %s\n", targetpath1);*/
    19121935        /*d_printf(">>>rename: resolving %s\n", path2);*/
Note: See TracChangeset for help on using the changeset viewer.