From mboxrd@z Thu Jan 1 00:00:00 1970 From: Harald Hoyer Date: Thu, 22 Jul 2004 10:02:15 +0000 Subject: udev needs fcntl(fd, F_SETFD, FD_CLOEXEC) for .udev.tdb Message-Id: <40FF90A7.3090007@redhat.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------010406000003040408030603" List-Id: To: linux-hotplug@vger.kernel.org This is a multi-part message in MIME format. --------------010406000003040408030603 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit see http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=128304 --------------010406000003040408030603 Content-Type: text/x-patch; name="udev-030-cloexec.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="udev-030-cloexec.patch" --- 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", --------------010406000003040408030603-- ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel