From owner-freebsd-current Thu Jan 10 12:48:12 2002 Delivered-To: freebsd-current@freebsd.org Received: from mail11.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by hub.freebsd.org (Postfix) with ESMTP id 3CE4137B402 for ; Thu, 10 Jan 2002 12:48:10 -0800 (PST) Received: (qmail 1576 invoked from network); 10 Jan 2002 20:48:08 -0000 Received: from unknown (HELO laptop.baldwin.cx) ([64.81.54.73]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 10 Jan 2002 20:48:08 -0000 Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020110150538.GA26886@laptop.hackerheaven.org> Date: Thu, 10 Jan 2002 12:47:31 -0800 (PST) From: John Baldwin To: Emiel Kollof Subject: RE: kld question Cc: freebsd-current@freebsd.org 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 On 10-Jan-02 Emiel Kollof wrote: > I made a kernel module that logs execve system calls by intercepting the > execve syscall, log it and then execute the original syscall. This was > pretty straightforward to do, and it works beautifully on STABLE, but on > CURRENT it bombs on this line: > > uid = p->p_cred->pc_ucred->cr_uid; > > So, my question: how does one obtain the UID from the proc struct in > CURRENT? Preferably in a way that will both work on CURRENT and STABLE. p->p_ucred->cr_uid right now, but it will change before too long. :) -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message