From: "Ludovic Courtès" <ludo@gnu.org>
To: Florian Dold <florian.dold@gmail.com>
Cc: 33966@debbugs.gnu.org
Subject: [bug#33966] fcgiwrap: additional options for logging and unix domain sockets
Date: Wed, 09 Jan 2019 17:17:01 +0100 [thread overview]
Message-ID: <87a7k94xhe.fsf@gnu.org> (raw)
In-Reply-To: <624ba072-d5fe-b159-46af-61e79caf22f1@gmail.com> (Florian Dold's message of "Thu, 3 Jan 2019 21:02:38 +0100")
Hi Florian,
Florian Dold <florian.dold@gmail.com> skribis:
> this patch adds additional options to the fcgiwrap service. In
> particular it allows
>
> 1. writing the output of the fcgi process to a file (with the 'log-file'
> option)
>
> 2. arranging for a directory to be created so that the fcgiwrap process
> can create its listening socket without running into permission problems
> (with the 'ensure-socket-dir?' option)
>
> 3. adjusting the permissions on the listening unix domain socket,
> typically so that users in the fcgiwrap group have read and write access
> to that socket (with the 'adjusted-socket-permissions' option)
>
> Additionally, a potentially left-over fcgiwrap socket is cleaned up
> before starting the service, which would otherwise lead to the process
> refusing to run.
>
> The documentation is also changed to address a potential security issue,
> now recommending against running fcgiwrap as root.
Thanks for working on it!
> The configuration defaults are not ideal (a tcp socket with unrestricted
> access from any local user), but impossible to change without breaking
> existing system definitions.
Yeah. Perhaps we could print a warning or something to encourage users
to switch?
Overall LGTM. Some minor comments below:
> From 3ac9c6fa536faff23291b21d4e649b85386fedfc Mon Sep 17 00:00:00 2001
> From: Florian Dold <flo@dold.me>
> Date: Thu, 3 Jan 2019 14:22:49 +0100
> Subject: [PATCH] services: fcgiwrap: Implement additional options
>
> The fcgiwrap service now supports logging and can be run
> on a unix domain socket as unprivileged user.
>
> * doc/guix.texi (Web Services): Document new options and replace
> dangerous advice about running fcgiwrap as root.
> * gnu/services/web.scm: Add the options 'log-file',
> 'adjusted-socket-permissions' and 'ensure-socket-dir?'.
It’d be great if you could list the modified variables for web.scm;
otherwise I can do it for you.
> (define-record-type* <fcgiwrap-configuration> fcgiwrap-configuration
> make-fcgiwrap-configuration
> fcgiwrap-configuration?
> - (package fcgiwrap-configuration-package ;<package>
> - (default fcgiwrap))
> - (socket fcgiwrap-configuration-socket
> - (default "tcp:127.0.0.1:9000"))
> - (user fcgiwrap-configuration-user
> - (default "fcgiwrap"))
> - (group fcgiwrap-configuration-group
> - (default "fcgiwrap")))
> + (package fcgiwrap-configuration-package ;<package>
> + (default fcgiwrap))
> + (socket fcgiwrap-configuration-socket
> + (default "tcp:127.0.0.1:9000"))
> + (user fcgiwrap-configuration-user
> + (default "fcgiwrap"))
> + (group fcgiwrap-configuration-group
> + (default "fcgiwrap"))
> + (log-file fcgiwrap-log-file
> + (default #f))
> + ;; boolean or octal mode integer
> + (adjusted-socket-permissions fcgiwrap-adjusted-socket-permissions?
> + (default #f))
Maybe just ‘socket-permissions’ and also leave out interpretation of #t
as #o666?
Also the accessor should then be ‘fcgiwrap-socket-permissions’.
> + (ensure-socket-dir? fcgiwrap-ensure-socket-dir?
> + (default #f)))
s/dir/directory/ please. :-)
Also please remove tabs from the file.
Could you make sure “make check-system TESTS=cgit” still passes after
the change?
The rest LGTM. Could you send an updated patch?
Thank you!
Ludo’.
next prev parent reply other threads:[~2019-01-09 16:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-03 20:02 [bug#33966] fcgiwrap: additional options for logging and unix domain sockets Florian Dold
2019-01-09 16:17 ` Ludovic Courtès [this message]
2019-05-25 7:57 ` Arun Isaac
2024-11-11 12:41 ` Maxim Cournoyer
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=87a7k94xhe.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=33966@debbugs.gnu.org \
--cc=florian.dold@gmail.com \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.