diff options
author | Andrew Tridgell <tridge@samba.org> | 2004-05-27 04:13:58 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:56:19 -0500 |
commit | db3c011977e9aad535be298d64fa63af61c0669c (patch) | |
tree | 0add1b6fa4d8e2433caede7654a8c727ee4c5995 /source4/rpc_server/samr/samdb.c | |
parent | 39a236883ee4015980ff3d3cab8a8e5fec858502 (diff) | |
download | samba-db3c011977e9aad535be298d64fa63af61c0669c.tar.gz samba-db3c011977e9aad535be298d64fa63af61c0669c.tar.bz2 samba-db3c011977e9aad535be298d64fa63af61c0669c.zip |
r917: - added the start of a LSA server to samba4.
- added start of QueryDomainInfo in samr server
"net rpc info" from samba3 now works against a samba4 server. I
suspect join will work fairly soon.
(This used to be commit 0a2c6a1062d0e364356853001f5f39bdb542f453)
Diffstat (limited to 'source4/rpc_server/samr/samdb.c')
-rw-r--r-- | source4/rpc_server/samr/samdb.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source4/rpc_server/samr/samdb.c b/source4/rpc_server/samr/samdb.c index fd643c7bb0..12319cf84a 100644 --- a/source4/rpc_server/samr/samdb.c +++ b/source4/rpc_server/samr/samdb.c @@ -205,6 +205,26 @@ const char *samdb_search_string(void *ctx, return str; } +/* + return the count of the number of records in the sam matching the query +*/ +int samdb_search_count(void *ctx, + TALLOC_CTX *mem_ctx, + const char *basedn, + const char *format, ...) _PRINTF_ATTRIBUTE(4,5) +{ + va_list ap; + struct ldb_message **res; + const char * const attrs[] = { NULL }; + int ret; + + va_start(ap, format); + ret = samdb_search_v(ctx, mem_ctx, basedn, &res, attrs, format, ap); + va_end(ap); + + return ret; +} + /* search the sam for a single integer attribute in exactly 1 record |