init_main.c (982d11f836278f1e95ae1ae398aa4d1d07a19006) init_main.c (faef53711b12833053c3a430f78b4aa03684cf22)
1/*-
2 * Copyright (c) 1995 Terrence R. Lambert
3 * All rights reserved.
4 *
5 * Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993
6 * The Regents of the University of California. All rights reserved.
7 * (c) UNIX System Laboratories, Inc.
8 * All or some portions of this file are derived from material licensed

--- 427 unchanged lines hidden (view full) ---

436
437 /* Create credentials. */
438 p->p_ucred = crget();
439 p->p_ucred->cr_ngroups = 1; /* group 0 */
440 p->p_ucred->cr_uidinfo = uifind(0);
441 p->p_ucred->cr_ruidinfo = uifind(0);
442 p->p_ucred->cr_prison = NULL; /* Don't jail it. */
443#ifdef AUDIT
1/*-
2 * Copyright (c) 1995 Terrence R. Lambert
3 * All rights reserved.
4 *
5 * Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993
6 * The Regents of the University of California. All rights reserved.
7 * (c) UNIX System Laboratories, Inc.
8 * All or some portions of this file are derived from material licensed

--- 427 unchanged lines hidden (view full) ---

436
437 /* Create credentials. */
438 p->p_ucred = crget();
439 p->p_ucred->cr_ngroups = 1; /* group 0 */
440 p->p_ucred->cr_uidinfo = uifind(0);
441 p->p_ucred->cr_ruidinfo = uifind(0);
442 p->p_ucred->cr_prison = NULL; /* Don't jail it. */
443#ifdef AUDIT
444 audit_proc_alloc(p);
445 audit_proc_kproc0(p);
444 audit_cred_kproc0(p->p_ucred);
446#endif
447#ifdef MAC
448 mac_create_proc0(p->p_ucred);
449#endif
450 td->td_ucred = crhold(p->p_ucred);
451
452 /* Create sigacts. */
453 p->p_sigacts = sigacts_alloc();

--- 248 unchanged lines hidden (view full) ---

702 PROC_LOCK(initproc);
703 initproc->p_flag |= P_SYSTEM;
704 oldcred = initproc->p_ucred;
705 crcopy(newcred, oldcred);
706#ifdef MAC
707 mac_create_proc1(newcred);
708#endif
709#ifdef AUDIT
445#endif
446#ifdef MAC
447 mac_create_proc0(p->p_ucred);
448#endif
449 td->td_ucred = crhold(p->p_ucred);
450
451 /* Create sigacts. */
452 p->p_sigacts = sigacts_alloc();

--- 248 unchanged lines hidden (view full) ---

701 PROC_LOCK(initproc);
702 initproc->p_flag |= P_SYSTEM;
703 oldcred = initproc->p_ucred;
704 crcopy(newcred, oldcred);
705#ifdef MAC
706 mac_create_proc1(newcred);
707#endif
708#ifdef AUDIT
710 audit_proc_init(initproc);
709 audit_cred_proc1(newcred);
711#endif
712 initproc->p_ucred = newcred;
713 PROC_UNLOCK(initproc);
714 crfree(oldcred);
715 cred_update_thread(FIRST_THREAD_IN_PROC(initproc));
716 PROC_SLOCK(initproc);
717 initproc->p_sflag |= PS_INMEM;
718 PROC_SUNLOCK(initproc);

--- 19 unchanged lines hidden ---
710#endif
711 initproc->p_ucred = newcred;
712 PROC_UNLOCK(initproc);
713 crfree(oldcred);
714 cred_update_thread(FIRST_THREAD_IN_PROC(initproc));
715 PROC_SLOCK(initproc);
716 initproc->p_sflag |= PS_INMEM;
717 PROC_SUNLOCK(initproc);

--- 19 unchanged lines hidden ---