From: Martin Orr <martin@martinorr.name>
To: linux-hotplug@vger.kernel.org
Subject: Restoring permissions on existing nodes
Date: Mon, 03 Dec 2007 12:13:17 +0000 [thread overview]
Message-ID: <4753F2DD.4030803@martinorr.name> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 624 bytes --]
Is there a reason why udev sets the permissions and SELinux context every
time it finds an existing node or symlink?
The code in question is (from udev_node.c):
in udev_node_mknod():
if ((stats.st_mode & S_IFMT) == (mode & S_IFMT) && (stats.st_rdev == devt)) {
info("preserve file '%s', because it has correct dev_t", file);
selinux_setfilecon(file, udev->dev->kernel, stats.st_mode);
goto perms;
}
in node_symlink():
if (strcmp(target, buf) == 0) {
info("preserve already existing symlink '%s' to '%s'", slink, target);
selinux_setfilecon(slink, NULL, S_IFLNK);
goto exit;
}
--
Martin Orr
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
[-- Attachment #2: Type: text/plain, Size: 309 bytes --]
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
[-- Attachment #3: Type: text/plain, Size: 226 bytes --]
_______________________________________________
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
next reply other threads:[~2007-12-03 12:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-03 12:13 Martin Orr [this message]
2007-12-03 16:44 ` Restoring permissions on existing nodes Kay Sievers
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=4753F2DD.4030803@martinorr.name \
--to=martin@martinorr.name \
--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).