1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # T2 SDE: package/.../fgetty/checkpassword.patch
5 # Copyright (C) 2004 - 2005 The T2 SDE Project
7 # More information can be found in the files COPYING and README.
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
15 # --- T2-COPYRIGHT-NOTE-END ---
17 Only use shadow passwords if the passsword is marked with an x and allow
18 empty passwords. (So PDA users do not need to log in ...)
20 - Rene Rebe <rene@exactcode.de>
22 --- fgetty-0.6/checkpassword.c 2001-09-10 12:35:12.000000000 +0200
23 +++ fgetty-0.6/checkpassword.c 2005-02-08 20:23:32.391861824 +0100
26 if ((pw=getpwnam(login))) {
28 - if ((spw=getspnam(login)))
29 + if (!strcmp(passwd, "x") && (spw=getspnam(login)))
31 - if (*passwd && !strcmp(crypt(ptr=login+strlen(login)+1,passwd),passwd)) {
32 + ptr=login+strlen(login)+1;
33 + if (*passwd == 0 || !strcmp(crypt(ptr,passwd),passwd)) {
34 + puts("password checked\n");
37 for (len=0; environ[len]; ++len) ;