[hackers] [slock] applied Markus' patch to die in case /etc/passwd is unavailable || Anselm R Garbe

From: <hg_AT_suckless.org>
Date: Thu, 21 Apr 2011 10:22:50 +0200 (CEST)

changeset: 42:d8975fb0640f
tag: tip
user: Anselm R Garbe <anselm_AT_garbe.us>
date: Thu Apr 21 08:22:47 2011 +0000
files: slock.c
description:
applied Markus' patch to die in case /etc/passwd is unavailable

diff -r 4d3769ac5d02 -r d8975fb0640f slock.c
--- a/slock.c Thu Nov 26 12:53:26 2009 +0000
+++ b/slock.c Thu Apr 21 08:22:47 2011 +0000
@@ -228,6 +228,9 @@
         else if(argc != 1)
                 usage();
 
+ if(!getpwuid(getuid()))
+ die("no passwd entry for you");
+
 #ifndef HAVE_BSD_AUTH
         pws = get_password();
 #endif
Received on Thu Apr 21 2011 - 10:22:50 CEST

This archive was generated by hypermail 2.2.0 : Thu Apr 21 2011 - 10:24:05 CEST