[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#904707: fakeroot chown fails on kerberized NFSv4



Package: lintian
Version: 2.5.94

Hi,

When the Lintian test suite runs on a kerberized NFSv4 volume,
't/tests/files-wrong-owner' fails with this error message:

tests::files-wrong-owner: chown: changing ownership of
'debian/files-wrong-owner/usr/lib/filenames/wrong-owner-100:0':
Invalid argument
tests::files-wrong-owner: make[1]: *** [debian/rules:13:
override_dh_fixperms] Error 1

The full log is attached.

I can replicate the behavior by cloning Lintian from salsa and running
'./debian/rules runtests onlyrun=files-wrong-owner'. I isolated the
error in the shell script below (also attached). In a strange twist,
the script produces no error for some low uids here, including 0 and
1, but fails consistently for uids that don't exist. (The uid 100
exists but fails.) Please try a different uid if you do not get the
error right away.

#!/bin/sh
set -x
tmpdir="$(mktemp -d --tmpdir=.)"
tmpfile="$(mktemp --tmpdir=$tmpdir)"
fakeroot -- chown 17171:0 $tmpfile   # offending command
rm $tmpfile
rmdir $tmpdir

I do not see a workaround in Lintian, so the bug should probably be
reassigned to 'nfs-utils'. The bugs over there did not strike me
immediately as related. (I have other bugs open and would be happy to
help.) Here are my mount and export details:

/etc/exports (on server):
/srv/nfs
*(rw,sync,no_subtree_check,no_root_squash,sec=krb5i:krb5p,fsid=0)
/srv/nfs/acct
*(rw,sync,no_subtree_check,no_root_squash,sec=krb5i:krb5p,mountpoint)

/etc/fstab (on client):
server:/acct /acct nfs4 rw,sec=krb5i,fsc 0 0

Perhaps it is relevant that 'root' on the client is allowed to use the
machine credentials:

/etc/idmapd (on server):
[Translation]
Method = nsswitch
GSS-Methods = static,nsswitch
[Static]
host/client.domain.tld@DOMAIN.TLD = root
[Mapping]
Nobody-User = nobody
Nobody-Group = nogroup


Also,

(client) Linux client.domain.tld 4.17.0-1-amd64 #1 SMP Debian 4.17.8-1
(2018-07-20) x86_64 GNU/Linux
(server) Linux server.domain.tld 4.16.0-2-amd64 #1 SMP Debian
4.16.16-2 (2018-06-22) x86_64 GNU/Linux

and finally,

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.17.0-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8),
LANGUAGE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages lintian depends on:
ii  binutils                       2.31.1-1
ii  bzip2                          1.0.6-8.1
ii  diffstat                       1.61-1+b1
ii  dpkg                           1.19.0.5+b1
ii  file                           1:5.33-3
ii  gettext                        0.19.8.1-6+b1
ii  intltool-debian                0.35.0+20060710.4
ii  libapt-pkg-perl                0.1.34
ii  libarchive-zip-perl            1.60-1
ii  libclass-accessor-perl         0.51-1
ii  libclone-perl                  0.39-1
ii  libdigest-sha-perl             6.02-1
ii  libdpkg-perl                   1.19.0.5
ii  libemail-valid-perl            1.202-1
ii  libfile-basedir-perl           0.08-1
ii  libipc-run-perl                20180523.0-1
ii  liblist-moreutils-perl         0.416-1+b3
ii  libparse-debianchangelog-perl  1.2.0-12
ii  libtext-levenshtein-perl       0.13-1
ii  libtimedate-perl               2.3000-2
ii  liburi-perl                    1.74-1
ii  libxml-simple-perl             2.25-1
ii  libyaml-libyaml-perl           0.72+repack-1
ii  man-db                         2.8.3-2
ii  patchutils                     0.3.4-2
ii  perl [libdigest-sha-perl]      5.26.2-6
ii  t1utils                        1.41-2
ii  xz-utils                       5.2.2-1.3

Versions of packages lintian recommends:
ii  libperlio-gzip-perl  0.19-1+b4

Versions of packages lintian suggests:
ii  binutils-multiarch     2.31.1-1
ii  dpkg-dev               1.19.0.5
ii  libhtml-parser-perl    3.72-3+b2
ii  libtext-template-perl  1.53-1

-- no debconf information

Thank you!

Attachment: lintian-nfs-fakeroot-error.log.gz
Description: application/gzip

Attachment: nfsv4-fakeroot-chown-test.sh.gz
Description: application/gzip


Reply to: