Skip to contentSkip to conversation

initscripts - restorecon of /dev/pts

PATCH New Chad Hanson 1 participant 1 message Mar 10, 2006 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 initscripts - restorecon of /dev/pts

There has been a recurring of problem of /dev/pts being labeled incorrectly. This is noted in the thread below:

http://marc.theaimsgroup.com/?l=selinux&m=112419712132326&w=2

TCS previously submitted a restorecon patch for the initscripts below:

http://marc.theaimsgroup.com/?l=selinux&m=113155285804603&w=2

I have a patch below which can be applied to initscripts-8.29-1 to fix the problem of /dev/pts being labeled SystemHigh.

-Chad

rc.sysinit renamed from rc.sysinit.orig +2 -0
@@ -182,6 +182,8 @@
 # may have to do this again after mounting
 RHGB_STARTED=0
 mount -n /dev/pts >/dev/null 2>&1
+# restore MLS range of /dev/pts
+[ -n "$SELINUX" ] && restorecon /dev/pts
 
 if strstr "$cmdline" rhgb && ! strstr "$cmdline" early-login && [ "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then
    LC_MESSAGES= /usr/bin/rhgb

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.