Your message dated Tue, 20 Jan 2026 18:27:59 +0000
with message-id <[email protected]>
and subject line Bug#1123784: Removed package(s) from unstable
has caused the Debian Bug report #410949,
regarding poppassd: restrictions ignored with pam_cracklib
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
410949: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=410949
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: poppassd
Version: 1.8.5-3.1
Tags: security patch
pam_cracklib ignores restrictions on password length and complexity if the
real uid is 0, on the assumption administrators know what they're doing.
This works as intended with passwd(8), where the real uid reflects the
invoking user, but not with poppassd(8), which always runs with real uid 0.
The patch below fixes this by changing the real uid to that of "nobody"
(while retaining effective uid 0).
Thanks,
Matej
diff -u poppassd-1.8.5/poppassd.c poppassd-1.8.5/poppassd.c
--- poppassd-1.8.5/poppassd.c
+++ poppassd-1.8.5/poppassd.c
@@ -52,6 +52,7 @@
#define BUFSIZE 1000
#include <sys/types.h>
+#include <unistd.h>
#include <fcntl.h>
#include <syslog.h>
#include <stdlib.h>
@@ -148,7 +149,7 @@
msg[i]->msg_style == PAM_PROMPT_ECHO_ON)
{
switch(pop_state) {
- case POP_OLDPASS: r[i].resp = strdup(oldpass);
+ case POP_OLDPASS: r[i].resp = strdup(oldpass);
pop_state = POP_NEWPASS;
break;
case POP_NEWPASS: r[i].resp = strdup(newpass);
break;
@@ -190,6 +191,15 @@
openlog("poppassd", LOG_PID, LOG_LOCAL4);
+ /* Modules like pam_cracklib ignore some security policies when run as
+ * root (real uid 0); change real uid to something neutral. Doesn't
+ * matter much what, our effective uid is still 0.
+ */
+ if (getuid() == 0) {
+ pw = getpwnam("nobody");
+ setreuid((pw ? pw->pw_uid : 65534), -1);
+ }
+
WriteToClient ("200 poppassd v%s hello, who are you?", VERSION);
ReadFromClient (line);
if( strlen(line) > atoi(MAX_LEN_USERNAME) ) {
@@ -239,7 +249,10 @@
exit(1);
}
- pop_state = POP_NEWPASS;
+ /* If we aren't root (as we shouldn't be, but setreuid() might have
+ * failed), pam_chauthtok() will ask for the old password again.
+ */
+ pop_state = getuid() ? POP_OLDPASS : POP_NEWPASS;
WriteToClient ("200 Your new password please.");
ReadFromClient (line);
--- End Message ---
--- Begin Message ---
Version: 1.8.5-9+rm
Dear submitter,
as the package poppassd has just been removed from the Debian archive
unstable we hereby close the associated bug reports. We are sorry
that we couldn't deal with your issue properly.
For details on the removal, please see https://bugs.debian.org/1123784
The version of this package that was in Debian prior to this removal
can still be found using https://snapshot.debian.org/.
Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.
This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
[email protected].
Debian distribution maintenance software
pp.
Thorsten Alteholz (the ftpmaster behind the curtain)
--- End Message ---