summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-03 09:39:11 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-03 09:39:11 +0000
commitcce5f09a90b5027bafd22f42edab9c256789bce1 (patch)
tree3347082ec53c1503b961e08852efedf29a65d41f /source3/libsmb
parent8a9fc22a6f0ea99312c3a86eff3ee1365d45a9f1 (diff)
downloadsamba-cce5f09a90b5027bafd22f42edab9c256789bce1.tar.gz
samba-cce5f09a90b5027bafd22f42edab9c256789bce1.tar.bz2
samba-cce5f09a90b5027bafd22f42edab9c256789bce1.zip
added unlink() and rename() support to smbwrapper
(This used to be commit b85d96144728e8a29c7c1114462e28bf3b144b80)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/clientgen.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/libsmb/clientgen.c b/source3/libsmb/clientgen.c
index 7be2717bed..d2a7749490 100644
--- a/source3/libsmb/clientgen.c
+++ b/source3/libsmb/clientgen.c
@@ -448,7 +448,7 @@ BOOL cli_NetWkstaUserLogon(struct cli_state *cli,char *user, char *workstation)
/****************************************************************************
call a NetShareEnum - try and browse available connections on a host
****************************************************************************/
-BOOL cli_RNetShareEnum(struct cli_state *cli, void (*fn)(char *, uint32, char *))
+BOOL cli_RNetShareEnum(struct cli_state *cli, void (*fn)(const char *, uint32, char *))
{
char *rparam = NULL;
char *rdata = NULL;
@@ -807,11 +807,10 @@ BOOL cli_tdis(struct cli_state *cli)
return CVAL(cli->inbuf,smb_rcls) == 0;
}
-#if UNUSED_CODE
/****************************************************************************
rename a file
****************************************************************************/
-BOOL cli_mv(struct cli_state *cli, char *fname_src, char *fname_dst)
+BOOL cli_rename(struct cli_state *cli, char *fname_src, char *fname_dst)
{
char *p;
@@ -844,7 +843,6 @@ BOOL cli_mv(struct cli_state *cli, char *fname_src, char *fname_dst)
return True;
}
-#endif
/****************************************************************************
delete a file
@@ -2167,7 +2165,13 @@ int cli_error(struct cli_state *cli, uint8 *eclass, uint32 *num)
if (!IS_BITS_SET_ALL(nt_err, 0xc0000000)) return 0;
switch (nt_err & 0xFFFFFF) {
- case NT_STATUS_ACCESS_VIOLATION: return EPERM;
+ case NT_STATUS_ACCESS_VIOLATION: return EACCES;
+ case NT_STATUS_NO_SUCH_FILE: return ENOENT;
+ case NT_STATUS_NO_SUCH_DEVICE: return ENODEV;
+ case NT_STATUS_INVALID_HANDLE: return EBADF;
+ case NT_STATUS_NO_MEMORY: return ENOMEM;
+ case NT_STATUS_ACCESS_DENIED: return EACCES;
+ case NT_STATUS_OBJECT_NAME_NOT_FOUND: return ENOENT;
}
/* for all other cases - a default code */