diff options
author | Günther Deschner <gd@samba.org> | 2009-06-07 02:02:26 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2009-06-07 02:24:21 +0200 |
commit | fbb1e990ab3915956217c2747a983e9ae0469fd3 (patch) | |
tree | a69c594a0b06f32f482bb6958d40d1ca93f6f3d2 | |
parent | a783b1e4dab4617e764ced86298c51ea57f6cb98 (diff) | |
download | samba-fbb1e990ab3915956217c2747a983e9ae0469fd3.tar.gz samba-fbb1e990ab3915956217c2747a983e9ae0469fd3.tar.bz2 samba-fbb1e990ab3915956217c2747a983e9ae0469fd3.zip |
s3-samr: fix return code of _samr_LookupRids when run with pdb_ldap.
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
-rw-r--r-- | source3/passdb/pdb_ldap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/passdb/pdb_ldap.c b/source3/passdb/pdb_ldap.c index 0bebcc7c2c..2272aedf13 100644 --- 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; } + if (num_rids == 0) { + result = NT_STATUS_NONE_MAPPED; + goto done; + } + for (i=0; i<num_rids; i++) attrs[i] = SID_NAME_UNKNOWN; |