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