tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Proposal: getexecpath(3)



> Why do you want the kernel to compute some notion of a canonical
> absolute path?  Of what use is this for applications?  Isn't this
> strictly less useful than the original verbatim exec path?

It also can leak information.  If the path passed to execve is relative
and one of the containing directories is inaccessible to the process, a
kernel-created absolute path will leak a pathname the program shouldn't
be able to obtain.

> You can always pass the original verbatim exec path to realpath(3) if
> you want to canonicalize it,

True, though that - at best - returns the hard path at the time of
realpath (or more precisely with pieces fetched at various times
scattered throughout the execution of realpath), which may not be the
same as the one at the time of exec.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index