Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 1/3] base-files: change permissions on /sys and /proc
@ 2018-05-11 20:10 Dan McGregor
  2018-05-11 20:10 ` [PATCH 2/3] base-files: use /proc/self/mounts for /etc/mtab Dan McGregor
  2018-05-11 20:10 ` [PATCH 3/3] base-files: make root home mode customisable Dan McGregor
  0 siblings, 2 replies; 3+ messages in thread
From: Dan McGregor @ 2018-05-11 20:10 UTC (permalink / raw)
  To: openembedded-core

From: Dan McGregor <dan.mcgregor@usask.ca>

Fedora uses permissions of 555 for /proc and /sys. Debian doesn't
seem to explicitly set their permissions. In addition they're mounted
555.  Having them be 755 causes permission issues on upgrades inside a
container when the guest does not have the permission to change their
modes.

So, just bite the bullet and force them to be 555.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
---
 meta/recipes-core/base-files/base-files_3.0.14.bb | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 1c0863b1c7b..a6963ba24d6 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -32,15 +32,16 @@ INHIBIT_DEFAULT_DEPS = "1"
 docdir_append = "/${P}"
 dirs1777 = "/tmp ${localstatedir}/volatile/tmp"
 dirs2775 = ""
+dirs555 = "/sys /proc"
 dirs755 = "/boot /dev ${base_bindir} ${base_sbindir} ${base_libdir} \
            ${sysconfdir} ${sysconfdir}/default \
-           ${sysconfdir}/skel ${nonarch_base_libdir} /mnt /proc ${ROOT_HOME} /run \
+           ${sysconfdir}/skel ${nonarch_base_libdir} /mnt ${ROOT_HOME} /run \
            ${prefix} ${bindir} ${docdir} /usr/games ${includedir} \
            ${libdir} ${sbindir} ${datadir} \
            ${datadir}/common-licenses ${datadir}/dict ${infodir} \
            ${mandir} ${datadir}/misc ${localstatedir} \
            ${localstatedir}/backups ${localstatedir}/lib \
-           /sys ${localstatedir}/lib/misc ${localstatedir}/spool \
+           ${localstatedir}/lib/misc ${localstatedir}/spool \
            ${localstatedir}/volatile \
            ${localstatedir}/${@'volatile/' if oe.types.boolean('${VOLATILE_LOG_DIR}') else ''}log \
            /home ${prefix}/src ${localstatedir}/local \
@@ -93,6 +94,9 @@ pkg_preinst_${PN} () {
 }
 
 do_install () {
+	for d in ${dirs555}; do
+		install -m 0555 -d ${D}$d
+	done
 	for d in ${dirs755}; do
 		install -m 0755 -d ${D}$d
 	done
-- 
2.18.0-dev



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-05-11 20:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-05-11 20:10 [PATCH 1/3] base-files: change permissions on /sys and /proc Dan McGregor
2018-05-11 20:10 ` [PATCH 2/3] base-files: use /proc/self/mounts for /etc/mtab Dan McGregor
2018-05-11 20:10 ` [PATCH 3/3] base-files: make root home mode customisable Dan McGregor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox