summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2001-10-29 22:28:21 +0000
committerAndrew Bartlett <abartlet@samba.org>2001-10-29 22:28:21 +0000
commit11dc29786ed7844440827aca6a07901ebcb56157 (patch)
tree813df7041af81f26b526c00ce049f58fb5d66b0c
parent53ec47a209364db0861b85f8c70922168b271a6b (diff)
downloadsamba-11dc29786ed7844440827aca6a07901ebcb56157.tar.gz
samba-11dc29786ed7844440827aca6a07901ebcb56157.tar.bz2
samba-11dc29786ed7844440827aca6a07901ebcb56157.zip
Fix up auth_smbpasswd.c to use the password interface, rather than the
structures directly. Andrew Bartlett (This used to be commit c2dc24ab6370236437b72b929e2a56e174163d78)
-rw-r--r--source3/auth/auth_sam.c16
-rw-r--r--source3/smbd/auth_smbpasswd.c16
2 files changed, 16 insertions, 16 deletions
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 6bc3793666..84ca8d03be 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -202,11 +202,11 @@ NTSTATUS sam_account_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user
if (!user_info || !sampass)
return NT_STATUS_LOGON_FAILURE;
- DEBUG(4,("smb_password_ok: Checking SMB password for user %s\n",sampass->username));
+ DEBUG(4,("smb_password_ok: Checking SMB password for user %s\n",pdb_get_username(sampass)));
/* Quit if the account was disabled. */
if (acct_ctrl & ACB_DISABLED) {
- DEBUG(1,("Account for user '%s' was disabled.\n", sampass->username));
+ DEBUG(1,("Account for user '%s' was disabled.\n", pdb_get_username(sampass)));
return NT_STATUS_ACCOUNT_DISABLED;
}
@@ -214,7 +214,7 @@ NTSTATUS sam_account_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user
kickoff_time = pdb_get_kickoff_time(sampass);
if (kickoff_time != 0 && time(NULL) > kickoff_time) {
- DEBUG(1,("Account for user '%s' has expried.\n", sampass->username));
+ DEBUG(1,("Account for user '%s' has expried.\n", pdb_get_username(sampass)));
DEBUG(3,("Account expired at '%ld' unix time.\n", (long)kickoff_time));
return NT_STATUS_ACCOUNT_EXPIRED;
}
@@ -253,30 +253,30 @@ NTSTATUS sam_account_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user
/* check for immediate expiry "must change at next logon" */
if (must_change_time == 0 && last_set_time != 0) {
- DEBUG(1,("Account for user '%s' password must change!.\n", sampass->username));
+ DEBUG(1,("Account for user '%s' password must change!.\n", pdb_get_username(sampass)));
return NT_STATUS_PASSWORD_MUST_CHANGE;
}
/* check for expired password */
if (must_change_time < time(NULL) && must_change_time != 0) {
- DEBUG(1,("Account for user '%s' password expired!.\n", sampass->username));
+ DEBUG(1,("Account for user '%s' password expired!.\n", pdb_get_username(sampass)));
DEBUG(1,("Password expired at '%s' (%ld) unix time.\n", http_timestring(must_change_time), (long)must_change_time));
return NT_STATUS_PASSWORD_EXPIRED;
}
}
if (acct_ctrl & ACB_DOMTRUST) {
- DEBUG(2,("session_trust_account: Domain trust account %s denied by server\n", sampass->username));
+ DEBUG(2,("session_trust_account: Domain trust account %s denied by server\n", pdb_get_username(sampass)));
return NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT;
}
if (acct_ctrl & ACB_SVRTRUST) {
- DEBUG(2,("session_trust_account: Server trust account %s denied by server\n", sampass->username));
+ DEBUG(2,("session_trust_account: Server trust account %s denied by server\n", pdb_get_username(sampass)));
return NT_STATUS_NOLOGON_SERVER_TRUST_ACCOUNT;
}
if (acct_ctrl & ACB_WSTRUST) {
- DEBUG(4,("session_trust_account: Wksta trust account %s denied by server\n", sampass->username));
+ DEBUG(4,("session_trust_account: Wksta trust account %s denied by server\n", pdb_get_username(sampass)));
return NT_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT;
}
diff --git a/source3/smbd/auth_smbpasswd.c b/source3/smbd/auth_smbpasswd.c
index 6bc3793666..84ca8d03be 100644
--- a/source3/smbd/auth_smbpasswd.c
+++ b/source3/smbd/auth_smbpasswd.c
@@ -202,11 +202,11 @@ NTSTATUS sam_account_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user
if (!user_info || !sampass)
return NT_STATUS_LOGON_FAILURE;
- DEBUG(4,("smb_password_ok: Checking SMB password for user %s\n",sampass->username));
+ DEBUG(4,("smb_password_ok: Checking SMB password for user %s\n",pdb_get_username(sampass)));
/* Quit if the account was disabled. */
if (acct_ctrl & ACB_DISABLED) {
- DEBUG(1,("Account for user '%s' was disabled.\n", sampass->username));
+ DEBUG(1,("Account for user '%s' was disabled.\n", pdb_get_username(sampass)));
return NT_STATUS_ACCOUNT_DISABLED;
}
@@ -214,7 +214,7 @@ NTSTATUS sam_account_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user
kickoff_time = pdb_get_kickoff_time(sampass);
if (kickoff_time != 0 && time(NULL) > kickoff_time) {
- DEBUG(1,("Account for user '%s' has expried.\n", sampass->username));
+ DEBUG(1,("Account for user '%s' has expried.\n", pdb_get_username(sampass)));
DEBUG(3,("Account expired at '%ld' unix time.\n", (long)kickoff_time));
return NT_STATUS_ACCOUNT_EXPIRED;
}
@@ -253,30 +253,30 @@ NTSTATUS sam_account_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user
/* check for immediate expiry "must change at next logon" */
if (must_change_time == 0 && last_set_time != 0) {
- DEBUG(1,("Account for user '%s' password must change!.\n", sampass->username));
+ DEBUG(1,("Account for user '%s' password must change!.\n", pdb_get_username(sampass)));
return NT_STATUS_PASSWORD_MUST_CHANGE;
}
/* check for expired password */
if (must_change_time < time(NULL) && must_change_time != 0) {
- DEBUG(1,("Account for user '%s' password expired!.\n", sampass->username));
+ DEBUG(1,("Account for user '%s' password expired!.\n", pdb_get_username(sampass)));
DEBUG(1,("Password expired at '%s' (%ld) unix time.\n", http_timestring(must_change_time), (long)must_change_time));
return NT_STATUS_PASSWORD_EXPIRED;
}
}
if (acct_ctrl & ACB_DOMTRUST) {
- DEBUG(2,("session_trust_account: Domain trust account %s denied by server\n", sampass->username));
+ DEBUG(2,("session_trust_account: Domain trust account %s denied by server\n", pdb_get_username(sampass)));
return NT_STATUS_NOLOGON_INTERDOMAIN_TRUST_ACCOUNT;
}
if (acct_ctrl & ACB_SVRTRUST) {
- DEBUG(2,("session_trust_account: Server trust account %s denied by server\n", sampass->username));
+ DEBUG(2,("session_trust_account: Server trust account %s denied by server\n", pdb_get_username(sampass)));
return NT_STATUS_NOLOGON_SERVER_TRUST_ACCOUNT;
}
if (acct_ctrl & ACB_WSTRUST) {
- DEBUG(4,("session_trust_account: Wksta trust account %s denied by server\n", sampass->username));
+ DEBUG(4,("session_trust_account: Wksta trust account %s denied by server\n", pdb_get_username(sampass)));
return NT_STATUS_NOLOGON_WORKSTATION_TRUST_ACCOUNT;
}