From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 Fedora/1.0.7-1.EL (CK-IBM) Firefox/1.0.7 Description of problem: When I set the pam system-auth to use the pam_passwdqc lib userpasswd crashes, due to the newlines produced from the pam lib. password requisite /lib/security/$ISA/pam_passwdqc.so min=disabled,8,8,8,8 passphrase=0 enforce=users password sufficient /lib/security/$ISA/pam_unix.so nullok use_authtok md5 shadow password required /lib/security/$ISA/pam_deny.so I see this issue up through the rawhide 1.84-1 usermode package. Version-Release number of selected component (if applicable): usermode-1.74-1 & usermode-1.84-1.i386.rpm How reproducible: Always Steps to Reproduce: 1. Edit the /etc/pam.d/system-auth add these lines for password: password requisite /lib/security/$ISA/pam_passwdqc.so min=disabled,8,8,8,8 passphrase=0 enforce=users password sufficient /lib/security/$ISA/pam_unix.so nullok use_authtok md5 shadow password required /lib/security/$ISA/pam_deny.so 2. As a normal non-root account attempt to run userpasswd 3. Actual Results: [example@localhost ~]$ userpasswd ERROR: unused data: `You can now choose the new password. 39 0 32 '. Expected Results: Gui should not produce output. Additional info: With the addition of this patch to the source: --- usermode-1.74/userhelper-wrap.c.orig 2005-11-22 00:36:18.000000000 -0500 +++ usermode-1.74/userhelper-wrap.c 2005-11-22 00:36:38.000000000 -0500 @@ -431,7 +431,14 @@ /* Snip off terminating newlines in the prompt string and save * a pointer to interate the parser along. */ - outline = strchr(prompt, '\n'); + outline = strchr(prompt, '\n'); + while (outline != NULL) { + if ((outline[1] == NULL) || (isdigit(outline[1]))) { + break; + } else { + outline = strchr(outline + 1, '\n'); + } + } if (outline != NULL) { outline[0] = '\0'; outline++; And these lines to the spec: Patch: usermode-wrapper-newlines.patch %patch -p1
Looks OK, just the outline[1] == NULL condition should be outline[1] == '\0' as outline[1] is a char not a pointer. Needs to be tested.
Todd, thanks for the patch. Fix is confirmed and patch applied with correction noted in comment #1. It will appear in 1.85.
usermode-1.85 is now built.