linux_misc.c (1930e303cfa1b9fe2c50fdad0d1ba6143311a53c) linux_misc.c (56f21b9d74a516a6c2f67d09e1b6c588bfa54c6a)
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

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

993 oldcred = p->p_ucred;
994
995 /*
996 * cr_groups[0] holds egid. Setting the whole set from
997 * the supplied set will cause egid to be changed too.
998 * Keep cr_groups[0] unchanged to prevent that.
999 */
1000
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

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

993 oldcred = p->p_ucred;
994
995 /*
996 * cr_groups[0] holds egid. Setting the whole set from
997 * the supplied set will cause egid to be changed too.
998 * Keep cr_groups[0] unchanged to prevent that.
999 */
1000
1001 if ((error = suser_cred(oldcred, PRISON_ROOT)) != 0) {
1001 if ((error = suser_cred(oldcred, SUSER_ALLOWJAIL)) != 0) {
1002 PROC_UNLOCK(p);
1003 crfree(newcred);
1004 return (error);
1005 }
1006
1007 crcopy(newcred, oldcred);
1008 if (ngrp > 0) {
1009 newcred->cr_ngroups = ngrp + 1;

--- 335 unchanged lines hidden ---
1002 PROC_UNLOCK(p);
1003 crfree(newcred);
1004 return (error);
1005 }
1006
1007 crcopy(newcred, oldcred);
1008 if (ngrp > 0) {
1009 newcred->cr_ngroups = ngrp + 1;

--- 335 unchanged lines hidden ---