summaryrefslogtreecommitdiffstats
path: root/lib/libutil/login_auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libutil/login_auth.c')
-rw-r--r--lib/libutil/login_auth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libutil/login_auth.c b/lib/libutil/login_auth.c
index ce9a2e4..1fc7e73 100644
--- a/lib/libutil/login_auth.c
+++ b/lib/libutil/login_auth.c
@@ -98,7 +98,7 @@ auth_cat(const char *file)
int fd, count;
char buf[BUFSIZ];
- if ((fd = open(file, O_RDONLY)) < 0)
+ if ((fd = open(file, O_RDONLY | O_CLOEXEC)) < 0)
return 0;
while ((count = read(fd, buf, sizeof(buf))) > 0)
(void)write(fileno(stdout), buf, count);
OpenPOWER on IntegriCloud