kern_ktrace.c (552afd9c120e6b11dbb1acf319bd71a4e9f2b913) | kern_ktrace.c (56f21b9d74a516a6c2f67d09e1b6c588bfa54c6a) |
---|---|
1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. 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 --- 881 unchanged lines hidden (view full) --- 890static int 891ktrcanset(td, targetp) 892 struct thread *td; 893 struct proc *targetp; 894{ 895 896 PROC_LOCK_ASSERT(targetp, MA_OWNED); 897 if (targetp->p_traceflag & KTRFAC_ROOT && | 1/* 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. 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 --- 881 unchanged lines hidden (view full) --- 890static int 891ktrcanset(td, targetp) 892 struct thread *td; 893 struct proc *targetp; 894{ 895 896 PROC_LOCK_ASSERT(targetp, MA_OWNED); 897 if (targetp->p_traceflag & KTRFAC_ROOT && |
898 suser_cred(td->td_ucred, PRISON_ROOT)) | 898 suser_cred(td->td_ucred, SUSER_ALLOWJAIL)) |
899 return (0); 900 901 if (p_candebug(td, targetp) != 0) 902 return (0); 903 904 return (1); 905} 906 907#endif /* KTRACE */ | 899 return (0); 900 901 if (p_candebug(td, targetp) != 0) 902 return (0); 903 904 return (1); 905} 906 907#endif /* KTRACE */ |