From owner-freebsd-current Thu Jan 10 7: 6:14 2002 Delivered-To: freebsd-current@freebsd.org Received: from router.hackerheaven.org (qn-213-73-194-22.quicknet.nl [213.73.194.22]) by hub.freebsd.org (Postfix) with ESMTP id 009B437B41A for ; Thu, 10 Jan 2002 07:06:10 -0800 (PST) Received: by router.hackerheaven.org (Postfix, from userid 1000) id 585B21C05; Thu, 10 Jan 2002 16:05:38 +0100 (CET) Date: Thu, 10 Jan 2002 16:05:38 +0100 From: Emiel Kollof To: freebsd-current@freebsd.org Subject: kld question Message-ID: <20020110150538.GA26886@laptop.hackerheaven.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.25i X-Mailer: Mutt 1.3.23i (2001-10-09) X-Editor: Vim http://www.vim.org/ X-Info: http://www.hackerheaven.org/ X-Info2: http://www.cmdline.org/ X-Info3: http://www.coolvibe.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 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. Cheers, Emiel -- I'm proud to be paying taxes in the United States. The only thing is -- I could be just as proud for half the money. -- Arthur Godfrey To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message