[a4d8e19] | 1 | /** |
---|
| 2 | * @file |
---|
| 3 | * |
---|
| 4 | * @ingroup rtems_bsd_rtems |
---|
| 5 | */ |
---|
| 6 | |
---|
| 7 | /* |
---|
| 8 | * Copyright (c) 2012 On-Line Applications Research Corporation (OAR). |
---|
| 9 | * All rights reserved. |
---|
| 10 | * |
---|
| 11 | * Redistribution and use in source and binary forms, with or without |
---|
| 12 | * modification, are permitted provided that the following conditions |
---|
| 13 | * are met: |
---|
| 14 | * 1. Redistributions of source code must retain the above copyright |
---|
| 15 | * notice, this list of conditions and the following disclaimer. |
---|
| 16 | * 2. Redistributions in binary form must reproduce the above copyright |
---|
| 17 | * notice, this list of conditions and the following disclaimer in the |
---|
| 18 | * documentation and/or other materials provided with the distribution. |
---|
| 19 | * |
---|
| 20 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND |
---|
| 21 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
---|
| 22 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
---|
| 23 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE |
---|
| 24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
---|
| 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
---|
| 26 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
---|
| 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
---|
| 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
---|
| 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
---|
| 30 | * SUCH DAMAGE. |
---|
| 31 | */ |
---|
| 32 | |
---|
| 33 | #include <freebsd/machine/rtems-bsd-config.h> |
---|
| 34 | |
---|
| 35 | #include <freebsd/sys/param.h> |
---|
| 36 | #include <freebsd/sys/types.h> |
---|
| 37 | #include <freebsd/sys/systm.h> |
---|
| 38 | #include <freebsd/sys/proc.h> |
---|
| 39 | #include <freebsd/sys/jail.h> |
---|
| 40 | #include <freebsd/sys/kernel.h> |
---|
| 41 | |
---|
| 42 | struct ucred *rtems_bsd_thread0_ucred; |
---|
| 43 | |
---|
| 44 | static void rtems_bsd_thread0_ucred_init(void *arg) |
---|
| 45 | { |
---|
| 46 | rtems_bsd_thread0_ucred = crget(); |
---|
| 47 | rtems_bsd_thread0_ucred->cr_ngroups = 1; /* group 0 */ |
---|
| 48 | rtems_bsd_thread0_ucred->cr_uidinfo = uifind(0); |
---|
| 49 | rtems_bsd_thread0_ucred = uifind(0); |
---|
| 50 | rtems_bsd_thread0_ucred->cr_prison = &prison0; |
---|
| 51 | } |
---|
| 52 | |
---|
[8aecdc0] | 53 | SYSINIT(cpu, SI_SUB_INTRINSIC, SI_ORDER_SECOND, rtems_bsd_thread0_ucred_init, NULL); |
---|