summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-02-28 02:15:12 -0800
committerJeremy Allison <jra@samba.org>2008-02-28 02:15:12 -0800
commitcf297a917f41e1444eea504851f5544d59d61446 (patch)
tree37b0d647a7eb58bdefe02949d7deb731c4b2bb6b /source3
parent22ac09c08c6e9ab56602ba44a799257d6435ae15 (diff)
parent9dc87b86137db120834b158063688bfc4f20329b (diff)
downloadsamba-cf297a917f41e1444eea504851f5544d59d61446.tar.gz
samba-cf297a917f41e1444eea504851f5544d59d61446.tar.bz2
samba-cf297a917f41e1444eea504851f5544d59d61446.zip
Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit 1d9d39525a1f1f5e43e86d919f1ced2df568f676)
Diffstat (limited to 'source3')
-rw-r--r--source3/rpc_server/srv_srvsvc_nt.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source3/rpc_server/srv_srvsvc_nt.c b/source3/rpc_server/srv_srvsvc_nt.c
index f0680a89e5..37bd204f75 100644
--- a/source3/rpc_server/srv_srvsvc_nt.c
+++ b/source3/rpc_server/srv_srvsvc_nt.c
@@ -1216,17 +1216,20 @@ done:
WERROR _srv_net_file_enum(pipes_struct *p, SRV_Q_NET_FILE_ENUM *q_u, SRV_R_NET_FILE_ENUM *r_u)
{
+ const char *username = NULL;
+
switch ( q_u->level ) {
- case 3: {
- char *username;
- if (!(username = rpcstr_pull_unistr2_talloc(
- p->mem_ctx, q_u->username))) {
- return WERR_NOMEM;
+ case 3:
+ if (q_u->username) {
+ username = rpcstr_pull_unistr2_talloc(
+ p->mem_ctx, q_u->username);
+ if (!username) {
+ return WERR_NOMEM;
+ }
}
return net_file_enum_3(username, r_u,
get_enum_hnd(&q_u->enum_hnd));
- }
default:
return WERR_UNKNOWN_LEVEL;
}