/usr/sbin/userhelper dumps core if read_string returns NULL (ie. user presses ctrl-d (no other input)). This can be reproduced /usr/sbin/userhelper -s -d 1 2 3 (I don't think the -d parameter matters). and type anything+enter and immediately press ctrl-d --> segmentation fault -Jarno Here's a patch (this fixes that seg. fault, but I don't know if this is correct way to fix it). --- usermode-1.36/userhelper.c-orig Mon Oct 30 13:39:18 2000 +++ usermode-1.36/userhelper.c Mon Oct 30 13:40:51 2000 @@ -234,7 +234,7 @@ case PAM_PROMPT_ECHO_OFF: reply[count].resp_retcode = PAM_SUCCESS; reply[count].resp = read_string(); - if(reply[count].resp[0] == UH_ABORT) { + if(reply[count].resp && reply[count].resp[0] == UH_ABORT) { fallback_flag = TRUE; free (reply); return PAM_MAXTRIES; /* Shrug. */
This will be fixed in 1.37 in Raw Hide. Thanks!