Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 145839 | Differences between
and this patch

Collapse All | Expand All

(-)../1/poppassd.c (-4 / +5 lines)
Lines 123-133 Link Here
123
    void        *appdata_ptr;
123
    void        *appdata_ptr;
124
{
124
{
125
	int i;
125
	int i;
126
	struct pam_response *r = malloc(sizeof(struct pam_response) * num_msg);
126
	struct pam_response *r;
127
127
128
	if(num_msg <= 0)
128
	if(num_msg <= 0)
129
		return(PAM_CONV_ERR);
129
		return(PAM_CONV_ERR);
130
130
131
	r = malloc(sizeof(struct pam_response) * num_msg);
131
	if(r == NULL)
132
	if(r == NULL)
132
		return(PAM_CONV_ERR);
133
		return(PAM_CONV_ERR);
133
134
Lines 137-145 Link Here
137
		       syslog(LOG_ERR, "PAM error: %s", msg[i]->msg);
138
		       syslog(LOG_ERR, "PAM error: %s", msg[i]->msg);
138
		       /*
139
		       /*
139
		        * If there is an error, we don't want to be sending in
140
		        * If there is an error, we don't want to be sending in
140
		        * anything more, so set pop_state to invalid
141
		        * anything more, so we quit after printing the error message.
141
		        */
142
		        */
142
		       pop_state = POP_SKIPASS;
143
		       exit(1);
143
		}
144
		}
144
145
145
		r[i].resp_retcode = 0;
146
		r[i].resp_retcode = 0;
Lines 228-234 Link Here
228
229
229
     pw=getpwnam(user);
230
     pw=getpwnam(user);
230
231
231
     if(pw->pw_uid<POP_MIN_UID || pw == NULL) {
232
     if(pw == NULL || pw->pw_uid<POP_MIN_UID) {
232
         WriteToClient("500 Old password is incorrect.");
233
         WriteToClient("500 Old password is incorrect.");
233
         syslog(LOG_ERR, "failed attempt to change password for %s", user);
234
         syslog(LOG_ERR, "failed attempt to change password for %s", user);
234
         exit(1);
235
         exit(1);

Return to bug 145839