pinsyscall(SYS_execve, ...). Upon review, this is a fairly small
set of programs which either pledge() aggressively or don't usually
operate in a risky operating environment. We now point at a location
which is definately not a "syscall" instruction.
ok kettenis
-/* $OpenBSD: init.c,v 1.18 2023/02/27 15:00:17 deraadt Exp $ */
+/* $OpenBSD: init.c,v 1.19 2023/10/12 16:37:05 deraadt Exp $ */
/*
* Copyright (c) 2014,2015 Philip Guenther <guenther@openbsd.org>
*
extern const int _execve_size;
pinsyscall(SYS_execve, &HIDDEN(execve), _execve_size);
+ } else {
+ static const int not_syscall;
+
+ /* Static binary which does not use execve() */
+ pinsyscall(SYS_execve, (void *)¬_syscall, 1);
}
#endif
}