From owner-freebsd-current Wed Apr 26 05:57:49 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id FAA22929 for current-outgoing; Wed, 26 Apr 1995 05:57:49 -0700 Received: from bunyip.cc.uq.oz.au (bunyip.cc.uq.oz.au [130.102.2.1]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id FAA22923 for ; Wed, 26 Apr 1995 05:57:48 -0700 Received: from cc.uq.oz.au by bunyip.cc.uq.oz.au id <14282-0@bunyip.cc.uq.oz.au>; Wed, 26 Apr 1995 22:57:15 +1000 Received: by pandora.devetir.qld.gov.au (8.6.10/DEVETIR-E0.3a) id WAA28305; Wed, 26 Apr 1995 22:16:15 +1000 From: Stephen McKay Message-Id: <199504261216.WAA28305@pandora.devetir.qld.gov.au> To: terry@cs.weber.edu (Terry Lambert) cc: syssgm@devetir.qld.gov.au (Stephen McKay), current@FreeBSD.org Subject: Re: fcntl F_SETLK backward compatibility hack implemented In-reply-to: Your message of Tue, 25 Apr 95 19:41:42. <9504260141.AA03577@cs.weber.edu> Date: Wed, 26 Apr 95 22:16:13 EST Sender: current-owner@FreeBSD.org Precedence: bulk terry@cs.weber.edu (Terry Lambert) wrote: >syssgm@devetir.qld.gov.au (Stephen McKay) wrote: >> Well, since nobody objected :-) I went and implemented my proposed fix to >> fcntl locking. > >Coolness, Parker. 8-) 8-). Pardon? I'm hip and groovy, but who's Parker? :-( >If you're still in the neighborhood, could you add a long of 'sysid' >to the flock structure, pass 0 for the local machine, and use the number >to preterb the pid hash and lookup and compare it where you compare >the pid? > >You should force the sysid to 0 for the F_SETLK, F_SETLKW, and F_GETLK >calls, and implement F_RSETLK, F_RSETLKW, and F_RGETLK, which fail >for non-root users and respect the passed 'sysid' for root users? > >This would be a good step towards lockd support. Well, stick my head out and have it run over by a bus! Ok, if we add 'sysid' to struct flock it will change size and we'll need more backward compatibility stuff in fcntl(). Looks like we'll need flock_43 for the 1.1.5 version and flock_44 for the 2.0 version and a slightly more complicated backward compatibility patch. So, should we strike while the iron is hot? >If it's too much of a pain, forget it and I'll probably hit it at some >indefinite future date myself. Now looks like the best time to me. Stephen.