summaryrefslogtreecommitdiff
path: root/source3/torture/masktest.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2010-10-29 11:56:51 -0700
committerJeremy Allison <jra@samba.org>2010-10-29 19:40:16 +0000
commit14ff2e8de9bd8d0064762234555260f5eea643fe (patch)
treeabd73a321e4f9855c9fcaf729d7a9ef7f91112ab /source3/torture/masktest.c
parent606a447503defdeddc84ae03e06b392517c840c5 (diff)
downloadsamba-14ff2e8de9bd8d0064762234555260f5eea643fe.tar.gz
samba-14ff2e8de9bd8d0064762234555260f5eea643fe.tar.bz2
samba-14ff2e8de9bd8d0064762234555260f5eea643fe.zip
Fix bug #7700 - Improvement of return code of smbclient
Based on an initial patch from H Hasegawa <hasegawa.hiroyuki@fujixerox.co.jp>. Convert cli_list and associated functions to take calls that return NTSTATUS. Jeremy. Autobuild-User: Jeremy Allison <jra@samba.org> Autobuild-Date: Fri Oct 29 19:40:16 UTC 2010 on sn-devel-104
Diffstat (limited to 'source3/torture/masktest.c')
-rw-r--r--source3/torture/masktest.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/torture/masktest.c b/source3/torture/masktest.c
index 51de6d9505..82aa6bff36 100644
--- a/source3/torture/masktest.c
+++ b/source3/torture/masktest.c
@@ -269,7 +269,7 @@ struct rn_state {
char *short_name;
};
-static void listfn(const char *mnt, struct file_info *f, const char *s,
+static NTSTATUS listfn(const char *mnt, struct file_info *f, const char *s,
void *private_data)
{
struct rn_state *state = (struct rn_state *)private_data;
@@ -281,17 +281,22 @@ static void listfn(const char *mnt, struct file_info *f, const char *s,
resultp[2] = '+';
}
- if ((state == NULL) || ISDOT(f->name) || ISDOTDOT(f->name)) {
- return;
+ if (state == NULL) {
+ return NT_STATUS_INTERNAL_ERROR;
+ }
+
+ if (ISDOT(f->name) || ISDOTDOT(f->name)) {
+ return NT_STATUS_OK;
}
fstrcpy(state->short_name, f->short_name);
strlower_m(state->short_name);
*state->pp_long_name = SMB_STRDUP(f->name);
if (!*state->pp_long_name) {
- return;
+ return NT_STATUS_NO_MEMORY;
}
strlower_m(*state->pp_long_name);
+ return NT_STATUS_OK;
}
static void get_real_name(struct cli_state *cli,