summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-02-16 15:40:44 +1100
committerAndrew Tridgell <tridge@samba.org>2010-02-16 21:10:51 +1100
commitb630530730a710b7e850be2f848b1b85dbc25b4d (patch)
treece0c7edc9073fd1b4221e1e87043b4d5a6a35202 /source4/auth
parent8f4a34272eb26e7c86ce8c0e158b5f6eabd10234 (diff)
downloadsamba-b630530730a710b7e850be2f848b1b85dbc25b4d.tar.gz
samba-b630530730a710b7e850be2f848b1b85dbc25b4d.tar.bz2
samba-b630530730a710b7e850be2f848b1b85dbc25b4d.zip
s4-dsdb: added dsdb_search_one() and cleanup dsdb_find_dn_by_guid()
dsdb_find_dn_by_guid() now takes a struct GUID instead of a guid_string. All the callers in fact wanted a struct GUID, so we now avoid the extra conversion. Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/ntlm/auth_sam.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/auth/ntlm/auth_sam.c b/source4/auth/ntlm/auth_sam.c
index baa95f7380..f476e1c3b2 100644
--- a/source4/auth/ntlm/auth_sam.c
+++ b/source4/auth/ntlm/auth_sam.c
@@ -28,6 +28,7 @@
#include "auth/ntlm/auth_proto.h"
#include "auth/auth_sam.h"
#include "dsdb/samdb/samdb.h"
+#include "dsdb/common/util.h"
#include "param/param.h"
extern const char *user_attrs[];
@@ -45,10 +46,11 @@ static NTSTATUS authsam_search_account(TALLOC_CTX *mem_ctx, struct ldb_context *
int ret;
/* pull the user attributes */
- ret = gendb_search_single_extended_dn(sam_ctx, mem_ctx, domain_dn, LDB_SCOPE_SUBTREE,
- ret_msg, user_attrs,
- "(&(sAMAccountName=%s)(objectclass=user))",
- ldb_binary_encode_string(mem_ctx, account_name));
+ ret = dsdb_search_one(sam_ctx, mem_ctx, ret_msg, domain_dn, LDB_SCOPE_SUBTREE,
+ user_attrs,
+ DSDB_SEARCH_SHOW_EXTENDED_DN,
+ "(&(sAMAccountName=%s)(objectclass=user))",
+ ldb_binary_encode_string(mem_ctx, account_name));
if (ret == LDB_ERR_NO_SUCH_OBJECT) {
DEBUG(3,("sam_search_user: Couldn't find user [%s] in samdb, under %s\n",
account_name, ldb_dn_get_linearized(domain_dn)));