summaryrefslogtreecommitdiff
path: root/udevsend.c
diff options
context:
space:
mode:
authorharald@redhat.com <harald@redhat.com>2004-10-06 00:54:08 -0700
committerGreg KH <gregkh@suse.de>2005-04-26 21:37:03 -0700
commit6e3e3c3416864eca74cb885f64c453eb531eed63 (patch)
treeb467f72775c46db6b8a208a61236027fce422e6a /udevsend.c
parentc8fa2d8b413f7cf1ab42d1c35865952649bfccad (diff)
[PATCH] PATCH udev close on exec
selinux wants a clean fd set, so better close all open fds
Diffstat (limited to 'udevsend.c')
-rw-r--r--udevsend.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/udevsend.c b/udevsend.c
index 842a2a4bc4..23ba1a1b00 100644
--- a/udevsend.c
+++ b/udevsend.c
@@ -160,6 +160,8 @@ int main(int argc, char* argv[])
goto fallback;
}
+ set_cloexec_flag(sock, 1);
+
memset(&saddr, 0x00, sizeof(struct sockaddr_un));
saddr.sun_family = AF_LOCAL;
/* use abstract namespace for socket path */