summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-14 09:41:42 +0200
committerAndrew Bartlett <abartlet@samba.org>2010-10-15 08:36:01 +1100
commita0e9814c0d50ee822188e2bd6be8c4879aaebacc (patch)
tree79670d9c58f88ae6007b17ab240a1e64ed33c05e /source4/auth
parentc2533f94b561e9b22d621b7515c6606d39ffec89 (diff)
downloadsamba-a0e9814c0d50ee822188e2bd6be8c4879aaebacc.tar.gz
samba-a0e9814c0d50ee822188e2bd6be8c4879aaebacc.tar.bz2
samba-a0e9814c0d50ee822188e2bd6be8c4879aaebacc.zip
s4:dsdb - remove "samdb_result_uint", "samdb_result_int64", "samdb_result_uint64" and "samdb_result_string"
We have ldb_msg_find_attr_as_* calls which do exactly the same. Therefore this reduces only code redundancies. Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/sam.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source4/auth/sam.c b/source4/auth/sam.c
index de794cc090..c83a7d478f 100644
--- a/source4/auth/sam.c
+++ b/source4/auth/sam.c
@@ -175,7 +175,7 @@ _PUBLIC_ NTSTATUS authsam_account_ok(TALLOC_CTX *mem_ctx,
must_change_time = samdb_result_force_password_change(sam_ctx, mem_ctx,
domain_dn, msg);
- workstation_list = samdb_result_string(msg, "userWorkstations", NULL);
+ workstation_list = ldb_msg_find_attr_as_string(msg, "userWorkstations", NULL);
/* Quit if the account was disabled. */
if (acct_flags & ACB_DISABLED) {
@@ -439,7 +439,7 @@ _PUBLIC_ NTSTATUS authsam_make_server_info(TALLOC_CTX *mem_ctx,
primary_group_sid = dom_sid_add_rid(server_info,
domain_sid,
- samdb_result_uint(msg, "primaryGroupID", ~0));
+ ldb_msg_find_attr_as_uint(msg, "primaryGroupID", ~0));
NT_STATUS_HAVE_NO_MEMORY_AND_FREE(primary_group_sid, server_info);
/* Filter out builtin groups from this token. We will search
@@ -493,32 +493,32 @@ _PUBLIC_ NTSTATUS authsam_make_server_info(TALLOC_CTX *mem_ctx,
server_info->n_domain_groups = num_groupSIDs;
server_info->account_name = talloc_steal(server_info,
- samdb_result_string(msg, "sAMAccountName", NULL));
+ ldb_msg_find_attr_as_string(msg, "sAMAccountName", NULL));
server_info->domain_name = talloc_strdup(server_info, domain_name);
NT_STATUS_HAVE_NO_MEMORY_AND_FREE(server_info->domain_name,
server_info);
- str = samdb_result_string(msg, "displayName", "");
+ str = ldb_msg_find_attr_as_string(msg, "displayName", "");
server_info->full_name = talloc_strdup(server_info, str);
NT_STATUS_HAVE_NO_MEMORY_AND_FREE(server_info->full_name, server_info);
- str = samdb_result_string(msg, "scriptPath", "");
+ str = ldb_msg_find_attr_as_string(msg, "scriptPath", "");
server_info->logon_script = talloc_strdup(server_info, str);
NT_STATUS_HAVE_NO_MEMORY_AND_FREE(server_info->logon_script,
server_info);
- str = samdb_result_string(msg, "profilePath", "");
+ str = ldb_msg_find_attr_as_string(msg, "profilePath", "");
server_info->profile_path = talloc_strdup(server_info, str);
NT_STATUS_HAVE_NO_MEMORY_AND_FREE(server_info->profile_path,
server_info);
- str = samdb_result_string(msg, "homeDirectory", "");
+ str = ldb_msg_find_attr_as_string(msg, "homeDirectory", "");
server_info->home_directory = talloc_strdup(server_info, str);
NT_STATUS_HAVE_NO_MEMORY_AND_FREE(server_info->home_directory,
server_info);
- str = samdb_result_string(msg, "homeDrive", "");
+ str = ldb_msg_find_attr_as_string(msg, "homeDrive", "");
server_info->home_drive = talloc_strdup(server_info, str);
NT_STATUS_HAVE_NO_MEMORY_AND_FREE(server_info->home_drive, server_info);
@@ -537,8 +537,8 @@ _PUBLIC_ NTSTATUS authsam_make_server_info(TALLOC_CTX *mem_ctx,
server_info->force_password_change
= samdb_result_force_password_change(sam_ctx, mem_ctx,
domain_dn, msg);
- server_info->logon_count = samdb_result_uint(msg, "logonCount", 0);
- server_info->bad_password_count = samdb_result_uint(msg, "badPwdCount",
+ server_info->logon_count = ldb_msg_find_attr_as_uint(msg, "logonCount", 0);
+ server_info->bad_password_count = ldb_msg_find_attr_as_uint(msg, "badPwdCount",
0);
server_info->acct_flags = samdb_result_acct_flags(sam_ctx, mem_ctx,