[lkml]   [1999]   [Apr]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: capabilities in elf headers, (my) final (and shortest) iteration
Pavel Machek <> said:


> [Take a look at way how scripts are executed. When script
> 'script.xyzzy' beggining with
> #!/foo/bar
> is executed, kernel executes /foo/bar script.xyzzy. There's a race
> here - user can easily delete and replace script.xyzzy in between.]

Yes. The secure way to do this (AFAIKR) is for the kernel to open the
script (f.ex. filedescriptor 3 all the time, it has it open anyway to make
the check) and run "/foo/bar /proc/<pid>/fd/3" instead. Or get the
interpreter to read the script from fd 3 always. No race.
Horst von Brand
Casilla 9G, Viña del Mar, Chile +56 32 672616

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:51    [W:0.059 / U:5.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site