| Allow PID 1 to be ptrace(2)d. |
| |
| diff -ru --exclude-from freebsd-src-diff-exclude-names /var/tmp/freebsd-src/usr/src/sys/kern/init_main.c freebsd-10.3/usr/src/sys/kern/init_main.c |
| --- /var/tmp/freebsd-src/usr/src/sys/kern/init_main.c 2016-03-25 09:09:26.000000000 +0800 |
| +++ freebsd-10.3/usr/src/sys/kern/init_main.c 2018-11-05 19:30:33.703793203 +0800 |
| @@ -833,7 +833,7 @@ |
| newcred = crget(); |
| sx_xlock(&proctree_lock); |
| PROC_LOCK(initproc); |
| - initproc->p_flag |= P_SYSTEM | P_INMEM; |
| + initproc->p_flag |= P_INMEM; |
| initproc->p_treeflag |= P_TREE_REAPER; |
| LIST_INSERT_HEAD(&initproc->p_reaplist, &proc0, p_reapsibling); |
| oldcred = initproc->p_ucred; |