summaryrefslogtreecommitdiff
path: root/source3/auth
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2001-08-27 19:46:22 +0000
committerAndrew Tridgell <tridge@samba.org>2001-08-27 19:46:22 +0000
commitb031af348c7dcc8c74bf49945211c466b8eca079 (patch)
treec6a20abba3c8432ad2980beeab9e1d2a8528f3a4 /source3/auth
parent1d726fe0e054be9017309186c24b24d032e85636 (diff)
downloadsamba-b031af348c7dcc8c74bf49945211c466b8eca079.tar.gz
samba-b031af348c7dcc8c74bf49945211c466b8eca079.tar.bz2
samba-b031af348c7dcc8c74bf49945211c466b8eca079.zip
converted another bunch of stuff to NTSTATUS
(This used to be commit 1d36250e338ae0ff9fbbf86019809205dd97d05e)
Diffstat (limited to 'source3/auth')
-rw-r--r--source3/auth/auth.c16
-rw-r--r--source3/auth/auth_rhosts.c2
-rw-r--r--source3/auth/auth_sam.c8
-rw-r--r--source3/auth/auth_server.c2
-rw-r--r--source3/auth/auth_unix.c2
-rw-r--r--source3/auth/auth_util.c2
-rw-r--r--source3/auth/pampass.c20
-rw-r--r--source3/auth/pass_check.c2
8 files changed, 27 insertions, 27 deletions
diff --git a/source3/auth/auth.c b/source3/auth/auth.c
index ec493b7c06..d6bc8aeadc 100644
--- a/source3/auth/auth.c
+++ b/source3/auth/auth.c
@@ -68,15 +68,15 @@ NTSTATUS check_password(const auth_usersupplied_info *user_info,
return NT_STATUS_LOGON_FAILURE;
}
- if (nt_status != NT_STATUS_NOPROBLEMO) {
+ if (nt_status != NT_STATUS_OK) {
nt_status = check_rhosts_security(user_info, server_info);
}
- if ((lp_security() == SEC_DOMAIN) && (nt_status != NT_STATUS_NOPROBLEMO)) {
+ if ((lp_security() == SEC_DOMAIN) && (nt_status != NT_STATUS_OK)) {
nt_status = check_domain_security(user_info, server_info);
}
- if ((lp_security() == SEC_SERVER) && (nt_status != NT_STATUS_NOPROBLEMO)) {
+ if ((lp_security() == SEC_SERVER) && (nt_status != NT_STATUS_OK)) {
nt_status = check_server_security(user_info, server_info);
}
@@ -84,7 +84,7 @@ NTSTATUS check_password(const auth_usersupplied_info *user_info,
smb_user_control(user_info->smb_username.str, nt_status);
}
- if (nt_status != NT_STATUS_NOPROBLEMO) {
+ if (nt_status != NT_STATUS_OK) {
if ((user_info->plaintext_password.len > 0)
&& (!lp_plaintext_to_smbpasswd())) {
nt_status = check_unix_security(user_info, server_info);
@@ -94,14 +94,14 @@ NTSTATUS check_password(const auth_usersupplied_info *user_info,
}
}
- if ((nt_status == NT_STATUS_NOPROBLEMO) && !done_pam) {
+ if ((nt_status == NT_STATUS_OK) && !done_pam) {
/* We might not be root if we are an RPC call */
become_root();
nt_status = smb_pam_accountcheck(user_info->smb_username.str);
unbecome_root();
}
- if (nt_status == NT_STATUS_NOPROBLEMO) {
+ if (nt_status == NT_STATUS_OK) {
DEBUG(5, ("check_password: Password for user %s suceeded\n", user_info->smb_username.str));
} else {
DEBUG(3, ("check_password: Password for user %s FAILED with error %s\n", user_info->smb_username.str, get_nt_error_msg(nt_status)));
@@ -233,11 +233,11 @@ BOOL password_ok(char *user, char *password, int pwlen)
/* The password could be either NTLM or plain LM. Try NTLM first, but fall-through as
required. */
- if (pass_check_smb(user, lp_workgroup(), NULL, 0, (unsigned char *)password, pwlen) == NT_STATUS_NOPROBLEMO) {
+ if (pass_check_smb(user, lp_workgroup(), NULL, 0, (unsigned char *)password, pwlen) == NT_STATUS_OK) {
return True;
}
- if (pass_check_smb(user, lp_workgroup(), (unsigned char *)password, pwlen, NULL, 0) == NT_STATUS_NOPROBLEMO) {
+ if (pass_check_smb(user, lp_workgroup(), (unsigned char *)password, pwlen, NULL, 0) == NT_STATUS_OK) {
return True;
}
diff --git a/source3/auth/auth_rhosts.c b/source3/auth/auth_rhosts.c
index f11f9cf777..a4914f2ef1 100644
--- a/source3/auth/auth_rhosts.c
+++ b/source3/auth/auth_rhosts.c
@@ -175,7 +175,7 @@ uint32 check_rhosts_security(const auth_usersupplied_info *user_info,
become_root();
if (check_hosts_equiv(user_info->smb_username.str)) {
- nt_status = NT_STATUS_NOPROBLEMO;
+ nt_status = NT_STATUS_OK;
}
unbecome_root();
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index 1a5d02e4a4..5484758167 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -127,7 +127,7 @@ uint32 smb_password_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user_
if (lp_null_passwords())
{
DEBUG(3,("Account for user '%s' has no password and null passwords are allowed.\n", user_info->smb_username.str));
- return(NT_STATUS_NOPROBLEMO);
+ return(NT_STATUS_OK);
}
else
{
@@ -156,7 +156,7 @@ uint32 smb_password_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user_
user_info->requested_domain.str,
(char *)server_info->session_key))
{
- return NT_STATUS_NOPROBLEMO;
+ return NT_STATUS_OK;
}
DEBUG(4,("smb_password_ok: NTLMv2 password check failed\n"));
@@ -169,7 +169,7 @@ uint32 smb_password_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user_
nt_pw, user_info->chal,
server_info->session_key)) {
DEBUG(4,("smb_password_ok: NT MD4 password check succeeded\n"));
- return NT_STATUS_NOPROBLEMO;
+ return NT_STATUS_OK;
} else {
DEBUG(4,("smb_password_ok: NT MD4 password check failed\n"));
return NT_STATUS_WRONG_PASSWORD;
@@ -185,7 +185,7 @@ uint32 smb_password_ok(SAM_ACCOUNT *sampass, const auth_usersupplied_info *user_
lm_pw, user_info->chal,
server_info->session_key)) {
DEBUG(4,("smb_password_ok: LM password check succeeded\n"));
- return NT_STATUS_NOPROBLEMO;
+ return NT_STATUS_OK;
} else {
DEBUG(4,("smb_password_ok: LM password check failed\n"));
return NT_STATUS_WRONG_PASSWORD;
diff --git a/source3/auth/auth_server.c b/source3/auth/auth_server.c
index ad66f0c4ac..9636094fa3 100644
--- a/source3/auth/auth_server.c
+++ b/source3/auth/auth_server.c
@@ -214,7 +214,7 @@ use this machine as the password server.\n"));
/* Make this cli_nt_error() when the conversion is in */
nt_status = NT_STATUS_LOGON_FAILURE;
} else {
- nt_status = NT_STATUS_NOPROBLEMO;
+ nt_status = NT_STATUS_OK;
}
/* if logged in as guest then reject */
diff --git a/source3/auth/auth_unix.c b/source3/auth/auth_unix.c
index 89e670747f..fda44fd91c 100644
--- a/source3/auth/auth_unix.c
+++ b/source3/auth/auth_unix.c
@@ -76,7 +76,7 @@ uint32 check_unix_security(const auth_usersupplied_info *user_info, auth_servers
nt_status = (pass_check(user_info->smb_username.str, user_info->plaintext_password.str,
user_info->plaintext_password.len,
lp_update_encrypted() ? update_smbpassword_file : NULL)
- ? NT_STATUS_NOPROBLEMO : NT_STATUS_LOGON_FAILURE);
+ ? NT_STATUS_OK : NT_STATUS_LOGON_FAILURE);
unbecome_root();
return nt_status;
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 4a0f45f843..5ccf963889 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -105,7 +105,7 @@ void smb_user_control(char *unix_user, uint32 nt_status)
{
struct passwd *pwd=NULL;
- if(nt_status == NT_STATUS_NOPROBLEMO) {
+ if(nt_status == NT_STATUS_OK) {
/*
* User validated ok against Domain controller.
* If the admin wants us to try and create a UNIX
diff --git a/source3/auth/pampass.c b/source3/auth/pampass.c
index 418c618af2..359ed02b29 100644
--- a/source3/auth/pampass.c
+++ b/source3/auth/pampass.c
@@ -88,7 +88,7 @@ static BOOL smb_pam_nt_status_error_handler(pam_handle_t *pamh, int pam_error,
if (smb_pam_error_handler(pamh, pam_error, msg, dbglvl))
return True;
- if (*nt_status == NT_STATUS_NOPROBLEMO) {
+ if (*nt_status == NT_STATUS_OK) {
/* Complain LOUDLY */
DEBUG(0, ("smb_pam_nt_status_error_handler: PAM: BUG: PAM and NT_STATUS \
error MISMATCH, forcing to NT_STATUS_LOGON_FAILURE"));
@@ -533,7 +533,7 @@ static uint32 smb_pam_auth(pam_handle_t *pamh, char *user)
break;
case PAM_SUCCESS:
DEBUG(4, ("smb_pam_auth: PAM: User %s Authenticated OK\n", user));
- nt_status = NT_STATUS_NOPROBLEMO;
+ nt_status = NT_STATUS_OK;
break;
default:
DEBUG(0, ("smb_pam_auth: PAM: UNKNOWN ERROR while authenticating user %s\n", user));
@@ -578,7 +578,7 @@ static uint32 smb_pam_account(pam_handle_t *pamh, char * user)
break;
case PAM_SUCCESS:
DEBUG(4, ("smb_pam_account: PAM: Account OK for User: %s\n", user));
- nt_status = NT_STATUS_NOPROBLEMO;
+ nt_status = NT_STATUS_OK;
break;
default:
nt_status = NT_STATUS_ACCOUNT_DISABLED;
@@ -625,7 +625,7 @@ static uint32 smb_pam_setcred(pam_handle_t *pamh, char * user)
break;
case PAM_SUCCESS:
DEBUG(4, ("smb_pam_setcred: PAM: SetCredentials OK for User: %s\n", user));
- nt_status = NT_STATUS_NOPROBLEMO;
+ nt_status = NT_STATUS_OK;
break;
default:
DEBUG(0, ("smb_pam_setcred: PAM: UNKNOWN PAM ERROR (%d) during SetCredentials for User: %s\n", pam_error, user));
@@ -787,7 +787,7 @@ uint32 smb_pam_accountcheck(char * user)
/* Ignore PAM if told to. */
if (!lp_obey_pam_restrictions())
- return NT_STATUS_NOPROBLEMO;
+ return NT_STATUS_OK;
if ((pconv = smb_setup_pam_conv(smb_pam_conv, user, NULL, NULL)) == NULL)
return False;
@@ -795,7 +795,7 @@ uint32 smb_pam_accountcheck(char * user)
if (!smb_pam_start(&pamh, user, NULL, pconv))
return NT_STATUS_ACCOUNT_DISABLED;
- if ((nt_status = smb_pam_account(pamh, user)) != NT_STATUS_NOPROBLEMO)
+ if ((nt_status = smb_pam_account(pamh, user)) != NT_STATUS_OK)
DEBUG(0, ("smb_pam_accountcheck: PAM: Account Validation Failed - Rejecting User %s!\n", user));
smb_pam_end(pamh, pconv);
@@ -824,19 +824,19 @@ uint32 smb_pam_passcheck(char * user, char * password)
if (!smb_pam_start(&pamh, user, NULL, pconv))
return NT_STATUS_LOGON_FAILURE;
- if ((nt_status = smb_pam_auth(pamh, user)) != NT_STATUS_NOPROBLEMO) {
+ if ((nt_status = smb_pam_auth(pamh, user)) != NT_STATUS_OK) {
DEBUG(0, ("smb_pam_passcheck: PAM: smb_pam_auth failed - Rejecting User %s !\n", user));
smb_pam_end(pamh, pconv);
return nt_status;
}
- if ((nt_status = smb_pam_account(pamh, user)) != NT_STATUS_NOPROBLEMO) {
+ if ((nt_status = smb_pam_account(pamh, user)) != NT_STATUS_OK) {
DEBUG(0, ("smb_pam_passcheck: PAM: smb_pam_account failed - Rejecting User %s !\n", user));
smb_pam_end(pamh, pconv);
return nt_status;
}
- if ((nt_status = smb_pam_setcred(pamh, user)) != NT_STATUS_NOPROBLEMO) {
+ if ((nt_status = smb_pam_setcred(pamh, user)) != NT_STATUS_OK) {
DEBUG(0, ("smb_pam_passcheck: PAM: smb_pam_setcred failed - Rejecting User %s !\n", user));
smb_pam_end(pamh, pconv);
return nt_status;
@@ -876,7 +876,7 @@ BOOL smb_pam_passchange(char * user, char * oldpassword, char * newpassword)
/* If PAM not used, no PAM restrictions on accounts. */
uint32 smb_pam_accountcheck(char * user)
{
- return NT_STATUS_NOPROBLEMO;
+ return NT_STATUS_OK;
}
/* If PAM not used, also no PAM restrictions on sessions. */
diff --git a/source3/auth/pass_check.c b/source3/auth/pass_check.c
index 677d298449..b6cc403b86 100644
--- a/source3/auth/pass_check.c
+++ b/source3/auth/pass_check.c
@@ -599,7 +599,7 @@ static BOOL password_check(char *password)
{
#ifdef WITH_PAM
- return (smb_pam_passcheck(this_user, password) == NT_STATUS_NOPROBLEMO);
+ return (smb_pam_passcheck(this_user, password) == NT_STATUS_OK);
#endif /* WITH_PAM */
#ifdef WITH_AFS