From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E272313877A for ; Wed, 13 Aug 2014 15:07:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CEAF4E0874; Wed, 13 Aug 2014 15:07:11 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7A627E0874 for ; Wed, 13 Aug 2014 15:07:11 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 979403403D0 for ; Wed, 13 Aug 2014 15:07:10 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 50A6718816 for ; Wed, 13 Aug 2014 15:07:09 +0000 (UTC) From: "William Hubbs" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "William Hubbs" Message-ID: <1407942140.6f080e9c1a2a9b9c308cdc03f9cf782c4ce4d440.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: sh/ X-VCS-Repository: proj/openrc X-VCS-Files: sh/tmpfiles.sh.in X-VCS-Directories: sh/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 6f080e9c1a2a9b9c308cdc03f9cf782c4ce4d440 X-VCS-Branch: master Date: Wed, 13 Aug 2014 15:07:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 3524ea8a-597e-450b-99c0-8e654f588e15 X-Archives-Hash: 575d77058a4fda98085a034181258b73 Message-ID: <20140813150709.h_kqDiuezygmQMRD0M8JHl5CreULUJcXEL87--NLbu8@z> commit: 6f080e9c1a2a9b9c308cdc03f9cf782c4ce4d440 Author: Jason Zaman perfinion com> AuthorDate: Wed Aug 13 06:50:34 2014 +0000 Commit: William Hubbs gentoo org> CommitDate: Wed Aug 13 15:02:20 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=6f080e9c tmpfiles: Move relabelling before any other calls for device nodes Device nodes are normally never device_t so this type does not have many permissions. After the mknod, the device should have its label corrected before any other operations (like chmod). --- sh/tmpfiles.sh.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sh/tmpfiles.sh.in b/sh/tmpfiles.sh.in index 63c5d14..8538545 100755 --- a/sh/tmpfiles.sh.in +++ b/sh/tmpfiles.sh.in @@ -65,8 +65,8 @@ _b() { local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6 if [ ! -e "$path" ]; then dryrun_or_real mknod -m $mode $path b ${arg%:*} ${arg#*:} - dryrun_or_real chown $uid:$gid $path _restorecon "$path" + dryrun_or_real chown $uid:$gid $path fi } @@ -75,8 +75,8 @@ _c() { local path=$1 mode=$2 uid=$3 gid=$4 age=$5 arg=$6 if [ ! -e "$path" ]; then dryrun_or_real mknod -m $mode $path c ${arg%:*} ${arg#*:} - dryrun_or_real chown $uid:$gid $path _restorecon "$path" + dryrun_or_real chown $uid:$gid $path fi }