[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m1oda04y9o.fsf@ebiederm.dsl.xmission.com>
Date: Thu, 28 Feb 2008 13:33:07 -0700
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Pavel Emelyanov <xemul@...nvz.org>
Cc: Ian Kent <raven@...maw.net>,
Andrew Morton <akpm@...ux-foundation.org>,
Kernel Mailing List <linux-kernel@...r.kernel.org>,
autofs mailing list <autofs@...ux.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH 3/4] autofs4 - track uid and gid of last mount requestor
Pavel Emelyanov <xemul@...nvz.org> writes:
> Why do we need the uid then? Is just pid not enough to uniquely
> identify a task?
>
> Assuming we can get by with a pid only, this problem can be solved
> by sending a pid_nr() of a task, i.e. the pid by which this task is
> seen from an initial namespace. This pid is unique across the system
> even when pid namespaces are created.
Pavel it is never correct to use a global pid when talking to user space.
In fact the concept is just a bit dubious. We must always translate
the pid into the pid namespace of the task we are talking to, or at
least into the pid namespace of the process that opened the file
handle, (essentially the same, but does not have races in the corner
cases).
Even in the kernel using global ids is dubious. When dealing with
user space it is just wrong.
Speaking of. I think we still need work on autofs in this regard.
I know last I looked we had some outstanding issues there.
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists