public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Georgy Yakovlev <ya@sysdump.net>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] [RFC] systemd's DynamicUser= in .service files
Date: Sun, 11 Feb 2018 15:46:29 -0800	[thread overview]
Message-ID: <2406014.bCckGnqSOt@reaper> (raw)

[-- Attachment #1: Type: text/plain, Size: 1286 bytes --]

Hi,

As of version 2.3.2 systemd includes support for creating a user to run a 
service as, and extended support since 2.3.5. [1]

Currently we have stable 233-r6 and 236-r5 on amd64.

Since we have to support both openrc and systemd in gentoo, and will have 
create a service user for running under openrc anyways, does it make any sense 
to provide service files with DynamicUser=yes ?

If a statically allocated user/group already exists, and unit file contains 
relevant User=/Group=,  the configured user  is used and no dynamic user/group 
is allocated. [2]

According to 'grep'  there are 2 packages currently in the tree:

net-p2p/cpuminer-opt/files/cpuminer-opt.service
8:DynamicUser=true

net-p2p/xmr-stak/files/xmr-stak.service
13:DynamicUser=true

Both  do not provide OpenRC files, so it makes sense.

Maybe other packages also use that with upstream provided service files, I 
haven't checked.

What I'm asking for is your opinion if it's something that should be used in 
gentoo or should I try to avoid it if possible, especially if a static user is 
alredy present in the system.

Thanks!

[1]: http://0pointer.net/blog/dynamic-users-with-systemd.html
[2]: https://www.freedesktop.org/software/systemd/man/
systemd.exec.html#DynamicUser=

---
Regards, 
Georgy Yakovlev.

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

             reply	other threads:[~2018-02-11 23:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-11 23:46 Georgy Yakovlev [this message]
2018-02-12  0:32 ` [gentoo-dev] [RFC] systemd's DynamicUser= in .service files Rich Freeman

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=2406014.bCckGnqSOt@reaper \
    --to=ya@sysdump.net \
    --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