hal: Branch 'master'
Richard Hughes
hughsient at kemper.freedesktop.org
Fri Jun 13 00:16:06 PDT 2008
tools/hal-storage-shared.c | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 1168f61e5ab9edc5db9beb85aa91e8bd2edc3b7f
Author: Daniel Walsh <dwalsh at redhat.com>
Date: Fri Jun 13 08:14:39 2008 +0100
don't leak file descriptor on umount
I think this is a leaked file descriptor from hal. Hal opens the lock
file for write and then fails to call fcntl(fd,F_SETFD, FD_CLOSEXEC)
When the confined mount program runs, the SELinux kernel notices the open file
descriptor, checks the domain to see if it has access, then closes it with the
error.
diff --git a/tools/hal-storage-shared.c b/tools/hal-storage-shared.c
index b10be10..422f00e 100644
--- a/tools/hal-storage-shared.c
+++ b/tools/hal-storage-shared.c
@@ -706,6 +706,8 @@ lock_hal_mtab (void)
if (lock_mtab_fd < 0)
return FALSE;
+ fcntl(lock_mtab_fd, F_SETFD, FD_CLOEXEC);
+
tryagain:
#if sun
if (lockf (lock_mtab_fd, F_LOCK, 0) != 0) {
More information about the hal-commit
mailing list