View | Details | Raw Unified | Return to bug 14 | Differences between
and this patch

Collapse All | Expand All

(-)auth-pam.c (-6 lines)
Lines 864-875 do_pam_putenv(char *name, char *value) Link Here
864
	return (ret);
864
	return (ret);
865
}
865
}
866
866
867
void
868
print_pam_messages(void)
869
{
870
	/* XXX */
871
}
872
873
char **
867
char **
874
fetch_pam_child_environment(void)
868
fetch_pam_child_environment(void)
875
{
869
{
(-)auth-pam.h (-1 lines)
Lines 40-46 void do_pam_setcred(int ); Link Here
40
int is_pam_password_change_required(void);
40
int is_pam_password_change_required(void);
41
void do_pam_chauthtok(void);
41
void do_pam_chauthtok(void);
42
int do_pam_putenv(char *, char *);
42
int do_pam_putenv(char *, char *);
43
void print_pam_messages(void);
44
char ** fetch_pam_environment(void);
43
char ** fetch_pam_environment(void);
45
char ** fetch_pam_child_environment(void);
44
char ** fetch_pam_child_environment(void);
46
void free_pam_environment(char **);
45
void free_pam_environment(char **);
(-)session.c (-14 / +17 lines)
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");
(-)session.h (+2 lines)
Lines 72-75 void do_setusercontext(struct passwd *) Link Here
72
void	 child_set_env(char ***envp, u_int *envsizep, const char *name,
72
void	 child_set_env(char ***envp, u_int *envsizep, const char *name,
73
		       const char *value);
73
		       const char *value);
74
74
75
void	 do_pwchange(Session *);
76
75
#endif
77
#endif

Return to bug 14