Valery Reznic wrote:

Now I see it. You ager going to make string in "ps" to looks good.
That's part of it, but not all of it. If the only problem was the "ps" output, I would have lived with it. The real problem is that argv[0] is an actual argument that some programs use.

Think of the following case (which is why fakeroot-ng was originally conceived). You want to set up a chroot for some embedded development. You compile busybox and copy it in, creating all of the symlinks (i.e. - $root/bin/ls is a symlink to /bin/busybox etc.) Now you chroot into $root.

When you run "ls", you do so using the following command:
execve( /bin/ls, array( "/bin/ls", options, NULL ) )

since we're inside a chroot, fakeroot-ng needs to resolve all links itself to make sure they do not go outside the chroot. So the function now looks like this:
execve( $root/bin/busybox, array( "/bin/ls", options, NULL ))

so far, not a problem. However, you suggest we turn it into:
execve( $root/lib/ld-linux.so.2, array( "$root/lib/ld-linux.so.2", "$root/bin/busybox", options, NULL ) )

That will simply not work. Busybox needs argv[0] to know it is running as "ls".

This is not aesthetics. This is functionality.
Thank you for the explanation.

Valery.
Shachar

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to