]> git.proxmox.com Git - pve-common.git/commit - src/PVE/Tools.pm
Tools: add setresuid syscall
authorStoiko Ivanov <s.ivanov@proxmox.com>
Wed, 17 Apr 2019 08:51:36 +0000 (10:51 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 17 Apr 2019 10:00:24 +0000 (10:00 +0000)
commit0c078e6645ab644f979b367c1d8ee24f6e796822
tree342eef6ca64510be177995a8e87207b9c8a23ec4
parent096b5f5c06fedf934e83ec8e7567245fd544167e
Tools: add setresuid syscall

See `man 2 setresuid`. The code was tested with small UIDs (109) and
one which does not fit into 16 bit (100000000), since I wasn't too
sure about the workings of setresuid vs. setresuid32 (see NOTES of
the manpage) - it worked with both.

Linux on amd64 has only a single setresuid, as it the 64 bit arch
came after the setresuid32 syscall, and thus it started with the
later one as single common one

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PVE/Syscall.pm
src/PVE/Tools.pm