From owner-freebsd-current Mon Feb 11 19:21: 4 2002 Delivered-To: freebsd-current@freebsd.org Received: from newman2.bestweb.net (newman2.bestweb.net [209.94.102.67]) by hub.freebsd.org (Postfix) with ESMTP id 18BA237B4BF; Mon, 11 Feb 2002 18:17:44 -0800 (PST) Received: from okeeffe.bestweb.net (okeefe.bestweb.net [209.94.100.110]) by newman2.bestweb.net (Postfix) with ESMTP id 37AC2231A3; Mon, 11 Feb 2002 21:17:13 -0500 (EST) Received: by okeeffe.bestweb.net (Postfix, from userid 0) id A18379EFDB; Mon, 11 Feb 2002 21:12:09 -0500 (EST) Date: Fri, 8 Feb 2002 12:59:32 -0800 (PST) From: Julian Elischer To: John Baldwin Cc: current@freebsd.org Subject: cred stuff.. Message-Id: <20020212021209.A18379EFDB@okeeffe.bestweb.net> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I'd like to commit the code to keep the ucred across userland, with the code to clear it to NULL kept under DEBUG ifdefs. i.e. > in trap(), ast() and syscall() > > if (td->td_ucred != p->p_ucred) { > PROC_LOCK(p); > if (td->td_ucred) { > crfree(td->td_ucred); > td->td_ucred = NULL; > } > if (p->p_ucred != NULL) { > td->td_ucred = crhold(p->p_ucred); > } > PROC_UNLOCK(p); > } and in userret() and ast() >#ifdef DEBUG /*your choice of variable here*/ > PROC_LOCK(p); > if (td->td_ucred) { > crfree(td->td_ucred); > td->td_ucred = NULL; > } > PROC_UNLOCK(p); >#endif To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message