From owner-freebsd-current Sat Feb 23 11:20:12 2002 Delivered-To: freebsd-current@freebsd.org Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by hub.freebsd.org (Postfix) with ESMTP id 461DA37B400; Sat, 23 Feb 2002 11:20:09 -0800 (PST) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020223192008.UHUK2626.rwcrmhc51.attbi.com@InterJet.elischer.org>; Sat, 23 Feb 2002 19:20:08 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id LAA79453; Sat, 23 Feb 2002 11:03:28 -0800 (PST) Date: Sat, 23 Feb 2002 11:03:27 -0800 (PST) From: Julian Elischer To: John Baldwin Cc: dillon@FreeBSD.org, current@FreeBSD.org Subject: Re: First (easy) td_ucred patch In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Fri, 22 Feb 2002, John Baldwin wrote: > http://www.FreeBSD.org/~jhb/patches/ucred.patch > The following diff removes the capacity to cope with the case when td is NULL. I presume it is there because it CAN be NULL. (Though I have not checked further.) --- //depot/vendor/freebsd/sys/fs/smbfs/smbfs_vnops.c 2001/12/20 08:43:46 +++ //depot/projects/smpng/sys/fs/smbfs/smbfs_vnops.c 2002/02/21 15:55:47 @@ -976,7 +976,6 @@ caddr_t id = (caddr_t)1 /* ap->a_id */; /* int flags = ap->a_flags;*/ struct thread *td = curthread; - struct proc *p = td ? td->td_proc : NULL; struct smb_cred scred; u_quad_t size; off_t start, end, oadd; @@ -1027,7 +1026,7 @@ return EOVERFLOW; end = start + oadd; } - smb_makescred(&scred, td, p ? p->p_ucred : NULL); + smb_makescred(&scred, td, td->td_ucred); switch (ap->a_op) { case F_SETLK: switch (fl->l_type) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message