From owner-freebsd-questions@FreeBSD.ORG Fri Sep 22 18:29:43 2006 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F83E16A403 for ; Fri, 22 Sep 2006 18:29:43 +0000 (UTC) (envelope-from cswiger@mac.com) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.183]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0B3A443D83 for ; Fri, 22 Sep 2006 18:29:42 +0000 (GMT) (envelope-from cswiger@mac.com) Received: from mac.com (smtpin01-en2 [10.13.10.146]) by smtpout.mac.com (Xserve/8.12.11/smtpout13/MantshX 4.0) with ESMTP id k8MITdaa025509; Fri, 22 Sep 2006 11:29:39 -0700 (PDT) Received: from [17.214.13.96] (a17-214-13-96.apple.com [17.214.13.96]) (authenticated bits=0) by mac.com (Xserve/smtpin01/MantshX 4.0) with ESMTP id k8MITSpV011188; Fri, 22 Sep 2006 11:29:30 -0700 (PDT) In-Reply-To: <20060922180202.GB918@iphouse.com> References: <20060921182252.GA24321@xor.obsecurity.org> <20060921214316.GD673@iphouse.com> <6180D198-A44B-46D0-8A0B-FC5D3ACA115C@mac.com> <20060922180202.GB918@iphouse.com> Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <186AD616-6739-41EF-88F1-4F8B9BD417BC@mac.com> Content-Transfer-Encoding: 7bit From: Chuck Swiger Date: Fri, 22 Sep 2006 11:29:28 -0700 To: Robert Joosten X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes Cc: questions@freebsd.org Subject: Re: 6.1 and NFS X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Sep 2006 18:29:43 -0000 On Sep 22, 2006, at 11:02 AM, Robert Joosten wrote: >>> Hmmm, is there a way to run pxe-boxes without rpc.lockd and then >>> still >>> able to run adduser and so on ? >> Safely? No. But then, flock() doesn't work via NFS even if >> rpc.lockd is running, so you aren't any worse off. > > flock() .. hmm yeah, I discoverd trouble with sendmail as well, it > rings > my bell. At least I know where to look for digging in the code finding > clues about why. > > You say flock() doesn't work with rpc.lockd running. At least at one point, flock() used against an NFS-mount filesystem would simply return as if the call was successful, but no locking was done. Whether rpc.lockd is running or not would have no impact. > I observed running a pxe client running fbsd 5.[45] being served by > nfs-box running 5 (and 4 > nowadays because of asr0 trouble due to geom) having disabled > rpc.lockd > the box doens't let me run adduser, but with rpc.lockd enabled it's > fine > with 'em. Is that strange or am I missing (some) insight about this > matter? That's interesting. Are you getting a "could not lock the passwd file: EOPNOTSUPP" failure with rpc.lockd not enabled? I suspect that the pw_lock() code in libutil ought to use O_EXLOCK in the open() call rather than calling flock() separately: [EOPNOTSUPP] O_SHLOCK or O_EXLOCK is specified but the underlying file system does not support locking. ...? -- -Chuck