|
|
@ -67,10 +67,12 @@ getpw(void) { /* only run as root */ |
|
|
|
|
|
|
|
|
|
|
|
errno = 0; |
|
|
|
errno = 0; |
|
|
|
pw = getpwuid(getuid()); |
|
|
|
pw = getpwuid(getuid()); |
|
|
|
if (errno) |
|
|
|
if (!pw) { |
|
|
|
die("slock: getpwuid: %s\n", strerror(errno)); |
|
|
|
if (errno) |
|
|
|
else if (!pw) |
|
|
|
die("slock: getpwuid: %s\n", strerror(errno)); |
|
|
|
die("slock: cannot retrieve password entry (make sure to suid or sgid slock)\n"); |
|
|
|
else |
|
|
|
|
|
|
|
die("slock: cannot retrieve password entry (make sure to suid or sgid slock)\n"); |
|
|
|
|
|
|
|
} |
|
|
|
endpwent(); |
|
|
|
endpwent(); |
|
|
|
rval = pw->pw_passwd; |
|
|
|
rval = pw->pw_passwd; |
|
|
|
|
|
|
|
|
|
|
|