Subject: xlockmore patch
To: David A. Bagley <bagleyd@source.asset.com>
From: Michael L. VanLoon -- Iowa State University <michaelv@iastate.edu>
List: current-users
Date: 04/12/1994 17:23:15
Xlockmore doesn't get uid stuff right on systems that use shadowed
password files correctly.  Specifically, I'm referring to NetBSD, but
I'm led to believe that most POSIX systems should behave similarly.
The following patch fixes it:

--- xlock.c.orig	Mon Mar 21 14:30:08 1994
+++ xlock.c	Tue Apr 12 16:49:36 1994
@@ -437,7 +437,7 @@
     pw = (struct passwd *)getpwnam("root");
     strcpy(rootpass, pw->pw_passwd);
 
-    pw = (struct passwd *)getpwnam(cuserid(NULL));
+    pw = (struct passwd *)getpwuid(getuid());
     strcpy(userpass, pw->pw_passwd);
 
     user = pw->pw_name;


-----------------------------------------------------------------------------
 Michael L. VanLoon                 Iowa State University Computation Center
    michaelv@iastate.edu                    Project Vincent Systems Staff
  Free your mind and your machine -- NetBSD free Un*x for PC/Mac/Amiga/etc.
-----------------------------------------------------------------------------



------------------------------------------------------------------------------