X-Git-Url: https://git.xinqibao.xyz/slock.git/blobdiff_plain/8745098fa440ef3bf1d8e173dcd91514b34600c6..44ce161c139f74cac80dd77aafdfadb49a85af2a:/slock.c diff --git a/slock.c b/slock.c index 399386b..5051f04 100644 --- a/slock.c +++ b/slock.c @@ -23,6 +23,8 @@ #include #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