mirror of
https://github.com/opnsense/src.git
synced 2026-02-25 02:42:54 -05:00
The kernel should reject such exec()s now, early on. Instead of adding the needed boilerplate to write a test in C, just add an -n argument for "(n)ull argv" to the execve helper and exec this other helper that just exits silently with argv count. Reviewed by: emaste, kib, markj (all previous version) Differential Revision: https://reviews.freebsd.org/D34045
15 lines
172 B
C
15 lines
172 B
C
/*
|
|
* This file is in the public domain.
|
|
*/
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
int
|
|
main(int argc, char **argv __unused)
|
|
{
|
|
|
|
printf("%d\n", argc);
|
|
return (0);
|
|
}
|