lkml.org 
[lkml]   [2006]   [Apr]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateMon, 10 Apr 2006 08:53:32 +0200
FromPetr Baudis <>
SubjectRe: Dumpable tasks and ownership of /proc/*/fd
Dear diary, on Mon, Apr 10, 2006 at 07:43:03AM CEST, I got a letter
where "Eric W. Biederman" <ebiederm@xmission.com> said that...
> Speaking of things why does the *at() emulation need to touch
> /proc/self/fd/*?  I may be completely dense but if the practical
> justification for allowing access to /proc/self/fd/ is that we
> already have access then we shouldn't need /proc/self/fd.
> 
> I suspect this a matter of convenience where you are prepending
> /proc/self/fd/xxx/ to the path before you open it instead of calling
> fchdir openat() and the doing fchdir back.  Have I properly guessed
> how the *at() emulation works?

Ok, now I'm not completely following you. Only i386 and x86_64 appears
to provide the openat() syscall (only in new kernels, furthermore) and
glibc otherwise emulates openat(n, "relpath") with
open("/proc/self/fd/<n>/relpath"). I don't know of any other way how to
emulate it.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Right now I am having amnesia and deja-vu at the same time.  I think
I have forgotten this before.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-10 06:56    [from the cache]
©2003-2008