Yocto Project Discussions
 help / color / mirror / Atom feed
From: Armin Kuster <akuster808@gmail.com>
To: yocto@lists.yoctoproject.org
Cc: Yi Zhao <yi.zhao@windriver.com>, Joe MacDonald <joe@deserted.net>,
	Armin Kuster <akuster@mvista.com>
Subject: [meta-selinux][dunfell][patch 3/4] sysklogd: set correct security context for /var/log in initscript
Date: Thu, 27 Jul 2023 14:07:47 -0400	[thread overview]
Message-ID: <20230727180748.107196-4-akuster808@gmail.com> (raw)
In-Reply-To: <20230727180748.107196-1-akuster808@gmail.com>

From: Yi Zhao <yi.zhao@windriver.com>

We don't need to set security context for /dev/log after syslogd daemon
startup because it is already set by udev. We just need to set the
correct security context for symbolic link /var/log before syslogd
startup.

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
(cherry picked from commit 7d3b1347ae949c7208482694fd773e4bc3f321b4)
Signed-off-by: Armin Kuster <akuster@mvista.com>
---
 recipes-extended/sysklogd/files/sysklogd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-extended/sysklogd/files/sysklogd b/recipes-extended/sysklogd/files/sysklogd
index e49c2da..7943b1d 100644
--- a/recipes-extended/sysklogd/files/sysklogd
+++ b/recipes-extended/sysklogd/files/sysklogd
@@ -108,8 +108,8 @@ case "$1" in
   start)
     log_begin_msg "Starting system log daemon..."
     create_xconsole
+    test ! -x /sbin/restorecon || /sbin/restorecon -F /var/log
     start-stop-daemon --start --quiet --pidfile $pidfile_syslogd --name syslogd --startas $binpath_syslogd -- $SYSLOGD
-    test ! -x /sbin/restorecon || /sbin/restorecon -RF /dev/log /var/log/
     log_end_msg $?
     ;;
   stop)
-- 
2.34.1



  parent reply	other threads:[~2023-07-27 18:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27 18:07 [meta-selinux][dunfell][patch 0/4] Selinux failed to enable do to errors Armin Kuster
2023-07-27 18:07 ` [meta-selinux][dunfell][patch 1/4] refpolicy: remove version 2.20190201 Armin Kuster
2023-07-27 18:07 ` [meta-selinux][dunfell][patch 2/4] audit: set correct security context for /var/log/audit Armin Kuster
2023-07-27 18:07 ` Armin Kuster [this message]
2023-07-27 18:07 ` [meta-selinux][dunfell][patch 4/4] refpolicy: update to 20200229+git Armin Kuster

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=20230727180748.107196-4-akuster808@gmail.com \
    --to=akuster808@gmail.com \
    --cc=akuster@mvista.com \
    --cc=joe@deserted.net \
    --cc=yi.zhao@windriver.com \
    --cc=yocto@lists.yoctoproject.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