git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a783b1e
)
s3-samr: fix return code of _samr_LookupRids when run with pdb_ldap.
author
Günther Deschner
<gd@samba.org>
Sun, 7 Jun 2009 00:02:26 +0000
(
02:02
+0200)
committer
Günther Deschner
<gd@samba.org>
Sun, 7 Jun 2009 00:24:21 +0000
(
02:24
+0200)
when _samr_LookupRids is called with no rids, it needs to return
NT_STATUS_NONE_MAPPED (not NT_STATUS_NO_MEMORY).
Found by RPC-SAMR torture test.
Guenther
source3/passdb/pdb_ldap.c
patch
|
blob
|
history
diff --git
a/source3/passdb/pdb_ldap.c
b/source3/passdb/pdb_ldap.c
index 0bebcc7c2ca7556c9a9e709fb13cf3273bbe109b..2272aedf134d4334e812e8fdda0186b57113a69d 100644
(file)
--- a/
source3/passdb/pdb_ldap.c
+++ b/
source3/passdb/pdb_ldap.c
@@
-3977,6
+3977,11
@@
static NTSTATUS ldapsam_lookup_rids(struct pdb_methods *methods,
goto done;
}
goto done;
}
+ if (num_rids == 0) {
+ result = NT_STATUS_NONE_MAPPED;
+ goto done;
+ }
+
for (i=0; i<num_rids; i++)
attrs[i] = SID_NAME_UNKNOWN;
for (i=0; i<num_rids; i++)
attrs[i] = SID_NAME_UNKNOWN;