summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafal Szczesniak <mimir@samba.org>2006-12-13 23:37:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:29:16 -0500
commitecd5e432b708f27106dd8fbd8a2a2567fd18cff1 (patch)
tree028a4560717e4645253f3811bbd81e03bcb46e2f
parent5ff19e8ca4bbd54570d8f9eab924a796131c20a3 (diff)
downloadsamba-ecd5e432b708f27106dd8fbd8a2a2567fd18cff1.tar.gz
samba-ecd5e432b708f27106dd8fbd8a2a2567fd18cff1.tar.bz2
samba-ecd5e432b708f27106dd8fbd8a2a2567fd18cff1.zip
r20163: Return null object if no user is found.
rafal (This used to be commit af539fec4acb3ad78b8f0fa4f7c2f4e6cebea0b7)
-rw-r--r--source4/scripting/ejs/ejsnet.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/scripting/ejs/ejsnet.c b/source4/scripting/ejs/ejsnet.c
index 5daf478506..8662ae2caf 100644
--- a/source4/scripting/ejs/ejsnet.c
+++ b/source4/scripting/ejs/ejsnet.c
@@ -367,11 +367,15 @@ static int ejs_net_userinfo(MprVarHandle eid, int argc, char **argv)
status = libnet_UserInfo(ctx, mem_ctx, &req);
if (!NT_STATUS_IS_OK(status)) {
ejsSetErrorMsg(eid, "%s", req.out.error_string);
+
+ /* create null object to return */
+ mprUserInfo = mprCreateNullVar();
+ goto done;
}
/* create UserInfo object */
mprUserInfo = mprObject("UserInfo");
-
+
mprAccountName = mprString(req.out.account_name);
mprFullName = mprString(req.out.full_name);
mprDescription = mprString(req.out.description);