In struct sudo_auth, turn need_root and configured into flags and
add a flag to specify an auth method is running alone (the only one). Pass auth methods their sudo_auth pointer, not the data pointer. This allows us to get at the flags and tell if we are the only auth method. That, in turn, allows the method to be able to decide what should/should not be a fatal error. Currently only rfc1938 uses it this way, which allows us to kill the OTP_ONLY define and te hackery that went with it. With access to the sudo_auth struct, methods can also get at a string holding their cannonical name (useful in error messages).
This commit is contained in:
@@ -65,10 +65,10 @@ static const char rcsid[] = "$Sudo$";
|
||||
#endif /* lint */
|
||||
|
||||
int
|
||||
secureware_init(pw, promptp, data)
|
||||
secureware_init(pw, promptp, auth)
|
||||
struct passwd *pw;
|
||||
char **promptp;
|
||||
void **data;
|
||||
sudo_auth *auth;
|
||||
{
|
||||
#ifdef __alpha
|
||||
extern int crypt_type;
|
||||
@@ -80,10 +80,10 @@ secureware_init(pw, promptp, data)
|
||||
}
|
||||
|
||||
int
|
||||
secureware_verify(pw, pass, data)
|
||||
secureware_verify(pw, pass, auth)
|
||||
struct passwd *pw;
|
||||
char *pass;
|
||||
void **data;
|
||||
sudo_auth *auth;
|
||||
{
|
||||
#ifdef __alpha
|
||||
extern int crypt_type;
|
||||
|
Reference in New Issue
Block a user