linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Harald Hoyer <harald@redhat.com>
To: linux-hotplug@vger.kernel.org
Subject: udev needs fcntl(fd, F_SETFD, FD_CLOEXEC) for .udev.tdb
Date: Thu, 22 Jul 2004 10:02:15 +0000	[thread overview]
Message-ID: <40FF90A7.3090007@redhat.com> (raw)

[-- 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",

                 reply	other threads:[~2004-07-22 10:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40FF90A7.3090007@redhat.com \
    --to=harald@redhat.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).