linux_uid16.c (1930e303cfa1b9fe2c50fdad0d1ba6143311a53c) linux_uid16.c (56f21b9d74a516a6c2f67d09e1b6c588bfa54c6a)
1/*-
2 * Copyright (c) 2001 The FreeBSD Project
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

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

111 oldcred = p->p_ucred;
112
113 /*
114 * cr_groups[0] holds egid. Setting the whole set from
115 * the supplied set will cause egid to be changed too.
116 * Keep cr_groups[0] unchanged to prevent that.
117 */
118
1/*-
2 * Copyright (c) 2001 The FreeBSD Project
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

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

111 oldcred = p->p_ucred;
112
113 /*
114 * cr_groups[0] holds egid. Setting the whole set from
115 * the supplied set will cause egid to be changed too.
116 * Keep cr_groups[0] unchanged to prevent that.
117 */
118
119 if ((error = suser_cred(oldcred, PRISON_ROOT)) != 0) {
119 if ((error = suser_cred(oldcred, SUSER_ALLOWJAIL)) != 0) {
120 PROC_UNLOCK(p);
121 crfree(newcred);
122 return (error);
123 }
124
125 crcopy(newcred, oldcred);
126 if (ngrp > 0) {
127 newcred->cr_ngroups = ngrp + 1;

--- 165 unchanged lines hidden ---
120 PROC_UNLOCK(p);
121 crfree(newcred);
122 return (error);
123 }
124
125 crcopy(newcred, oldcred);
126 if (ngrp > 0) {
127 newcred->cr_ngroups = ngrp + 1;

--- 165 unchanged lines hidden ---