[Bug 1977745] Re: nfs-utils/nfs-kernel-server (rpc.svcgssd) ignored /etc/nfs.conf settings

Marcel 1977745 at bugs.launchpad.net
Wed Jun 8 16:52:35 UTC 2022


Also sending the patches here.

Easy way to test:

1. Edit /etc/nfs.conf:

[svcgssd]
principal=nfs/testhost.mydomain.de at MYDOMAIN.DE

2. Try to run
  /usr/sbin/rpc.svcgssd -f (.deb version)
  This will fail even if you set a correct principal name
  that's present in /etc/krb5.keytab

3. Unpack nfs-utils sources and apply patch 02-nfs-utils-log-principal.patch.
   (This only adds an output of the principal set in the config)

   Then run:
   LD_LIBRARY_PATH=./support/nfsidmap/.libs ./utils/gssd/.libs/svcgssd -f

   The output shows some random principal string

4. Apply patch 01-nfs-utils-fix-conf.patch (patch will be in next
comment, only one patch per comment) and compile again

   Run above test again:
   LD_LIBRARY_PATH=./support/nfsidmap/.libs ./utils/gssd/.libs/svcgssd -f

   This time the principal set by you should be shown.

As a side note: Patch #3 is only about adding some undocumented options.

** Patch added: "cifs-utils/svcgssd: Display principal if set"
   https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1977745/+attachment/5595660/+files/02-nfs-utils-log-principal.patch

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to nfs-utils in Ubuntu.
https://bugs.launchpad.net/bugs/1977745

Title:
  nfs-utils/nfs-kernel-server (rpc.svcgssd) ignored /etc/nfs.conf
  settings

Status in nfs-utils package in Ubuntu:
  New

Bug description:
  Tested on:
   Ubuntu 22.04 (x86_64)
   Package: nfs-kernel-server 1:2.6.1-1ubuntu1

  Set config options in /etc/nfs.conf are ignored by rpc.svcgssd
  (required for krb5 NFSv4).

  I was trying to set the principal name like:

  [svcgssd]
  principal=nfs/myhost.mydomain.de at MYDOMAIN.DE

  but rpc.svcgssd refused to start. When specified on command line
  (using the -p option) things started working.

  After having a look at the code (nfs-
  utils-2.6.1/utils/gssd/svcgssd.c), the problem seems to be

          /* We don't need the config anymore */
          conf_cleanup();

  which is called too early. So at the point where gssd_acquire_cred()
  is called the variable "principal" does no longer contain the data
  read from the config file.

  Moving conf_cleanup() to the end of the code helps.

  I also tried to get into contact with the nfs-utils developer
  themselves - but I hope someone at Ubuntu has a better way to contact
  them.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1977745/+subscriptions




More information about the foundations-bugs mailing list