]> git.armaanb.net Git - slock.git/blobdiff - slock.c
applied sin's patch and prepared new release
[slock.git] / slock.c
diff --git a/slock.c b/slock.c
index 399386bd31fc3f16bb39bc59e556e72d72c9ee28..5051f04eb8a70a2fc7756fd29d6950850fb4236d 100644 (file)
--- a/slock.c
+++ b/slock.c
@@ -23,6 +23,8 @@
 #include <bsd_auth.h>
 #endif
 
+#include "config.h"
+
 typedef struct {
        int screen;
        Window root, win;
@@ -73,7 +75,6 @@ getpw(void) { /* only run as root */
                else
                        die("slock: cannot retrieve password entry (make sure to suid or sgid slock)\n");
        }
-       endpwent();
        rval =  pw->pw_passwd;
 
 #if HAVE_SHADOW_H
@@ -82,7 +83,6 @@ getpw(void) { /* only run as root */
                sp = getspnam(getenv("USER"));
                if(!sp)
                        die("slock: cannot retrieve shadow entry (make sure to suid or sgid slock)\n");
-               endspent();
                rval = sp->sp_pwdp;
        }
 #endif