Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 107556 Details for
Bug 145839
net-mail/poppassd_ceti does not handle pam_ldap correctly
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
poppassd.c-3.patch
poppassd.c-3.patch (text/plain), 1.94 KB, created by
Warren Howard
on 2007-01-20 16:34:04 UTC
(
hide
)
Description:
poppassd.c-3.patch
Filename:
MIME Type:
Creator:
Warren Howard
Created:
2007-01-20 16:34:04 UTC
Size:
1.94 KB
patch
obsolete
>--- ../2/poppassd.c 2006-11-09 21:17:07.000000000 +0530 >+++ poppassd.c 2007-01-16 19:59:06.000000000 +0530 >@@ -88,7 +88,6 @@ > #define POP_OLDPASS 0 > #define POP_NEWPASS 1 > #define POP_SKIPASS 2 >-short int pop_state = POP_OLDPASS; > > void WriteToClient (char *fmt, ...) > { >@@ -116,6 +115,30 @@ > line[BUFSIZE-1] = '\0'; > } > >+static inline int getstate(const char *msg) >+{ >+ /* Interpret possible PAM messages (not including errors) */ >+ if(!strcmp(msg, "Password: ")) >+ return POP_OLDPASS; >+ if(!strcmp(msg, "Enter login(LDAP) password: ")) >+ return POP_OLDPASS; >+ >+ if(!strcmp(msg, "New password: ")) >+ return POP_NEWPASS; >+ if(!strcmp(msg, "Re-enter new password: ")) >+ return POP_NEWPASS; >+ if(!strcmp(msg, "Enter new UNIX password: ")) >+ return POP_NEWPASS; >+ if(!strcmp(msg, "Retype new UNIX password: ")) >+ return POP_NEWPASS; >+ if(!strcmp(msg, "New UNIX password: ")) >+ return POP_NEWPASS; >+ >+ WriteToClient("Unknown PAM Message: %s", msg); // We should not ever reach here. >+ >+ return POP_SKIPASS; >+} >+ > int poppassd_conv(num_msg, msg, resp, appdata_ptr) > int num_msg; > const struct pam_message **msg; >@@ -147,7 +170,7 @@ > if(msg[i]->msg_style == PAM_PROMPT_ECHO_OFF || > msg[i]->msg_style == PAM_PROMPT_ECHO_ON) > { >- switch(pop_state) { >+ switch(getstate(msg[i]->msg)) { > case POP_OLDPASS: > r[i].resp = strdup(oldpass); > break; >@@ -158,7 +181,7 @@ > r[i].resp = NULL; > break; > default: >- syslog(LOG_ERR, "PAM error: too many switches (state=%d)", pop_state); >+ syslog(LOG_ERR, "PAM error: too many switches"); > } > } else > { >@@ -235,8 +258,6 @@ > exit(1); > } > >- pop_state = POP_NEWPASS; >- > WriteToClient ("200 Your new password please."); > ReadFromClient (line); > sscanf (line, "newpass %" MAX_LEN_PASS "c", newpass);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 145839
:
95639
|
107552
|
107554
| 107556 |
107557
|
107559
|
671578