/titanic_41/usr/src/cmd/ssh/sshd/ |
H A D | auth-krb5.c | 55 Authctxt *authctxt = (Authctxt *)context; in krb5_init() local 59 if (authctxt->krb5_ctx == NULL) { in krb5_init() 60 problem = krb5_init_context(&authctxt->krb5_ctx); in krb5_init() 63 krb5_init_ets(authctxt->krb5_ctx); in krb5_init() 66 fatal_add_cleanup(krb5_cleanup_proc, authctxt); in krb5_init() 78 auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client, krb5_data *reply) in auth_krb5() argument 90 problem = krb5_init(authctxt); in auth_krb5() 94 problem = krb5_auth_con_init(authctxt->krb5_ctx, in auth_krb5() 95 &authctxt->krb5_auth_ctx); in auth_krb5() 101 problem = krb5_auth_con_setaddrs_from_fd(authctxt->krb5_ctx, in auth_krb5() [all …]
|
H A D | auth-pam.c | 64 static char *get_method_name(Authctxt *authctxt); 75 get_method_name(Authctxt *authctxt) in get_method_name() argument 77 if (!authctxt) in get_method_name() 81 return (authctxt->v1_auth_name) ? authctxt->v1_auth_name : in get_method_name() 84 if (!authctxt->method || !authctxt->method->name) in get_method_name() 87 return authctxt->method->name; in get_method_name() 153 new_start_pam(Authctxt *authctxt, struct pam_conv *conv) in new_start_pam() argument 162 if (authctxt == NULL) in new_start_pam() 165 if (compat20 && authctxt->method == NULL) in new_start_pam() 169 svc = derive_pam_service_name(authctxt->method); in new_start_pam() [all …]
|
H A D | auth2.c | 90 static char *authmethods_check_abandonment(Authctxt *authctxt, 106 Authctxt *authctxt = authctxt_new(); in do_authentication2() local 108 x_authctxt = authctxt; /*XXX*/ in do_authentication2() 111 fatal_add_cleanup(audit_failed_login_cleanup, authctxt); in do_authentication2() 116 dispatch_run(DISPATCH_BLOCK, &authctxt->success, authctxt); in do_authentication2() 118 return (authctxt); in do_authentication2() 124 Authctxt *authctxt = ctxt; in input_service_request() local 130 if (authctxt == NULL) in input_service_request() 134 if (!authctxt->success) { in input_service_request() 157 Authctxt *authctxt = ctxt; in input_userauth_request() local [all …]
|
H A D | auth1.c | 74 do_authloop(Authctxt *authctxt) in do_authloop() argument 85 struct passwd *pw = authctxt->pw; in do_authloop() 88 authctxt->valid ? "" : "illegal user ", authctxt->user); in do_authloop() 95 auth_password(authctxt, "")) { in do_authloop() 96 auth_log(authctxt, 1, "without authentication", ""); in do_authloop() 114 authctxt->v1_auth_type = type = packet_read(); in do_authloop() 115 authctxt->v1_auth_name = get_authname(type); in do_authloop() 117 authctxt->attempt++; in do_authloop() 137 if (auth_krb4(authctxt, &tkt, in do_authloop() 158 if (auth_krb5(authctxt, &tkt, in do_authloop() [all …]
|
H A D | auth2-gss.c | 51 static void userauth_gssapi_finish(Authctxt *authctxt, Gssctxt *gssctxt); 54 userauth_gssapi_keyex(Authctxt *authctxt) in userauth_gssapi_keyex() argument 60 if (authctxt == NULL || authctxt->method == NULL) in userauth_gssapi_keyex() 73 buffer_put_cstring(&mic_data, authctxt->user); in userauth_gssapi_keyex() 74 buffer_put_cstring(&mic_data, authctxt->service); in userauth_gssapi_keyex() 75 buffer_put_cstring(&mic_data, authctxt->method->name); in userauth_gssapi_keyex() 91 userauth_gssapi_finish(authctxt, xxx_gssctxt); in userauth_gssapi_keyex() 106 userauth_gssapi_abandon(Authctxt *authctxt, Authmethod *method) in userauth_gssapi_abandon() argument 117 userauth_gssapi(Authctxt *authctxt) in userauth_gssapi() argument 172 ssh_gssapi_build_ctx((Gssctxt **)&authctxt->method->method_data, in userauth_gssapi() [all …]
|
H A D | auth-bsdauth.c | 35 bsdauth_init_ctx(Authctxt *authctxt) in bsdauth_init_ctx() argument 37 return authctxt; in bsdauth_init_ctx() 44 Authctxt *authctxt = ctx; in bsdauth_query() local 47 if (authctxt->as != NULL) { in bsdauth_query() 49 challenge = auth_getitem(authctxt->as, AUTHV_CHALLENGE); in bsdauth_query() 51 auth_close(authctxt->as); in bsdauth_query() 52 authctxt->as = NULL; in bsdauth_query() 59 authctxt->style ? authctxt->style : "<default>"); in bsdauth_query() 60 authctxt->as = auth_userchallenge(authctxt->user, in bsdauth_query() 61 authctxt->style, "auth-ssh", &challenge); in bsdauth_query() [all …]
|
H A D | auth2-chall.c | 158 auth2_challenge(Authctxt *authctxt, char *devs) in auth2_challenge() argument 161 authctxt->user ? authctxt->user : "<nouser>", in auth2_challenge() 164 if (authctxt->user == NULL || !devs) in auth2_challenge() 166 if (authctxt->method->method_data != NULL) { in auth2_challenge() 167 auth2_challenge_abandon(authctxt); in auth2_challenge() 168 authctxt->method->abandoned = 0; in auth2_challenge() 170 authctxt->method->method_data = (void *) kbdint_alloc(devs); in auth2_challenge() 171 auth2_challenge_start(authctxt); in auth2_challenge() 176 auth2_challenge_stop(Authctxt *authctxt) in auth2_challenge_stop() argument 180 if (authctxt->method->method_data != NULL) { in auth2_challenge_stop() [all …]
|
H A D | auth2-pam.c | 53 static void do_pam_kbdint(Authctxt *authctxt); 56 auth2_pam(Authctxt *authctxt) in auth2_pam() argument 58 if (authctxt->user == NULL) in auth2_pam() 60 if (authctxt->method == NULL) in auth2_pam() 63 conv2.appdata_ptr = authctxt; in auth2_pam() 64 new_start_pam(authctxt, &conv2); in auth2_pam() 66 authctxt->method->method_data = NULL; /* freed in the conv func */ in auth2_pam() 79 do_pam_kbdint(authctxt); in auth2_pam() 85 do_pam_kbdint(Authctxt *authctxt) in do_pam_kbdint() argument 88 pam_handle_t *pamh = authctxt->pam->h; in do_pam_kbdint() [all …]
|
H A D | auth-krb4.c | 50 Authctxt *authctxt = (Authctxt *)context; in krb4_init() local 55 if (!authctxt->krb4_ticket_file) { in krb4_init() 57 authctxt->krb4_ticket_file = xmalloc(MAXPATHLEN); in krb4_init() 62 snprintf(authctxt->krb4_ticket_file, MAXPATHLEN, "%s%u_%ld", in krb4_init() 63 tkt_root, authctxt->pw->pw_uid, (long)getpid()); in krb4_init() 64 krb_set_tkt_string(authctxt->krb4_ticket_file); in krb4_init() 68 fatal_add_cleanup(krb4_cleanup_proc, authctxt); in krb4_init() 72 if ((fd = mkstemp(authctxt->krb4_ticket_file)) != -1) { in krb4_init() 77 if (lstat(authctxt->krb4_ticket_file, &st) != -1) { in krb4_init() 79 st.st_uid == authctxt->pw->pw_uid) in krb4_init() [all …]
|
H A D | auth2-kbdint.c | 41 userauth_kbdint(Authctxt *authctxt) in userauth_kbdint() argument 45 if (!authctxt || !authctxt->method) in userauth_kbdint() 56 auth2_pam(authctxt); in userauth_kbdint() 59 auth2_challenge(authctxt, devs); in userauth_kbdint() 64 if (check_nt_auth(0, authctxt->pw) == 0) { in userauth_kbdint() 65 authctxt->method->authenticated = 0; in userauth_kbdint() 72 userauth_kbdint_abandon(Authctxt *authctxt, Authmethod *method) in userauth_kbdint_abandon() argument 75 kbdint_pam_abandon(authctxt, method); in userauth_kbdint_abandon() 77 auth2_challenge_abandon(authctxt); in userauth_kbdint_abandon()
|
H A D | auth-chall.c | 40 get_challenge(Authctxt *authctxt) in get_challenge() argument 49 if ((authctxt->kbdintctxt = device->init_ctx(authctxt)) == NULL) in get_challenge() 51 if (device->query(authctxt->kbdintctxt, &name, &info, in get_challenge() 53 device->free_ctx(authctxt->kbdintctxt); in get_challenge() 54 authctxt->kbdintctxt = NULL; in get_challenge() 70 verify_response(Authctxt *authctxt, const char *response) in verify_response() argument 77 if (authctxt->kbdintctxt == NULL) in verify_response() 80 res = device->respond(authctxt->kbdintctxt, 1, resp); in verify_response() 81 device->free_ctx(authctxt->kbdintctxt); in verify_response() 82 authctxt->kbdintctxt = NULL; in verify_response()
|
H A D | auth2-pubkey.c | 58 userauth_pubkey(Authctxt *authctxt) in userauth_pubkey() argument 68 if (!authctxt || !authctxt->method) in userauth_pubkey() 104 if (authctxt->method->method_data) { in userauth_pubkey() 114 prev_key = authctxt->method->method_data; in userauth_pubkey() 119 authctxt->method->abandons++; in userauth_pubkey() 120 authctxt->method->attempts++; in userauth_pubkey() 124 authctxt->method->method_data = NULL; in userauth_pubkey() 138 buffer_put_cstring(&b, authctxt->user); in userauth_pubkey() 142 authctxt->service); in userauth_pubkey() 155 if (user_key_allowed(authctxt->pw, key) && in userauth_pubkey() [all …]
|
H A D | auth.c | 239 Authctxt *authctxt = xmalloc(sizeof(*authctxt)); in authctxt_new() local 240 memset(authctxt, 0, sizeof(*authctxt)); in authctxt_new() 241 return authctxt; in authctxt_new() 245 auth_log(Authctxt *authctxt, int authenticated, char *method, char *info) in auth_log() argument 250 if (authctxt == NULL) in auth_log() 254 if (authenticated == 1 || !authctxt->valid) in auth_log() 256 else if (authctxt->failures >= AUTH_FAIL_LOG || in auth_log() 257 authctxt->attempt >= options.max_auth_tries_log || in auth_log() 258 authctxt->init_attempt >= options.max_init_auth_tries_log) in auth_log() 261 if (authctxt->method) { in auth_log() [all …]
|
H A D | auth-skey.c | 37 skey_init_ctx(Authctxt *authctxt) in skey_init_ctx() argument 39 return authctxt; in skey_init_ctx() 46 Authctxt *authctxt = ctx; in skey_query() local 51 if (skeychallenge(&skey, authctxt->user, challenge) == -1) in skey_query() 73 Authctxt *authctxt = ctx; in skey_respond() local 75 if (authctxt->valid && in skey_respond() 77 skey_haskey(authctxt->pw->pw_name) == 0 && in skey_respond() 78 skey_passcheck(authctxt->pw->pw_name, responses[0]) != -1) in skey_respond()
|
H A D | altprivsep.c | 182 extern void aps_monitor_loop(Authctxt *authctxt, pid_t child_pid); 189 static pid_t altprivsep_start_monitor(Authctxt **authctxt); 190 static void altprivsep_do_monitor(Authctxt *authctxt, pid_t child_pid); 229 altprivsep_start_monitor(Authctxt **authctxt) in altprivsep_start_monitor() argument 274 xxx_authctxt = *authctxt = aps_read_auth_context(); in altprivsep_start_monitor() 401 altprivsep_do_monitor(Authctxt *authctxt, pid_t child_pid) in altprivsep_do_monitor() argument 403 aps_monitor_loop(authctxt, child_pid); in altprivsep_do_monitor() 574 altprivsep_send_auth_context(Authctxt *authctxt) in altprivsep_send_auth_context() argument 579 altprivsep_packet_put_int(authctxt->pw->pw_uid); in altprivsep_send_auth_context() 580 altprivsep_packet_put_int(authctxt->pw->pw_gid); in altprivsep_send_auth_context() [all …]
|
H A D | auth2-passwd.c | 44 userauth_passwd(Authctxt *authctxt) in userauth_passwd() argument 50 if (!authctxt || !authctxt->method) in userauth_passwd() 60 check_nt_auth(1, authctxt->pw) && in userauth_passwd() 62 auth_password(authctxt, password) == 1) { in userauth_passwd() 63 authctxt->method->authenticated = 1; in userauth_passwd()
|
H A D | auth2-hostbased.c | 58 userauth_hostbased(Authctxt *authctxt) in userauth_hostbased() argument 68 if (!authctxt || !authctxt->method) in userauth_hostbased() 104 authctxt->service; in userauth_hostbased() 109 buffer_put_cstring(&b, authctxt->user); in userauth_hostbased() 121 if (hostbased_key_allowed(authctxt->pw, cuser, chost, key) && in userauth_hostbased() 137 authctxt->cuser = cuser; in userauth_hostbased() 138 if (!do_pam_non_initial_userauth(authctxt)) in userauth_hostbased() 142 authctxt->cuser = NULL; in userauth_hostbased() 147 authctxt->method->authenticated = 1; in userauth_hostbased()
|
H A D | auth-passwd.c | 88 auth_password(Authctxt *authctxt, const char *password) in auth_password() argument 93 return auth_pam_password(authctxt, password); in auth_password() 97 return auth_sia_password(authctxt, password); in auth_password() 99 struct passwd * pw = authctxt->pw; in auth_password() 126 int ret = auth_krb5_password(authctxt, password); in auth_password() 147 if (loginsuccess(authctxt->user, in auth_password() 156 int ret = auth_krb4_password(authctxt, password); in auth_password() 163 if (auth_userokay(pw->pw_name, authctxt->style, "auth-ssh", in auth_password()
|
H A D | auth2-none.c | 114 userauth_none(Authctxt *authctxt) in userauth_none() argument 118 if (!authctxt || !authctxt->method) in userauth_none() 124 if (check_nt_auth(1, authctxt->pw) == 0) in userauth_none() 127 authctxt->method->authenticated = auth_password(authctxt, ""); in userauth_none()
|
H A D | session.c | 240 do_authenticated(Authctxt *authctxt) in do_authenticated() argument 247 do_authenticated2(authctxt); in do_authenticated() 249 do_authenticated1(authctxt); in do_authenticated() 253 auth_sock_cleanup_proc(authctxt->pw); in do_authenticated() 256 krb4_cleanup_proc(authctxt); in do_authenticated() 260 krb5_cleanup_proc(authctxt); in do_authenticated() 271 do_authenticated1(Authctxt *authctxt) in do_authenticated1() argument 280 s->authctxt = authctxt; in do_authenticated1() 281 s->pw = authctxt->pw; in do_authenticated1() 385 if (auth_krb5_tgt(s->authctxt, &tgt)) in do_authenticated1() [all …]
|
H A D | gss-serv.c | 233 ssh_gssapi_storecreds(Gssctxt *ctx, Authctxt *authctxt) in ssh_gssapi_storecreds() argument 239 if (authctxt == NULL) { in ssh_gssapi_storecreds() 257 if (!authctxt->valid || authctxt->pw == NULL) { in ssh_gssapi_storecreds() 292 penv = fetch_pam_environment(authctxt); in ssh_gssapi_storecreds() 296 if (authctxt->pw->pw_uid != geteuid()) { in ssh_gssapi_storecreds() 297 temporarily_use_uid(authctxt->pw); in ssh_gssapi_storecreds()
|
/titanic_41/usr/src/cmd/ssh/ssh/ |
H A D | sshconnect2.c | 204 Authctxt *authctxt, Key *key, 229 int (*userauth)(Authctxt *authctxt); 230 void (*cleanup)(Authctxt *authctxt); 250 static int userauth_gssapi_keyex(Authctxt *authctxt); 251 static int userauth_gssapi(Authctxt *authctxt); 252 static void userauth_gssapi_cleanup(Authctxt *authctxt); 314 Authctxt authctxt; in ssh_userauth2() local 342 memset(&authctxt, 0, sizeof(authctxt)); in ssh_userauth2() 343 authctxt.agent = ssh_get_authentication_connection(); in ssh_userauth2() 344 authctxt.server_user = server_user; in ssh_userauth2() [all …]
|
/titanic_41/usr/src/cmd/ssh/include/ |
H A D | auth-pam.h | 41 void new_start_pam(Authctxt *authctxt, struct pam_conv *conv); 42 int auth_pam_password(Authctxt *authctxt, const char *password); 43 int do_pam_non_initial_userauth(Authctxt *authctxt); 44 int finish_userauth_do_pam(Authctxt *authctxt); 45 void finish_pam(Authctxt *authctxt); 46 char **fetch_pam_environment(Authctxt *authctxt);
|
H A D | auth.h | 66 Authctxt *authctxt; member 167 void (*userauth)(Authctxt *authctxt); 245 int auth_krb5(Authctxt *authctxt, krb5_data *auth, char **client, krb5_data *); 246 int auth_krb5_tgt(Authctxt *authctxt, krb5_data *tgt); 247 int auth_krb5_password(Authctxt *authctxt, const char *password); 248 void krb5_cleanup_proc(void *authctxt); 261 int userauth_check_partial_failure(Authctxt *authctxt); 267 void userauth_user_svc_change(Authctxt *authctxt,
|
H A D | auth2-pam.h | 27 int kbdint_pam_abandon_chk(Authctxt *authctxt, Authmethod *method); 28 void kbdint_pam_abandon(Authctxt *authctxt, Authmethod *method); 30 void auth2_pam(Authctxt *authctxt);
|