From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id AFECE138330 for ; Tue, 9 Jan 2018 23:36:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DA654E0828; Tue, 9 Jan 2018 23:36:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BA11EE0828 for ; Tue, 9 Jan 2018 23:36:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 5329C335C3E for ; Tue, 9 Jan 2018 23:36:00 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B7366198 for ; Tue, 9 Jan 2018 23:35:57 +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: <1515540328.918d955fd2de1f594b83508f5ddd5271534e3591.williamh@OpenRC> Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/ X-VCS-Repository: proj/openrc X-VCS-Files: src/rc/checkpath.c X-VCS-Directories: src/rc/ X-VCS-Committer: williamh X-VCS-Committer-Name: William Hubbs X-VCS-Revision: 918d955fd2de1f594b83508f5ddd5271534e3591 X-VCS-Branch: master Date: Tue, 9 Jan 2018 23:35:57 +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: fa6e5be6-17b0-4b04-a134-168158c0e264 X-Archives-Hash: 19bd250187a7d8db777920e7cc6063ae commit: 918d955fd2de1f594b83508f5ddd5271534e3591 Author: William Hubbs gmail com> AuthorDate: Tue Jan 9 23:20:39 2018 +0000 Commit: William Hubbs gentoo org> CommitDate: Tue Jan 9 23:25:28 2018 +0000 URL: https://gitweb.gentoo.org/proj/openrc.git/commit/?id=918d955f checkpath: use lchown instead of chown Checkpath should never follow symbolic links when changing ownership of a file. This is for https://github.com/openrc/openrc/issues/195. src/rc/checkpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rc/checkpath.c b/src/rc/checkpath.c index b1509940..8846761b 100644 --- a/src/rc/checkpath.c +++ b/src/rc/checkpath.c @@ -168,7 +168,7 @@ static int do_check(char *path, uid_t uid, gid_t gid, mode_t mode, return -1; } einfo("%s: correcting owner", path); - if (chown(path, uid, gid)) { + if (lchown(path, uid, gid)) { eerror("%s: chown: %s", applet, strerror(errno)); return -1; }