version 1.7.2.3, 2001/03/21 19:46:22 |
version 1.7.2.4, 2001/05/07 21:09:26 |
|
|
|
|
#include <openssl/rsa.h> |
#include <openssl/rsa.h> |
|
|
|
#ifdef HAVE_LOGIN_CAP |
|
#include <login_cap.h> |
|
#endif |
|
#ifdef BSD_AUTH |
|
#include <bsd_auth.h> |
|
#endif |
|
|
typedef struct Authctxt Authctxt; |
typedef struct Authctxt Authctxt; |
struct Authctxt { |
struct Authctxt { |
int success; |
int success; |
|
|
char *service; |
char *service; |
struct passwd *pw; |
struct passwd *pw; |
char *style; |
char *style; |
|
#ifdef BSD_AUTH |
|
auth_session_t *as; |
|
#endif |
}; |
}; |
|
|
/* |
/* |
|
|
*/ |
*/ |
int auth_rhosts(struct passwd * pw, const char *client_user); |
int auth_rhosts(struct passwd * pw, const char *client_user); |
|
|
|
/* extended interface similar to auth_rhosts() */ |
|
int |
|
auth_rhosts2(struct passwd *pw, const char *client_user, const char *hostname, |
|
const char *ipaddr); |
|
|
/* |
/* |
* Tries to authenticate the user using the .rhosts file and the host using |
* Tries to authenticate the user using the .rhosts file and the host using |
* its host key. Returns true if authentication succeeds. |
* its host key. Returns true if authentication succeeds. |
|
|
* Tries to authenticate the user using password. Returns true if |
* Tries to authenticate the user using password. Returns true if |
* authentication succeeds. |
* authentication succeeds. |
*/ |
*/ |
int auth_password(struct passwd * pw, const char *password); |
int auth_password(Authctxt *authctxt, const char *password); |
|
|
/* |
/* |
* Performs the RSA authentication dialog with the client. This returns 0 if |
* Performs the RSA authentication dialog with the client. This returns 0 if |
|
|
|
|
Authctxt *authctxt_new(void); |
Authctxt *authctxt_new(void); |
void auth_log(Authctxt *authctxt, int authenticated, char *method, char *info); |
void auth_log(Authctxt *authctxt, int authenticated, char *method, char *info); |
void userauth_reply(Authctxt *authctxt, int authenticated); |
void userauth_finish(Authctxt *authctxt, int authenticated, char *method); |
int auth_root_allowed(char *method); |
int auth_root_allowed(char *method); |
|
|
int auth2_challenge(Authctxt *authctxt, char *devs); |
int auth2_challenge(Authctxt *authctxt, char *devs); |