From ede2935e10fdab76994676d5052b571907612199 Mon Sep 17 00:00:00 2001 From: Anselm R Garbe Date: Thu, 21 Apr 2011 08:22:47 +0000 Subject: applied Markus' patch to die in case /etc/passwd is unavailable --- slock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/slock.c b/slock.c index eece4e3..be10f5d 100644 --- a/slock.c +++ b/slock.c @@ -228,6 +228,9 @@ main(int argc, char **argv) { else if(argc != 1) usage(); + if(!getpwuid(getuid())) + die("no passwd entry for you"); + #ifndef HAVE_BSD_AUTH pws = get_password(); #endif -- cgit v1.2.3-70-g09d2