From: Dallin Dahl <dallinjdahl@gmail.com>
To: supervision@list.skarnet.org
Subject: Unprivileged Shutdown?
Date: Fri, 27 May 2022 21:44:32 -0600 [thread overview]
Message-ID: <2NMWH7KWN9U8A.2QSU8NGDI39Q7@oak.localdomain> (raw)
I have been using simple privilege escalation to poweroff the machine,
but looking through the source code for s6-linux-init-shutdownd and
friends, it appears the only constraint on interacting with the daemon
is the permissions on run-image/service/s6-linux-init-shutdownd/fifo.
The default appears to be:
600 root root
I've changed it on my system to be:
620 root power
and added my user to the power group.
This seems like the cleanest way to implement unprivileged
poweroff/reboot, but I'm concerned that it's not possible by default.
Is there a better way, or is it just meant to be done manually?
Thanks!
--Dallin
next reply other threads:[~2022-05-28 3:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-28 3:44 Dallin Dahl [this message]
2022-05-28 8:43 ` Laurent Bercot
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=2NMWH7KWN9U8A.2QSU8NGDI39Q7@oak.localdomain \
--to=dallinjdahl@gmail.com \
--cc=supervision@list.skarnet.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;
as well as URLs for NNTP newsgroup(s).