This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Error checking for SETXID (bug 13347)
- From: Rich Felker <dalias at aerifal dot cx>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 27 Mar 2014 11:36:45 -0400
- Subject: Re: [PATCH] Error checking for SETXID (bug 13347)
- Authentication-results: sourceware.org; auth=none
- References: <53304186 dot 4000909 at redhat dot com> <Pine dot LNX dot 4 dot 64 dot 1403241516210 dot 6513 at digraph dot polyomino dot org dot uk> <53305247 dot 7070605 at redhat dot com> <20140324182208 dot GV26358 at brightrain dot aerifal dot cx> <533429EE dot 7040906 at redhat dot com> <20140327152110 dot GH26358 at brightrain dot aerifal dot cx> <53344372 dot 5070804 at redhat dot com>
On Thu, Mar 27, 2014 at 04:27:46PM +0100, Florian Weimer wrote:
> On 03/27/2014 04:21 PM, Rich Felker wrote:
>
> >>We already support it through setfsuid/setfsgid, which is
> >>per-thread, not per-process.
> >
> >The whole reason you're changing uids is because you can't be sure
> >about what code you run;
>
> Ah, no, you can also change credentials to impersonate a user and
> access resources with the privileges of that user. A file server
> does this, for example.
That's what setfsuid is for. setuid is pretty much exclusively for
dropping privileges.
Rich