From: Mark Lord <lkml@rtr.ca>
To: gogi-k@gogi.tv
Cc: linux-kernel@vger.kernel.org
Subject: Re: One process with multiple user ids.
Date: Tue, 02 Oct 2007 09:23:40 -0400 [thread overview]
Message-ID: <4702465C.7030207@rtr.ca> (raw)
In-Reply-To: <200710021334.34950.gogi-k@gogi.tv>
Giuliano Gagliardi wrote:
> On Tuesday 02 October 2007, Jan Engelhardt wrote:
>> On Oct 2 2007 12:56, Giuliano Gagliardi wrote:
>>> I have a server that has to switch to different user ids, but because it
>>> does other complex things, I would rather not have it run as root. I only
>>> need the server to be able to switch to certain pre-defined user ids.
>> All you need is CAP_SETUID. Also see man setresuid,
>> where you could, I think, use saved_uid=0 if you do not
>> like to use real_uid=0 effective_uid=non-0.
>
> But CAP_SETUID would let me change to any uid, would it not? I would like my
> process to have no possibility to change to any uid, except some predefined
> set, so that in case of a security hole only those uids could be compromised.
It really sounds like the app should be restructured.
If security is that important to it, then it shouldn't
be changing uids back and forth on the fly (too risky).
There's probably a nice redesign possible where it just
forks off 3 sub-processes, one for each UID,
and then farms out the work to each as required.
Cheers
next prev parent reply other threads:[~2007-10-02 13:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-02 10:56 One process with multiple user ids Giuliano Gagliardi
2007-10-02 11:23 ` Jan Engelhardt
[not found] ` <200710021333.05826.gogi-k@gogi.tv>
2007-10-02 11:34 ` Jan Engelhardt
2007-10-02 11:39 ` Giuliano Gagliardi
2007-10-02 11:52 ` Jan Engelhardt
2007-10-02 11:34 ` Giuliano Gagliardi
2007-10-02 13:23 ` Mark Lord [this message]
2007-10-08 10:15 ` Helge Hafting
2007-10-02 17:11 ` Chris Snook
2007-10-02 22:23 ` David Newall
2007-10-02 22:38 ` Bill Davidsen
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=4702465C.7030207@rtr.ca \
--to=lkml@rtr.ca \
--cc=gogi-k@gogi.tv \
--cc=linux-kernel@vger.kernel.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