parent
62cb53069c
commit
e2ff0ad273
@ -16,7 +16,7 @@ extern "C"
|
||||
{
|
||||
struct spwd* result;
|
||||
|
||||
getspent_r(&spwd, s_buf, sizeof(s_buf), &result);
|
||||
if (getspent_r(&spwd, s_buf, sizeof(s_buf), &result) < 0) return nullptr;
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -28,7 +28,7 @@ extern "C"
|
||||
if (!f)
|
||||
{
|
||||
f = fopen("/etc/shadow", "r");
|
||||
if (!f) return 0;
|
||||
if (!f) return -1;
|
||||
fcntl(fileno(f), F_SETFD, FD_CLOEXEC);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user