aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnselm R Garbe <anselm@garbe.us>2011-04-21 08:22:47 +0000
committerAnselm R Garbe <anselm@garbe.us>2011-04-21 08:22:47 +0000
commitede2935e10fdab76994676d5052b571907612199 (patch)
tree3fa8e0180ab14fffe2fdad4e22eb816fd58eafc9
parent732d2b3bf5da3a1883b3246062aa556a59b8517c (diff)
applied Markus' patch to die in case /etc/passwd is unavailable
-rw-r--r--slock.c3
1 files changed, 3 insertions, 0 deletions
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) {
228 else if(argc != 1) 228 else if(argc != 1)
229 usage(); 229 usage();
230 230
231 if(!getpwuid(getuid()))
232 die("no passwd entry for you");
233
231#ifndef HAVE_BSD_AUTH 234#ifndef HAVE_BSD_AUTH
232 pws = get_password(); 235 pws = get_password();
233#endif 236#endif