/****************************************************************************
- 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];
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;
}
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);
-}
-
}
/****************************************************************************
- 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)
/****************************************************************************
- 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];
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;
}
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);
-}
-
}
/****************************************************************************
- 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)