Return to BSD News archive
Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!osuunx.ucc.okstate.edu!moe.ksu.ksu.edu!ux1.cso.uiuc.edu!howland.reston.ans.net!paladin.american.edu!news.univie.ac.at!email.tuwien.ac.at!email.tuwien.ac.at!not-for-mail From: mbirgmei@email.tuwien.ac.at (Martin BIRGMEIER) Newsgroups: comp.os.386bsd.apps Subject: Re: [NetBSD] X Screenlocker & Crypt Date: 29 Jun 1993 17:46:15 +0200 Organization: Technical University Vienna / Austria Lines: 123 Message-ID: <20po47$vi@email.tuwien.ac.at> References: <1993Jun28.082922.2194@yvax.byu.edu> <20p1k8$t86@news.cs.tu-berlin.de> NNTP-Posting-Host: email.tuwien.ac.at In article <20p1k8$t86@news.cs.tu-berlin.de> nuggets@cs.tu-berlin.de (Lars Hentschke) writes: >Brian K. Holman (bkh@nephi-hbll.byu.edu) wrote: >: I have got xnlock and xlock from export.lcs.mit.edu. They are suppose [...] >: compiled fine except that it won't accept my password. Just for fun I [...] >Yes, my xlock doesn't work too. [...] Maybe this helps... ============================== cut here ============================== *** xlock/xlock.c.ORIG Sat Sep 28 03:04:53 1991 --- xlock/xlock.c Fri Feb 5 14:21:43 1993 *************** *** 403,410 **** } } - static int getPassword() { --- 403,410 ---- } } + extern char *getlogin(); static int getPassword() { *************** *** 416,425 **** int y, left, done; struct passwd *pw; ! pw = getpwnam("root"); strcpy(rootpass, pw->pw_passwd); ! pw = getpwnam(cuserid(NULL)); strcpy(userpass, pw->pw_passwd); user = pw->pw_name; --- 416,428 ---- int y, left, done; struct passwd *pw; ! pw = getpwuid(0); strcpy(rootpass, pw->pw_passwd); ! if (getlogin() != NULL) /* getlogin() hashes, so we don't care ... */ ! pw = getpwnam(getlogin()); /* ... about calling it twice */ ! else ! pw = getpwuid(getuid()); strcpy(userpass, pw->pw_passwd); user = pw->pw_name; *** xlock/worm.c.ORIG Sat Sep 28 02:54:14 1991 --- xlock/worm.c Fri Feb 5 14:21:42 1993 *************** *** 65,71 **** round(x) float x; { ! return ((int) rint((double) x)); } --- 65,71 ---- round(x) float x; { ! return ((int) (double) x); } *** xlock/usleep.c.ORIG Fri May 24 18:58:26 1991 --- xlock/usleep.c Fri Feb 5 14:21:42 1993 *************** *** 13,18 **** --- 13,19 ---- #include "xlock.h" + #ifdef NEED_USLEEP int usleep(usec) unsigned long usec; *************** *** 27,32 **** --- 28,34 ---- #endif return 0; } + #endif /* * returns the number of seconds since 01-Jan-70. *** xlock/resource.c.ORIG Sat Sep 28 02:58:54 1991 --- xlock/resource.c Fri Feb 5 15:31:42 1993 *************** *** 32,37 **** --- 32,39 ---- #include <X11/Xresource.h> + extern double atof(); + /* * Declare external interface routines for supported screen savers. */ ============================== cut here ============================== It's been a long time since I did this, maybe you can omit the rint() and usleep() patches now, I don't know. And yes, you do need to run it suid root, otherwise it won't be able to read the master password file. Cheers, Martin