summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/gen/getgrent.c2
-rw-r--r--lib/libc/gen/getpwent.c2
-rw-r--r--lib/libc/sys/setresuid.27
3 files changed, 3 insertions, 8 deletions
diff --git a/lib/libc/gen/getgrent.c b/lib/libc/gen/getgrent.c
index f9480c3..caa5ad5 100644
--- a/lib/libc/gen/getgrent.c
+++ b/lib/libc/gen/getgrent.c
@@ -896,7 +896,7 @@ files_group(void *retval, void *mdata, va_list ap)
break;
pos = ftello(st->fp);
}
- if (!stayopen && st->fp != NULL) {
+ if (st->fp != NULL && !stayopen) {
fclose(st->fp);
st->fp = NULL;
}
diff --git a/lib/libc/gen/getpwent.c b/lib/libc/gen/getpwent.c
index f729cdf..7cf7f47 100644
--- a/lib/libc/gen/getpwent.c
+++ b/lib/libc/gen/getpwent.c
@@ -921,7 +921,7 @@ files_passwd(void *retval, void *mdata, va_list ap)
errnop);
} while (how == nss_lt_all && !(rv & NS_TERMINATE));
fin:
- if (!stayopen && st->db != NULL) {
+ if (st->db != NULL && !stayopen) {
(void)st->db->close(st->db);
st->db = NULL;
}
diff --git a/lib/libc/sys/setresuid.2 b/lib/libc/sys/setresuid.2
index 08d07f3..602166f 100644
--- a/lib/libc/sys/setresuid.2
+++ b/lib/libc/sys/setresuid.2
@@ -19,7 +19,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 13, 2001
+.Dd February 7, 2015
.Dt SETRESUID 2
.Os
.Sh NAME
@@ -90,10 +90,5 @@ was invalid.
.Xr setregid 2 ,
.Xr setreuid 2 ,
.Xr setuid 2
-.Sh STANDARDS
-These system calls are not available on many platforms.
-They exist in
-.Fx
-to support Linux binaries linked against GNU libc2.
.Sh HISTORY
These functions first appeared in HP-UX.
OpenPOWER on IntegriCloud