On 7/23/25 9:41 AM, Dr. Werner Fink wrote:
On 2025/07/23 09:38:41 -0400, Chet Ramey wrote:
On 7/23/25 9:34 AM, Dr. Werner Fink wrote:

Correct configured it seems to work

   abuild@noether:/mnt> LD_PRELOAD=/usr/lib64/libuid_wrapper.so ./bash
   Segmentation fault         (core dumped) 
LD_PRELOAD=/usr/lib64/libuid_wrapper.so ./bash
   abuild@noether:/mnt> UID_WRAPPER=1 UID_WRAPPER_ROOT=1 
LD_PRELOAD=/usr/lib64/libuid_wrapper.so ./bash
   noether:mnt # touch /root/x
   touch: cannot touch '/root/x': Permission denied

it fakes root but is not root (I guess this faked root is for e.g. the test 
suite of libssh)

OK. So this all comes back to invoking libuid_wrapper in an environment
it expects?

Ack ... or the libuid_wrapper should be more robust, crashing isn't
very nice as getuid() fake works.

I'm guessing that without those variables set it fails to initialize state
and tries to dereference an invalid pointer or touch some other
uninitialized memory.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to