Deleted Added
full compact
linux_misc.c (46112) linux_misc.c (46116)
1/*-
2 * Copyright (c) 1994-1995 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
1/*-
2 * Copyright (c) 1994-1995 S�ren Schmidt
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

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

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $Id: linux_misc.c,v 1.54 1999/04/19 14:14:14 peter Exp $
28 * $Id: linux_misc.c,v 1.55 1999/04/27 11:15:32 phk Exp $
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/sysproto.h>
34#include <sys/kernel.h>
35#include <sys/mman.h>
36#include <sys/proc.h>

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

1129 struct proc *p;
1130 struct linux_setgroups_args *uap;
1131{
1132 struct pcred *pc = p->p_cred;
1133 linux_gid_t linux_gidset[NGROUPS];
1134 gid_t *bsd_gidset;
1135 int ngrp, error;
1136
29 */
30
31#include <sys/param.h>
32#include <sys/systm.h>
33#include <sys/sysproto.h>
34#include <sys/kernel.h>
35#include <sys/mman.h>
36#include <sys/proc.h>

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

1129 struct proc *p;
1130 struct linux_setgroups_args *uap;
1131{
1132 struct pcred *pc = p->p_cred;
1133 linux_gid_t linux_gidset[NGROUPS];
1134 gid_t *bsd_gidset;
1135 int ngrp, error;
1136
1137 if ((error = suser_xxx(pc->pc_ucred, &p->p_acflag)))
1137 if ((error = suser(p)))
1138 return error;
1139
1140 if (uap->gidsetsize > NGROUPS)
1141 return EINVAL;
1142
1143 ngrp = uap->gidsetsize;
1144 pc->pc_ucred = crcopy(pc->pc_ucred);
1145 if (ngrp >= 1) {

--- 53 unchanged lines hidden ---
1138 return error;
1139
1140 if (uap->gidsetsize > NGROUPS)
1141 return EINVAL;
1142
1143 ngrp = uap->gidsetsize;
1144 pc->pc_ucred = crcopy(pc->pc_ucred);
1145 if (ngrp >= 1) {

--- 53 unchanged lines hidden ---