aboutsummaryrefslogtreecommitdiff
path: root/login/utmp_daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'login/utmp_daemon.c')
-rw-r--r--login/utmp_daemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/login/utmp_daemon.c b/login/utmp_daemon.c
index 148a472900..1cf899f2a6 100644
--- a/login/utmp_daemon.c
+++ b/login/utmp_daemon.c
@@ -98,7 +98,7 @@ setutent_daemon (void)
/* We have to make sure the socket is `closed on exec'. */
result = __fcntl (daemon_sock, F_GETFD, 0);
if (result >= 0)
- result = __fcntl (daemon_sock, F_SETFD, flags | FD_CLOEXEC);
+ result = __fcntl (daemon_sock, F_SETFD, result | FD_CLOEXEC);
if (result == -1)
{
close (daemon_sock);