Now that we always get back an NTSTATUS code actually pass it on to the
authorAndrew Bartlett <abartlet@samba.org>
Fri, 14 Sep 2001 10:38:40 +0000 (10:38 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 14 Sep 2001 10:38:40 +0000 (10:38 +0000)
auth subsytem.  Also kill off the (unneeded) wrapper fuction.

Andrew Bartlett
(This used to be commit 96f06b490ac5e9fd86debccf8d41675fa41f7726)

source3/auth/auth_server.c
source3/auth/auth_util.c
source3/smbd/auth_server.c
source3/smbd/auth_util.c

index b279152f7482525dfb3eec82049e2acebd3e53b9..7ed4cf60ad699cdf00c8f7c51a26b75bfa0f3d58 100644 (file)
@@ -110,10 +110,11 @@ struct cli_state *server_cryptkey(void)
 
 
 /****************************************************************************
- Validate a password with the password server.
+ Check for a valid username and password in security=server mode.
+  - Validate a password with the password server.
 ****************************************************************************/
 
-static NTSTATUS server_validate(const auth_usersupplied_info *user_info, auth_serversupplied_info *server_info)
+NTSTATUS check_server_security(const auth_usersupplied_info *user_info, auth_serversupplied_info *server_info)
 {
        struct cli_state *cli;
        static unsigned char badpass[24];
@@ -212,7 +213,7 @@ use this machine as the password server.\n"));
                               user_info->domain.str)) {
                DEBUG(1,("password server %s rejected the password\n", cli->desthost));
                /* Make this cli_nt_error() when the conversion is in */
-               nt_status = NT_STATUS_LOGON_FAILURE;
+               nt_status = cli_nt_error(cli);
        } else {
                nt_status = NT_STATUS_OK;
        }
@@ -228,17 +229,4 @@ use this machine as the password server.\n"));
        return(nt_status);
 }
 
-/****************************************************************************
- Check for a valid username and password in security=server mode.
-****************************************************************************/
-
-NTSTATUS check_server_security(const auth_usersupplied_info *user_info, auth_serversupplied_info *server_info)
-{
-       
-       if(lp_security() != SEC_SERVER)
-               return NT_STATUS_LOGON_FAILURE;
-       
-       return server_validate(user_info, server_info);
-}
-
 
index 28f58eb8aec16960959e62c4d73e8ec5aaa50c92..1967c32b9a16d694f15404a3377ce11e8fc77be9 100644 (file)
@@ -98,7 +98,7 @@ static int smb_delete_user(char *unix_user)
 }
 
 /****************************************************************************
- Add and Delete UNIX users on demand, based on NT_STATUS codes.
+ Add and Delete UNIX users on demand, based on NTSTATUS codes.
 ****************************************************************************/
 
 void smb_user_control(char *unix_user, NTSTATUS nt_status) 
index b279152f7482525dfb3eec82049e2acebd3e53b9..7ed4cf60ad699cdf00c8f7c51a26b75bfa0f3d58 100644 (file)
@@ -110,10 +110,11 @@ struct cli_state *server_cryptkey(void)
 
 
 /****************************************************************************
- Validate a password with the password server.
+ Check for a valid username and password in security=server mode.
+  - Validate a password with the password server.
 ****************************************************************************/
 
-static NTSTATUS server_validate(const auth_usersupplied_info *user_info, auth_serversupplied_info *server_info)
+NTSTATUS check_server_security(const auth_usersupplied_info *user_info, auth_serversupplied_info *server_info)
 {
        struct cli_state *cli;
        static unsigned char badpass[24];
@@ -212,7 +213,7 @@ use this machine as the password server.\n"));
                               user_info->domain.str)) {
                DEBUG(1,("password server %s rejected the password\n", cli->desthost));
                /* Make this cli_nt_error() when the conversion is in */
-               nt_status = NT_STATUS_LOGON_FAILURE;
+               nt_status = cli_nt_error(cli);
        } else {
                nt_status = NT_STATUS_OK;
        }
@@ -228,17 +229,4 @@ use this machine as the password server.\n"));
        return(nt_status);
 }
 
-/****************************************************************************
- Check for a valid username and password in security=server mode.
-****************************************************************************/
-
-NTSTATUS check_server_security(const auth_usersupplied_info *user_info, auth_serversupplied_info *server_info)
-{
-       
-       if(lp_security() != SEC_SERVER)
-               return NT_STATUS_LOGON_FAILURE;
-       
-       return server_validate(user_info, server_info);
-}
-
 
index 28f58eb8aec16960959e62c4d73e8ec5aaa50c92..1967c32b9a16d694f15404a3377ce11e8fc77be9 100644 (file)
@@ -98,7 +98,7 @@ static int smb_delete_user(char *unix_user)
 }
 
 /****************************************************************************
- Add and Delete UNIX users on demand, based on NT_STATUS codes.
+ Add and Delete UNIX users on demand, based on NTSTATUS codes.
 ****************************************************************************/
 
 void smb_user_control(char *unix_user, NTSTATUS nt_status)