Fake UID/GID facility not working

PlashGlibc's facility for faking the UID/GID is not working.

Actual result:

$ id
uid=1000(mrs) gid=1000(mrs) groups=1000(mrs)
$ pola-run -fw / -e id
uid=1652053 gid=1652053
$ pola-run -fw / -e env | grep FAKE
PLASH_FAKE_EUID=1000
PLASH_FAKE_UID=1000
PLASH_FAKE_EGID=1000
PLASH_FAKE_GID=1000

Expected result: id should give the same output when run through pola-run for the uid and gid fields. The groups field may be missing under pola-run:

$ pola-run -fw / -e id
uid=1000 gid=1000
OR
uid=1000(mrs) gid=1000(mrs)

(Note that the user/group name may be omitted as a result of PlashIssues/CloexecOpenFails.)

This is a regression introduced by Story6.

Thomas Leonard reported this problem; see mailing list post.

I have created a page, UidFaking, to explain this feature.

This would have been caught by a test in run-tests.pl, but those tests are not being run any more. They should be converted to Python. See StoryTest4.

The initial change for this bug worked on amd64 but broke the build of PlashGlibc on i386. The fix was to change sysdeps/unix/sysv/linux/i386/getuid.c and rename getuid() to kernel_getuid(). The problem was that we have overridden getuid.c.

PlashIssues/FakeUidNotWorking (last edited 2008-07-17 16:24:34 by MarkSeaborn)