linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udev needs fcntl(fd, F_SETFD, FD_CLOEXEC) for .udev.tdb
@ 2004-07-22 10:02 Harald Hoyer
  0 siblings, 0 replies; only message in thread
From: Harald Hoyer @ 2004-07-22 10:02 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 63 bytes --]

see http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=128304

[-- Attachment #2: udev-030-cloexec.patch --]
[-- Type: text/x-patch, Size: 535 bytes --]

--- udev-030/tdb/tdb.c.cloexec	2004-07-09 13:59:10.000000000 -0400
+++ udev-030/tdb/tdb.c	2004-07-21 11:40:50.876714715 -0400
@@ -1736,6 +1736,12 @@
 		goto fail;	/* errno set by open(2) */
 	}
 
+	/* 
+	   Close file when execing another process.  
+	   Prevents SELinux access errors.
+	*/
+	fcntl(tdb->fd, F_SETFD, FD_CLOEXEC);
+
 	/* ensure there is only one process initialising at once */
 	if (tdb_brlock(tdb, GLOBAL_LOCK, F_WRLCK, F_SETLKW, 0) == -1) {
 		TDB_LOG((tdb, 0, "tdb_open_ex: failed to get global lock on %s: %s\n",

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-07-22 10:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-22 10:02 udev needs fcntl(fd, F_SETFD, FD_CLOEXEC) for .udev.tdb Harald Hoyer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).