From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-862927-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id 2535159C66
	for <garchives@archives.gentoo.org>; Fri, 12 Feb 2016 18:59:05 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id C4529E07F2;
	Fri, 12 Feb 2016 18:59:03 +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 6F2B7E07F2
	for <gentoo-commits@lists.gentoo.org>; Fri, 12 Feb 2016 18:59:03 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 7ED99340B9A
	for <gentoo-commits@lists.gentoo.org>; Fri, 12 Feb 2016 18:59:02 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 5711A8F2
	for <gentoo-commits@lists.gentoo.org>; Fri, 12 Feb 2016 18:58:59 +0000 (UTC)
From: "William Hubbs" <williamh@gentoo.org>
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" <williamh@gentoo.org>
Message-ID: <1455302692.7eaf71176b87ae69bfa622aa621341a19a9d32b0.williamh@OpenRC>
Subject: [gentoo-commits] proj/openrc:master commit in: src/rc/
X-VCS-Repository: proj/openrc
X-VCS-Files: src/rc/rc-misc.c
X-VCS-Directories: src/rc/
X-VCS-Committer: williamh
X-VCS-Committer-Name: William Hubbs
X-VCS-Revision: 7eaf71176b87ae69bfa622aa621341a19a9d32b0
X-VCS-Branch: master
Date: Fri, 12 Feb 2016 18:58:59 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: f87469b9-fb8a-4246-ac9f-774fdf31340a
X-Archives-Hash: f0cbd8381e3e72e851661af51d063075

commit:     7eaf71176b87ae69bfa622aa621341a19a9d32b0
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Fri Feb 12 18:40:55 2016 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Fri Feb 12 18:44:52 2016 +0000
URL:        https://gitweb.gentoo.org/proj/openrc.git/commit/?id=7eaf7117

Fix rc_env_allow wildcard usage

Before this commit, using * in rc_env_allow did not work.

This fixes #60.

 src/rc/rc-misc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/rc/rc-misc.c b/src/rc/rc-misc.c
index f2967dd..82f1b78 100644
--- a/src/rc/rc-misc.c
+++ b/src/rc/rc-misc.c
@@ -68,6 +68,12 @@ env_filter(void)
 
 	/* Add the user defined list of vars */
 	env_allow = rc_stringlist_split(rc_conf_value("rc_env_allow"), " ");
+	/*
+	 * If '*' is an entry in rc_env_allow, do nothing as we are to pass
+	 * through all environment variables.
+	 */
+	if (rc_stringlist_find(env_allow, "*"))
+		return;
 	profile = rc_config_load(RC_PROFILE_ENV);
 
 	/* Copy the env and work from this so we can manipulate it safely */