diff options
author | Andrew Tridgell <tridge@samba.org> | 2001-02-20 12:25:42 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2001-02-20 12:25:42 +0000 |
commit | d4b2639c00c17ad98d038e7974b1b1eddd541e0e (patch) | |
tree | fd7d93fd123724537f29e3b5b67b3fcef18251f6 /source3/libsmb | |
parent | c7c3db2f16e572e14c5d881b641271b2ab9aa4be (diff) | |
download | samba-d4b2639c00c17ad98d038e7974b1b1eddd541e0e.tar.gz samba-d4b2639c00c17ad98d038e7974b1b1eddd541e0e.tar.bz2 samba-d4b2639c00c17ad98d038e7974b1b1eddd541e0e.zip |
converted cli_chkpath()
(This used to be commit 95268f52556e5983004e594002b7e18a8656d1f0)
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/clifile.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/libsmb/clifile.c b/source3/libsmb/clifile.c index ab16b21564..0cfe168f43 100644 --- a/source3/libsmb/clifile.c +++ b/source3/libsmb/clifile.c @@ -710,14 +710,15 @@ BOOL cli_chkpath(struct cli_state *cli, char *path) if (!*path2) *path2 = '\\'; memset(cli->outbuf,'\0',smb_size); - set_message(cli->outbuf,0,4 + strlen(path2),True); + set_message(cli->outbuf,0,0,True); SCVAL(cli->outbuf,smb_com,SMBchkpth); SSVAL(cli->outbuf,smb_tid,cli->cnum); cli_setup_packet(cli); p = smb_buf(cli->outbuf); *p++ = 4; - safe_strcpy(p,path2,strlen(path2)); - unix_to_dos(p,True); + p += clistr_push(cli, p, path2, -1, CLISTR_TERMINATE | CLISTR_CONVERT); + + set_message(cli->outbuf,0,PTR_DIFF(p, smb_buf(cli->outbuf)), False); cli_send_smb(cli); if (!cli_receive_smb(cli)) { |