public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Daniel Campbell" <zlg@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/lighttpd/files/
Date: Mon, 12 Sep 2016 09:37:40 +0000 (UTC)	[thread overview]
Message-ID: <1473673028.0db692284d2789ec6fa2ca82d630bd825f8a7f01.zlg@gentoo> (raw)

commit:     0db692284d2789ec6fa2ca82d630bd825f8a7f01
Author:     Daniel Campbell <zlg <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 12 09:37:08 2016 +0000
Commit:     Daniel Campbell <zlg <AT> gentoo <DOT> org>
CommitDate: Mon Sep 12 09:37:08 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0db69228

www-servers/lighttpd: Fix #454366, own user/group

Adds support in the initd script for LIGHTTPD_USER and LIGHTTPD_GROUP,
which are gleaned from the lighttpd.conf file's relevant variables.

Thanks Eugene Rosenzweig

Gentoo-Bug: #454366
Gentoo-Bug-URL: https://bugs.gentoo.org/454366

Package-Manager: portage-2.3.0

 www-servers/lighttpd/files/lighttpd.initd | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/www-servers/lighttpd/files/lighttpd.initd b/www-servers/lighttpd/files/lighttpd.initd
index 04dd8cc..e345f72 100644
--- a/www-servers/lighttpd/files/lighttpd.initd
+++ b/www-servers/lighttpd/files/lighttpd.initd
@@ -1,5 +1,5 @@
 #!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -31,7 +31,11 @@ checkconfig() {
 
 start() {
 	checkconfig || return 1
-	checkpath -d -q -m 0750 -o lighttpd:lighttpd /run/lighttpd/
+	# Glean lighttpd's credentials from the configuration file
+	# Fixes bug 454366
+	LIGHTTPD_USER="$(awk '/^server.username/{s=$3};{sub("\"","",s)};END{print s}' ${LIGHTTPD_CONF})"
+	LIGHTTPD_GROUP="$(awk '/^server.groupname/{s=$3};{sub("\"","",s)};END{print s}' ${LIGHTTPD_CONF})"
+	checkpath -d -q -m 0750 -o "${LIGHTTPD_USER}":"${LIGHTTPD_GROUP}" /run/lighttpd/
 
 	ebegin "Starting lighttpd"
 	start-stop-daemon --start --quiet --exec /usr/sbin/lighttpd \


             reply	other threads:[~2016-09-12  9:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12  9:37 Daniel Campbell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-01-20 21:57 [gentoo-commits] repo/gentoo:master commit in: www-servers/lighttpd/files/ Conrad Kostecki
2016-11-20 10:18 Daniel Campbell
2016-05-18  6:42 Austin English
2015-09-02 17:19 Markos Chandras

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473673028.0db692284d2789ec6fa2ca82d630bd825f8a7f01.zlg@gentoo \
    --to=zlg@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox