version 1.1, 2012/02/21 16:23:02
|
version 1.1.1.3, 2013/07/22 10:46:12
|
Line 1
|
Line 1
|
/* |
/* |
* Copyright (c) 1999-2005, 2007-2011 Todd C. Miller <Todd.Miller@courtesan.com> | * Copyright (c) 1999-2005, 2007-2012 Todd C. Miller <Todd.Miller@courtesan.com> |
* |
* |
* Permission to use, copy, modify, and distribute this software for any |
* Permission to use, copy, modify, and distribute this software for any |
* purpose with or without fee is hereby granted, provided that the above |
* purpose with or without fee is hereby granted, provided that the above |
Line 21
|
Line 21
|
#include <config.h> |
#include <config.h> |
|
|
#include <sys/types.h> |
#include <sys/types.h> |
#include <sys/param.h> |
|
#include <stdio.h> |
#include <stdio.h> |
#ifdef STDC_HEADERS |
#ifdef STDC_HEADERS |
# include <stdlib.h> |
# include <stdlib.h> |
Line 51
|
Line 50
|
* http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/libs/basetrf1/authenticate.htm |
* http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/libs/basetrf1/authenticate.htm |
*/ |
*/ |
int |
int |
aixauth_verify(struct passwd *pw, char *prompt, sudo_auth *auth) | sudo_aix_verify(struct passwd *pw, char *prompt, sudo_auth *auth) |
{ |
{ |
char *pass, *message = NULL; |
char *pass, *message = NULL; |
int result = 1, reenter = 0; |
int result = 1, reenter = 0; |
int rval = AUTH_SUCCESS; |
int rval = AUTH_SUCCESS; |
|
debug_decl(sudo_aix_verify, SUDO_DEBUG_AUTH) |
|
|
do { |
do { |
pass = auth_getpass(prompt, def_passwd_timeout * 60, |
pass = auth_getpass(prompt, def_passwd_timeout * 60, |
Line 84 aixauth_verify(struct passwd *pw, char *prompt, sudo_a
|
Line 84 aixauth_verify(struct passwd *pw, char *prompt, sudo_a
|
rval = pass ? AUTH_FAILURE : AUTH_INTR; |
rval = pass ? AUTH_FAILURE : AUTH_INTR; |
} |
} |
efree(message); |
efree(message); |
return rval; | debug_return_int(rval); |
} |
} |
|
|
int |
int |
aixauth_cleanup(struct passwd *pw, sudo_auth *auth) | sudo_aix_cleanup(struct passwd *pw, sudo_auth *auth) |
{ |
{ |
|
debug_decl(sudo_aix_cleanup, SUDO_DEBUG_AUTH) |
|
|
/* Unset AUTHSTATE as it may not be correct for the runas user. */ |
/* Unset AUTHSTATE as it may not be correct for the runas user. */ |
unsetenv("AUTHSTATE"); | sudo_unsetenv("AUTHSTATE"); |
|
|
return AUTH_SUCCESS; | debug_return_int(AUTH_SUCCESS); |
} |
} |