OpenSDE Packages Database (without history before r20070)
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.

37 lines
1.5 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../fgetty/checkpassword.patch
  5. # Copyright (C) 2004 - 2006 The T2 SDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. Only use shadow passwords if the passsword is marked with an x and allow
  17. empty passwords. (So PDA users do not need to log in ...)
  18. - Rene Rebe <rene@exactcode.de>
  19. --- fgetty-0.6/checkpassword.c 2001-09-10 12:35:12.000000000 +0200
  20. +++ fgetty-0.6/checkpassword.c 2005-02-08 20:23:32.391861824 +0100
  21. @@ -36,9 +36,11 @@
  22. login=buf;
  23. if ((pw=getpwnam(login))) {
  24. passwd=pw->pw_passwd;
  25. - if ((spw=getspnam(login)))
  26. + if (!strcmp(passwd, "x") && (spw=getspnam(login)))
  27. passwd=spw->sp_pwdp;
  28. - if (*passwd && !strcmp(crypt(ptr=login+strlen(login)+1,passwd),passwd)) {
  29. + ptr=login+strlen(login)+1;
  30. + if (*passwd == 0 || !strcmp(crypt(ptr,passwd),passwd)) {
  31. + puts("password checked\n");
  32. char **env,**ep;
  33. char buf[100];
  34. for (len=0; environ[len]; ++len) ;