[yocto] pseudo - few general questions
Mark Hatle
mark.hatle at windriver.com
Wed Nov 1 06:58:07 PDT 2017
On 11/1/17 8:49 AM, Mark Hatle wrote:
> On 11/1/17 4:17 AM, Pavlina Varekova wrote:
>> Hi,
>> thank you very much. It sounds good. So I tried replace fakechroot with pseudo.
>> I read man pages and replace:
>>
>> FAKECHROOT_BASE="${DIR1}" fakechroot command
>>
>> with:
>>
>> %{PATH/TO/PSEUDO/}bin/pseudo -r "${DIR1}" -P %{PATH/TO/PSEUDO/} command
>>
>> But it does not work good. Probably some variable is set differently.
>> Please is the replacement correct?
>>
>> Pavlina
>
> I always run pseudo, then once the shell opens then run 'chroot <path>' within
> pseudo.
>
> The system will still execute commands outside of the 'chroot', but any
> application looking at the file filesystem will appear to be constrained.
I just realized, it -may- still execute commands outside of the chroot. pseudo
(like fakechroot) can not protect everything like a real chroot.
Below is my typical use:
$ ./bin/pseudo /bin/bash
# chroot /usr
# cd /
# ls
bash: ls: command not found
# bin/ls
bin etc games include lib lib64 libexec local sbin share src tmp
So it's working here.
But using the -r option, appears to work as well:
$ ./bin/pseudo -r /usr /bin/bash
bash-4.2# cd /
bash-4.2# ls
bash: ls: command not found
bash-4.2# bin/ls
bin etc games include lib lib64 libexec local sbin share src tmp
bash-4.2#
--Mark
> --Mark
>
More information about the yocto
mailing list