summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-11 23:59:12 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-12 16:45:47 +0200
commit776eb25ef75bf4d7625f04db404c4b8a1ae90936 (patch)
treeb2d32d2e2879d9f515a01aebcecc7ec8e6f764e0 /source4
parentcdecae6c03fd4ce49f3bcabfe5fccc1c9e7488b0 (diff)
downloadsamba-776eb25ef75bf4d7625f04db404c4b8a1ae90936.tar.gz
samba-776eb25ef75bf4d7625f04db404c4b8a1ae90936.tar.bz2
samba-776eb25ef75bf4d7625f04db404c4b8a1ae90936.zip
s4:dcesrv_samr_QueryUserInfo - minor fixes
Return "NT_STATUS_NO_SUCH_USER" when user account doesn't exist.
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/samr/dcesrv_samr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c
index 8e1b2b068e..617fde7fc5 100644
--- a/source4/rpc_server/samr/dcesrv_samr.c
+++ b/source4/rpc_server/samr/dcesrv_samr.c
@@ -2918,7 +2918,10 @@ static NTSTATUS dcesrv_samr_QueryUserInfo(struct dcesrv_call_state *dce_call, TA
/* pull all the user attributes */
ret = gendb_search_dn(a_state->sam_ctx, mem_ctx,
- a_state->account_dn ,&res, attrs);
+ a_state->account_dn, &res, attrs);
+ if (ret == 0) {
+ return NT_STATUS_NO_SUCH_USER;
+ }
if (ret != 1) {
return NT_STATUS_INTERNAL_DB_CORRUPTION;
}