lnstools

Linux namespace tools
git clone https://ccx.te2000.cz/git/lnstools
Log | Files | Refs | README

commit 46238adcde98353a4aaa829066091f79e3437a70
parent 6a07aa99d45f635e2804c4c9f08745fc44a75bc9
Author: Jan Pobrislo <ccx@te2000.cz>
Date:   Thu, 11 Dec 2025 20:40:30 +0000

Fix pointer representation in pivot_root wrapper function.

Diffstat:
Msrc/lns-lockdown_main.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lns-lockdown_main.c b/src/lns-lockdown_main.c @@ -39,7 +39,7 @@ struct unexport_s { /*** syscall wrappers ***/ int syscall_pivot_root(char const *new_root, char const *put_old) { - return syscall(SYS_pivot_root, *new_root, *put_old); + return syscall(SYS_pivot_root, new_root, put_old); } int syscall_seccomp_set_filter(unsigned int flags, void *args) { return syscall(__NR_seccomp, SECCOMP_SET_MODE_FILTER, flags, args); @@ -84,7 +84,7 @@ void pivot_and_umount( if (chdir(old_place_for_new_root) < 0) { strerr_diefu2sys(111, "chdir to ", old_place_for_new_root) ; } - if (syscall_pivot_root(old_place_for_new_root, new_place_for_old_root) < 0) { + if (syscall_pivot_root(".", new_place_for_old_root) < 0) { strerr_diefu1sys(111, "pivot_root") ; } if (chroot(".") < 0) {