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

Collapse All | Expand All

(-)openssh-3.8p1/auth-pam.c (-1 / +2 lines)
Lines 680-692 Link Here
680
 * This replaces auth-pam.c
680
 * This replaces auth-pam.c
681
 */
681
 */
682
void
682
void
683
start_pam(const char *user)
683
start_pam(const char *user, Authctxt *authctxt)
684
{
684
{
685
	if (!options.use_pam)
685
	if (!options.use_pam)
686
		fatal("PAM: initialisation requested when UsePAM=no");
686
		fatal("PAM: initialisation requested when UsePAM=no");
687
687
688
	if (sshpam_init(user) == -1)
688
	if (sshpam_init(user) == -1)
689
		fatal("PAM: initialisation failed");
689
		fatal("PAM: initialisation failed");
690
	force_pwchange = &authctxt->force_pwchange;
690
}
691
}
691
692
692
void
693
void
(-)openssh-3.8p1/auth-pam.h (-1 / +1 lines)
Lines 31-37 Link Here
31
# define SSHD_PAM_SERVICE		__progname
31
# define SSHD_PAM_SERVICE		__progname
32
#endif
32
#endif
33
33
34
void start_pam(const char *);
34
void start_pam(const char *, Authctxt *);
35
void finish_pam(void);
35
void finish_pam(void);
36
u_int do_pam_account(void);
36
u_int do_pam_account(void);
37
void do_pam_session(void);
37
void do_pam_session(void);
(-)openssh-3.8p1/auth1.c (-1 / +1 lines)
Lines 307-313 Link Here
307
307
308
#ifdef USE_PAM
308
#ifdef USE_PAM
309
	if (options.use_pam)
309
	if (options.use_pam)
310
		PRIVSEP(start_pam(user));
310
		PRIVSEP(start_pam(user, authctxt));
311
#endif
311
#endif
312
312
313
	/*
313
	/*
(-)openssh-3.8p1/auth2.c (-2 / +2 lines)
Lines 157-170 Link Here
157
			debug2("input_userauth_request: setting up authctxt for %s", user);
157
			debug2("input_userauth_request: setting up authctxt for %s", user);
158
#ifdef USE_PAM
158
#ifdef USE_PAM
159
			if (options.use_pam)
159
			if (options.use_pam)
160
				PRIVSEP(start_pam(authctxt->pw->pw_name));
160
				PRIVSEP(start_pam(authctxt->pw->pw_name, authctxt));
161
#endif
161
#endif
162
		} else {
162
		} else {
163
			logit("input_userauth_request: illegal user %s", user);
163
			logit("input_userauth_request: illegal user %s", user);
164
			authctxt->pw = fakepw();
164
			authctxt->pw = fakepw();
165
#ifdef USE_PAM
165
#ifdef USE_PAM
166
			if (options.use_pam)
166
			if (options.use_pam)
167
				PRIVSEP(start_pam(user));
167
				PRIVSEP(start_pam(user, authctxt));
168
#endif
168
#endif
169
		}
169
		}
170
		setproctitle("%s%s", authctxt->pw ? user : "unknown",
170
		setproctitle("%s%s", authctxt->pw ? user : "unknown",
(-)openssh-3.8p1/monitor.c (-1 / +1 lines)
Lines 789-795 Link Here
789
789
790
	user = buffer_get_string(m, NULL);
790
	user = buffer_get_string(m, NULL);
791
791
792
	start_pam(user);
792
	start_pam(user, authctxt);
793
793
794
	xfree(user);
794
	xfree(user);
795
795
(-)openssh-3.8p1/monitor_wrap.c (-1 / +1 lines)
Lines 686-692 Link Here
686
686
687
#ifdef USE_PAM
687
#ifdef USE_PAM
688
void
688
void
689
mm_start_pam(char *user)
689
mm_start_pam(char *user, struct Authctxt *authctxt)
690
{
690
{
691
	Buffer m;
691
	Buffer m;
692
692
(-)openssh-3.8p1/monitor_wrap.h (-1 / +1 lines)
Lines 66-72 Link Here
66
#endif
66
#endif
67
67
68
#ifdef USE_PAM
68
#ifdef USE_PAM
69
void mm_start_pam(char *);
69
void mm_start_pam(char *, struct Authctxt *authctxt);
70
u_int mm_do_pam_account(void);
70
u_int mm_do_pam_account(void);
71
void *mm_sshpam_init_ctx(struct Authctxt *);
71
void *mm_sshpam_init_ctx(struct Authctxt *);
72
int mm_sshpam_query(void *, char **, char **, u_int *, char ***, u_int **);
72
int mm_sshpam_query(void *, char **, char **, u_int *, char ***, u_int **);

Return to bug 808