summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-02-27 10:32:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:25 -0500
commite54786b53543b4667288c64abb55478fddd95061 (patch)
treec9641bd414989a72be6c425f9857f5731da74188 /source3/auth
parentbd97e1a5eae982feda5e5bbd08e7f4e3b6473baf (diff)
downloadsamba-e54786b53543b4667288c64abb55478fddd95061.tar.gz
samba-e54786b53543b4667288c64abb55478fddd95061.tar.bz2
samba-e54786b53543b4667288c64abb55478fddd95061.zip
r13711: * Correctly handle acb_info/acct_flags as uint32 not as uint16.
* Fix a couple of related parsing issues. * in the info3 reply in a samlogon, return the ACB-flags (instead of returning zero) Guenther (This used to be commit 5b89e8bc24f0fdc8b52d5c9e849aba723df34ea7)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth_sam.c4
-rw-r--r--source3/auth/auth_util.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index f06eb83ba1..740170d73d 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -40,7 +40,7 @@ static NTSTATUS sam_password_ok(const struct auth_context *auth_context,
DATA_BLOB *user_sess_key,
DATA_BLOB *lm_sess_key)
{
- uint16 acct_ctrl;
+ uint32 acct_ctrl;
const uint8 *lm_pw, *nt_pw;
const char *username = pdb_get_username(sampass);
@@ -116,7 +116,7 @@ static NTSTATUS sam_account_ok(TALLOC_CTX *mem_ctx,
struct samu *sampass,
const auth_usersupplied_info *user_info)
{
- uint16 acct_ctrl = pdb_get_acct_ctrl(sampass);
+ uint32 acct_ctrl = pdb_get_acct_ctrl(sampass);
char *workstation_list;
time_t kickoff_time;
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 2de362cabe..1f853e5eb9 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -1598,6 +1598,11 @@ NTSTATUS make_server_info_info3(TALLOC_CTX *mem_ctx,
return NT_STATUS_NO_MEMORY;
}
+ if (!pdb_set_acct_ctrl(sam_account, info3->acct_flags, PDB_CHANGED)) {
+ TALLOC_FREE(sam_account);
+ return NT_STATUS_NO_MEMORY;
+ }
+
result = make_server_info(NULL);
if (result == NULL) {
DEBUG(4, ("make_server_info failed!\n"));