From owner-freebsd-current@FreeBSD.ORG Sun Jun 6 12:40:11 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9772C16A4CE for ; Sun, 6 Jun 2004 12:40:11 -0700 (PDT) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF66243D49 for ; Sun, 6 Jun 2004 12:40:10 -0700 (PDT) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id E27F61FFDC1 for ; Sun, 6 Jun 2004 21:40:08 +0200 (CEST) Received: by transport.cksoft.de (Postfix, from userid 66) id EC1171FF931; Sun, 6 Jun 2004 21:40:06 +0200 (CEST) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id B5A311559F; Sun, 6 Jun 2004 19:38:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id A9F4015329 for ; Sun, 6 Jun 2004 19:38:14 +0000 (UTC) Date: Sun, 6 Jun 2004 19:38:14 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: FreeBSD current mailing list Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de Subject: vfs_syscalls / fhstatfs / suser() X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 06 Jun 2004 19:40:11 -0000 Hi, if I am not wrong the part removed by the atatched diff is not needed because at the very beginning of the function there is a error = suser(td); if (error) return (error); so a second check should never become true again (if threads cannot be move in and out of jails). please correct me if I am wrong. --- ./vfs_syscalls.c.orig Sun Jun 6 19:32:23 2004 +++ ./vfs_syscalls.c Sun Jun 6 19:33:12 2004 @@ -4128,11 +4128,6 @@ fhstatfs(td, uap) sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK; if ((error = VFS_STATFS(mp, sp, td)) != 0) return (error); - if (suser(td)) { - bcopy(sp, &sb, sizeof(sb)); - sb.f_fsid.val[0] = sb.f_fsid.val[1] = 0; - sp = &sb; - } return (copyout(sp, uap->buf, sizeof(*sp))); } -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT