From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1RpH7S-00009z-Cw for garchives@archives.gentoo.org; Mon, 23 Jan 2012 10:27:22 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D9512E0819; Mon, 23 Jan 2012 10:27:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id AEE49E0819 for ; Mon, 23 Jan 2012 10:27:12 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3512F1B4025 for ; Mon, 23 Jan 2012 10:27:12 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 518BF80044 for ; Mon, 23 Jan 2012 10:27:11 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <06b8084b2cf9308fe0cbbcdde0741a881b7609fb.robbat2@gentoo> 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: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 06b8084b2cf9308fe0cbbcdde0741a881b7609fb Date: Mon, 23 Jan 2012 10:27:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: ea74246e-9683-49f3-a1ab-3d1af9bd01b7 X-Archives-Hash: c4b88be4a505ddb1cd131836324592c5 commit: 06b8084b2cf9308fe0cbbcdde0741a881b7609fb Author: Robin H. Johnson gentoo org> AuthorDate: Mon Jan 23 05:30:00 2012 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Mon Jan 23 05:30:00 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/openrc.git;a=3D= commit;h=3D06b8084b Ensure that when -F is passed, existing files are truncated properly. Signed-off-by: Robin H. Johnson gentoo.org> --- src/rc/checkpath.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/rc/checkpath.c b/src/rc/checkpath.c index 0aee446..86623d9 100644 --- a/src/rc/checkpath.c +++ b/src/rc/checkpath.c @@ -61,7 +61,7 @@ do_check(char *path, uid_t uid, gid_t gid, mode_t mode,= inode_t type, bool trunc struct stat st; int fd, flags; =20 - if (stat(path, &st)) { + if (stat(path, &st) || trunc) { if (type =3D=3D inode_file) { einfo("%s: creating file", path); if (!mode) /* 664 */