Debian Bug report logs - #43448
nfs-common: --enable-secure-statd breaks fcntl() locking

version graph

Package: nfs-common; Maintainer for nfs-common is Debian kernel team <debian-kernel@lists.debian.org>; Source for nfs-common is src:nfs-utils (PTS, buildd, popcon).

Reported by: Roland Rosenfeld <roland@spinnaker.de>

Date: Wed, 25 Aug 1999 00:06:16 UTC

Severity: important

Found in version 1.4.7-1.1

Fixed in version knfs/1.4.7-2

Done: Anders Hammarquist <iko@cd.chalmers.se>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Anders Hammarquist <iko@debian.org>:
Bug#43448; Package nfs-common. (full text, mbox, link).


Acknowledgement sent to Roland Rosenfeld <roland@spinnaker.de>:
New bug report received and forwarded. Copy sent to Anders Hammarquist <iko@debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Roland Rosenfeld <roland@spinnaker.de>
To: submit@bugs.debian.org
Subject: nfs-common: --enable-secure-statd breaks fcntl() locking
Date: Wed, 25 Aug 1999 01:27:49 +0200
Package: nfs-common
Version: 1.4.7-1.1
Severity: important

The Debian knfs package is compiled with --enable-secure-statd, which
causes big problems with fcntl() locking.

Try this little test program (or a Mutt mail reader compiled with
fcntl() locking):

---------------------- schnipp -----------------------------
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>

int main (int argc, char *argv[]) 
{
  struct flock lck;
  int fd, ret;
  if (argc != 2) {
    printf ("Usage: %s file to lock\n", argv[0]);
    return 1;
  }
  fd = open (argv[1], O_RDONLY);
  memset (&lck, 0, sizeof (struct flock));
  lck.l_type = F_RDLCK;
  lck.l_whence = SEEK_SET;
  ret = fcntl (fd, F_SETLK, &lck);
  printf ("fcntl()=%i, errno=%i\n", ret, errno);
  return 0;
}
---------------------- schnipp -----------------------------

When this is used to lock a file on a NFS mounted file system (server
running knfsd, server mounts _without_ "nolock"), I get errno=37
(ENOLCK) and the client's kernel reports:

lockd: cannot monitor www.xxx.yyy.zzz
lockd: failed to monitor www.xxx.yyy.zzz

I contacted H.J. Lu (the upstream author of knfs) and he found out,
that the problem depends on the configure option --enable-secure-statd.

I removed that option from debian/rules and now the locking seems to
work without problems.

I'm not completely sure, where this option is good for, but I think we 
should remove it until it works correct.

Ciao

        Roland

-- System Information
Debian Release: potato
Kernel Version: Linux spinnaker 2.2.11 #1 Don Aug 19 22:41:08 CEST 1999 i586 unknown

Versions of the packages nfs-common depends on:
hi  libc6           2.1.2-0pre7    GNU C Library: Shared libraries and timezone
hi  netbase         3.15-4         Basic TCP/IP networking binaries


Reply sent to Anders Hammarquist <iko@cd.chalmers.se>:
You have taken responsibility. (full text, mbox, link).


Notification sent to Roland Rosenfeld <roland@spinnaker.de>:
Bug acknowledged by developer. (full text, mbox, link).


Message #10 received at 43448-done@bugs.debian.org (full text, mbox, reply):

From: Anders Hammarquist <iko@cd.chalmers.se>
To: Roland Rosenfeld <roland@debian.org>, 43450@bugs.debian.org, 43448-done@bugs.debian.org
Subject: Re: Bug#43450: nfs-common: debian/rules includes bashisms
Date: Fri, 27 Aug 1999 12:09:55 +0200
> On Thu, 26 Aug 1999, Debian Bug Tracking System wrote:
> 
> >  knfs (1.4.7-2) unstable; urgency=medium
> >  .
> >    * Don't use broken(?) --enable-secure-statd (closes: Bug#43498,
> >      Bug#43450)
> >    * Handle move of exports manpage (closes: Bug#43440)
> 
> It is not true, that 1.4.7-2 closes #43450.
> In #43450 I noted the problem, that debian/rules uses bashisms like
> this:
>         rm -f debian/tmp/usr/man/man8/rpc.{mountd,nfsd,statd}.8
>                                           ^                 ^
> which doesn't work with ash as /bin/sh.

I typoed (or readoed?). It's supposed to read #43448, which it does fix.
I'll take care of the other bugs when I get back from vacation.

/Anders


-- 
 -- Of course I'm crazy, but that doesn't mean I'm wrong.
Anders Hammarquist                                  | iko@cd.chalmers.se
Physics student                                     | Hem: +46 31 47 69 27
Chalmers University of Technology, G|teborg, Sweden | Mob: +46 707 27 86 87




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Jun 1 19:32:57 2024; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.