mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
732 B

  1. allow empty passwords (shadow-lookup only when 'x' found.)
  2. (patch thankfully copied from T2)
  3. --- fgetty-0.6/checkpassword.c 2001-09-10 12:35:12.000000000 +0200
  4. +++ fgetty-0.6/checkpassword.c 2005-02-08 20:23:32.391861824 +0100
  5. @@ -36,9 +36,11 @@
  6. login=buf;
  7. if ((pw=getpwnam(login))) {
  8. passwd=pw->pw_passwd;
  9. - if ((spw=getspnam(login)))
  10. + if (!strcmp(passwd, "x") && (spw=getspnam(login)))
  11. passwd=spw->sp_pwdp;
  12. - if (*passwd && !strcmp(crypt(ptr=login+strlen(login)+1,passwd),passwd)) {
  13. + ptr=login+strlen(login)+1;
  14. + if (*passwd == 0 || !strcmp(crypt(ptr,passwd),passwd)) {
  15. + puts("password checked\n");
  16. char **env,**ep;
  17. char buf[100];
  18. for (len=0; environ[len]; ++len) ;