|
Lines 195-200
auth_input_request_forwarding(struct pas
Link Here
|
| 195 |
|
195 |
|
| 196 |
|
196 |
|
| 197 |
void |
197 |
void |
|
|
198 |
display_loginmsg(void) |
| 199 |
{ |
| 200 |
if (buffer_len(&loginmsg) > 0) { |
| 201 |
buffer_append(&loginmsg, "\0", 1); |
| 202 |
printf("%s\n", (char *)buffer_ptr(&loginmsg)); |
| 203 |
buffer_clear(&loginmsg); |
| 204 |
} |
| 205 |
} |
| 206 |
|
| 207 |
void |
| 198 |
do_authenticated(Authctxt *authctxt) |
208 |
do_authenticated(Authctxt *authctxt) |
| 199 |
{ |
209 |
{ |
| 200 |
setproctitle("%s", authctxt->pw->pw_name); |
210 |
setproctitle("%s", authctxt->pw->pw_name); |
|
Lines 699-706
do_login(Session *s, const char *command
Link Here
|
| 699 |
* This needs to occur before the ~/.hushlogin check. |
709 |
* This needs to occur before the ~/.hushlogin check. |
| 700 |
*/ |
710 |
*/ |
| 701 |
if (options.use_pam && is_pam_password_change_required()) { |
711 |
if (options.use_pam && is_pam_password_change_required()) { |
| 702 |
print_pam_messages(); |
712 |
display_loginmsg(); |
| 703 |
do_pam_chauthtok(); |
713 |
if (use_privsep) |
|
|
714 |
do_pwchange(s); |
| 715 |
else |
| 716 |
do_pam_chauthtok(); |
| 704 |
/* XXX - signal [net] parent to enable forwardings */ |
717 |
/* XXX - signal [net] parent to enable forwardings */ |
| 705 |
} |
718 |
} |
| 706 |
#endif |
719 |
#endif |
|
Lines 708-724
do_login(Session *s, const char *command
Link Here
|
| 708 |
if (check_quietlogin(s, command)) |
721 |
if (check_quietlogin(s, command)) |
| 709 |
return; |
722 |
return; |
| 710 |
|
723 |
|
| 711 |
#ifdef USE_PAM |
724 |
display_loginmsg(); |
| 712 |
if (options.use_pam && !is_pam_password_change_required()) |
|
|
| 713 |
print_pam_messages(); |
| 714 |
#endif /* USE_PAM */ |
| 715 |
|
| 716 |
/* display post-login message */ |
| 717 |
if (buffer_len(&loginmsg) > 0) { |
| 718 |
buffer_append(&loginmsg, "\0", 1); |
| 719 |
printf("%s\n", (char *)buffer_ptr(&loginmsg)); |
| 720 |
} |
| 721 |
buffer_free(&loginmsg); |
| 722 |
|
725 |
|
| 723 |
#ifndef NO_SSH_LASTLOG |
726 |
#ifndef NO_SSH_LASTLOG |
| 724 |
if (options.print_lastlog && s->last_login_time != 0) { |
727 |
if (options.print_lastlog && s->last_login_time != 0) { |
|
Lines 1303-1309
do_setusercontext(struct passwd *pw)
Link Here
|
| 1303 |
fatal("Failed to set uids to %u.", (u_int) pw->pw_uid); |
1306 |
fatal("Failed to set uids to %u.", (u_int) pw->pw_uid); |
| 1304 |
} |
1307 |
} |
| 1305 |
|
1308 |
|
| 1306 |
static void |
1309 |
void |
| 1307 |
do_pwchange(Session *s) |
1310 |
do_pwchange(Session *s) |
| 1308 |
{ |
1311 |
{ |
| 1309 |
fprintf(stderr, "WARNING: Your password has expired.\n"); |
1312 |
fprintf(stderr, "WARNING: Your password has expired.\n"); |