kern_exec.c (aa3c8c02ae61f1f8a756eea48960d53e43652ea3) kern_exec.c (56f21b9d74a516a6c2f67d09e1b6c588bfa54c6a)
1/*
2 * Copyright (c) 1993, David Greenman
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

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

531 (p->p_flag & P_TRACED) == 0) {
532 /*
533 * Turn off syscall tracing for set-id programs, except for
534 * root. Record any set-id flags first to make sure that
535 * we do not regain any tracing during a possible block.
536 */
537 setsugid(p);
538#ifdef KTRACE
1/*
2 * Copyright (c) 1993, David Greenman
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

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

531 (p->p_flag & P_TRACED) == 0) {
532 /*
533 * Turn off syscall tracing for set-id programs, except for
534 * root. Record any set-id flags first to make sure that
535 * we do not regain any tracing during a possible block.
536 */
537 setsugid(p);
538#ifdef KTRACE
539 if (p->p_tracevp != NULL && suser_cred(oldcred, PRISON_ROOT)) {
539 if (p->p_tracevp != NULL && suser_cred(oldcred, SUSER_ALLOWJAIL)) {
540 mtx_lock(&ktrace_mtx);
541 p->p_traceflag = 0;
542 tracevp = p->p_tracevp;
543 p->p_tracevp = NULL;
544 tracecred = p->p_tracecred;
545 p->p_tracecred = NULL;
546 mtx_unlock(&ktrace_mtx);
547 }

--- 669 unchanged lines hidden ---
540 mtx_lock(&ktrace_mtx);
541 p->p_traceflag = 0;
542 tracevp = p->p_tracevp;
543 p->p_tracevp = NULL;
544 tracecred = p->p_tracecred;
545 p->p_tracecred = NULL;
546 mtx_unlock(&ktrace_mtx);
547 }

--- 669 unchanged lines hidden ---