Re: Busybox su leaves EUID unchanged

2023-01-12 Thread Laurent Bercot




# su userx
# id
uid=203(userx) gid=203(userx) euid=0(root)

Is this expected behaviour? From source I can see it does setuid() 
which should also modify euid. If not then what could be the issue?


 As is often the case, the best debug tool here is strace :)
 What does "strace su userx id" say?

--
 Laurent

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


Busybox su leaves EUID unchanged

2023-01-12 Thread erkska dev
Hello.

Environment: aarch64 embedded device, Linux 5.4.70, Busybox v1.33.0
# cat /etc/passwd
root:!:0:0::/:/bin/sh
userx:!:203:203::/:/bin/sh

# id
uid=0(root) gid=0(root)
# su userx
# id
uid=203(userx) gid=203(userx) euid=0(root)

Is this expected behaviour? From source I can see it does setuid() which
should also modify euid. If not then what could be the issue?

Thanks!
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox