Debian Bug report logs - #200701
apt-get install foo fails when invoked through sudo by a NFS homed user

version graph

Package: dpkg; Maintainer for dpkg is Dpkg Developers <debian-dpkg@lists.debian.org>; Source for dpkg is src:dpkg.

Reported by: Nicolas Tisserand <nicolas.tisserand@lrde.epita.fr>

Date: Wed, 9 Jul 2003 22:33:05 UTC

Severity: important

Tags: patch

Fixed in version dpkg/1.10.21

Done: Scott James Remnant <scott@netsplit.com>

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, APT Development Team <deity@lists.debian.org>:
Bug#200701; Package apt. Full text and rfc822 format available.

Acknowledgement sent to Nicolas Tisserand <nicolas.tisserand@lrde.epita.fr>:
New Bug report received and forwarded. Copy sent to APT Development Team <deity@lists.debian.org>. Full text and rfc822 format available.

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

From: Nicolas Tisserand <nicolas.tisserand@lrde.epita.fr>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: apt-get install foo fails when invoked through sudo by a NFS homed user
Date: Thu, 10 Jul 2003 00:21:32 +0200
Package: apt
Version: 0.5.5.1
Severity: important



-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux bloup 2.4.21-bloup.peuh.net #1 dim jun 29 20:32:53 CEST 2003 i686
Locale: LANG=C, LC_CTYPE=fr_FR.ISO-8859-1

Versions of packages apt depends on:
ii  libc6                      2.3.1-17      GNU C Library: Shared libraries an
ii  libgcc1                    1:3.3.1-0pre0 GCC support library
ii  libstdc++5                 1:3.3.1-0pre0 The GNU Standard C++ Library v3

-- no debconf information

apt-get fails under the following conditions:

* apt-get is invoked by a non-privileged user through sudo

* the user home directory is located on a NFS partition, for which
the local root user has no root privileges.

* the user home directory has drastic permissions (700 mode)


Here is an example transcript :

loup@bloup:~ echo $HOME                                                   0:15
/home/peuh/bloup
bloup@bloup:~ mount | grep /home/peuh                                      0:15
files:/home/peuh on /home/peuh type nfs (rw,nosuid,nodev,bg,addr=192.168.1.2)
bloup@bloup:~ ls -ld ~                                                     0:15
drwx------  109 bloup    peuh         8192 Jul  9 23:54 /home/peuh/bloup/
bloup@bloup:~ sudo apt-get install libmad0-dev                             0:15
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  libmad0-dev
0 packages upgraded, 1 newly installed, 0 to remove and 59 not upgraded.
Need to get 0B/68.0kB of archives.
After unpacking 168kB of additional disk space will be used.
dpkg: failed to open configuration file `/home/peuh/bloup/.dpkg.cfg' for reading: Permission denied
E: Sub-process /usr/bin/dpkg returned an error code (2)
bloup@bloup:~ chmod 711 ~                                          Err 100 0:15
bloup@bloup:~ sudo apt-get install libmad0-dev                             0:16
Reading Package Lists... Done
Building Dependency Tree... Done
The following NEW packages will be installed:
  libmad0-dev
0 packages upgraded, 1 newly installed, 0 to remove and 59 not upgraded.
Need to get 0B/68.0kB of archives.
After unpacking 168kB of additional disk space will be used.
Selecting previously deselected package libmad0-dev.
(Reading database ... 168448 files and directories currently installed.)
Unpacking libmad0-dev (from .../libmad0-dev_0.15.0b-1_i386.deb) ...
Setting up libmad0-dev (0.15.0b-1) ...
bloup@bloup:~                                                              0:16




Bug reassigned from package `apt' to `dpkg'. Request was from Matt Zimmerman <mdz@debian.org> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Development <debian-dpkg@lists.debian.org>:
Bug#200701; Package dpkg. Full text and rfc822 format available.

Acknowledgement sent to Max Vozeler <max@hinterhof.net>:
Extra info received and forwarded to list. Copy sent to Dpkg Development <debian-dpkg@lists.debian.org>. Full text and rfc822 format available.

Message #12 received at 200701@bugs.debian.org (full text, mbox):

From: Max Vozeler <max@hinterhof.net>
To: 200701@bugs.debian.org
Subject: dpkg fails if $HOME/.dpkg.cfg is unreadable
Date: Sat, 26 Jul 2003 17:29:29 +0200
[Message part 1 (text/plain, inline)]
Hi Nicolas,

I had the same problem with an NFS-mounted $HOME. The culprit is in
lib/libmyopt.c: void myfileopt() which is called by loadcfgfile() 
and exits with ohshite() upon failure.

As I understand it, both the system-wide and the user config are
optional, so errors opening either should not be any more grave than
a non-existing file.

The attached patch changes that behaviour: It changes the ohshite()
fatal error to a warning and continues should the config not exist or
be readable.

Does it fix your problem too?

Adam, dpkg is pretty new territory for me. I've tested the patch for a
while but I'm not totally confident it doesnt break anything, including
style :)

Greets,
Max
[patch-nofailreaderr (text/plain, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Dpkg Development <debian-dpkg@lists.debian.org>:
Bug#200701; Package dpkg. Full text and rfc822 format available.

Acknowledgement sent to Aurélien Le Provost <AurelienLP@free.fr>:
Extra info received and forwarded to list. Copy sent to Dpkg Development <debian-dpkg@lists.debian.org>.

Your message did not contain a Subject field. They are recommended and useful because the title of a Bug is determined using this field. Please remember to include a Subject field in your messages in future.

Full text and rfc822 format available.


Message #17 received at 200701@bugs.debian.org (full text, mbox):

From: Aurélien Le Provost <AurelienLP@free.fr>
To: 200701@bugs.debian.org
Date: Tue, 16 Sep 2003 19:20:05 +0200
Hello

I have the same config, and the same problem.

If root umount the home partition, exported through NFS, a non-privilegied user
can go in /tmp for example, an use apt-get through sudo...

But if root remount the NFS partition, so he can't wherever he is (include
/tmp). Don't understand...

Aurélien Le Provost.

-- 
Utilisateurs de Linux, enregistrez-vous :
http://counter.li.org/






Tags added: patch Request was from Thomas Hood <jdthood@yahoo.co.uk> to control@bugs.debian.org. Full text and rfc822 format available.

Reply sent to Scott James Remnant <scott@netsplit.com>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to Nicolas Tisserand <nicolas.tisserand@lrde.epita.fr>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #24 received at 200701-close@bugs.debian.org (full text, mbox):

From: Scott James Remnant <scott@netsplit.com>
To: 200701-close@bugs.debian.org
Subject: Bug#200701: fixed in dpkg 1.10.21
Date: Sun, 25 Apr 2004 14:17:03 -0400
Source: dpkg
Source-Version: 1.10.21

We believe that the bug you reported is fixed in the latest version of
dpkg, which is due to be installed in the Debian FTP archive:

dpkg-dev_1.10.21_all.deb
  to pool/main/d/dpkg/dpkg-dev_1.10.21_all.deb
dpkg-doc_1.10.21_all.deb
  to pool/main/d/dpkg/dpkg-doc_1.10.21_all.deb
dpkg_1.10.21.dsc
  to pool/main/d/dpkg/dpkg_1.10.21.dsc
dpkg_1.10.21.tar.gz
  to pool/main/d/dpkg/dpkg_1.10.21.tar.gz
dpkg_1.10.21_i386.deb
  to pool/main/d/dpkg/dpkg_1.10.21_i386.deb
dselect_1.10.21_i386.deb
  to pool/main/d/dpkg/dselect_1.10.21_i386.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 200701@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Scott James Remnant <scott@netsplit.com> (supplier of updated dpkg package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sun, 25 Apr 2004 18:55:10 +0100
Source: dpkg
Binary: dpkg-doc dpkg dselect dpkg-dev dpkg-static
Architecture: source all i386
Version: 1.10.21
Distribution: unstable
Urgency: low
Maintainer: Dpkg Development <debian-dpkg@lists.debian.org>
Changed-By: Scott James Remnant <scott@netsplit.com>
Description: 
 dpkg       - Package maintenance system for Debian
 dpkg-dev   - Package building tools for Debian
 dpkg-doc   - Dpkg Internals Documentation
 dselect    - a user tool to manage Debian packages
Closes: 10879 33046 47267 90623 98210 102094 109669 109691 115352 120970 124225 146167 151799 155456 158916 160761 161156 166052 171489 174973 174978 179192 187952 200701 200763 204275 207758 214699 219210 220776 225086 233614 237589 237624 237864 239000 240081 241503 242870 243191 244098 244316
Changes: 
 dpkg (1.10.21) unstable; urgency=low
 .
   * Fix incorrect linked list node removal code that caused every second
     shared or diverted conffile to be deleted by dpkg.
     Closes: #10879, #33046, #47267, #90623, #98210, #109691, #146167.
     Closes: #155456, #204275.
   * Call mknod with the required device type.  Closes: #158916.
   * Correct the default query output format to be consistent with
     what the underlying library expects.  Closes: #174973.
   * Fix missing NULL-termination in dpkg-query -W display of dependency
     fields.  Closes: #174978
   * Strip output from md5sum(1) after the first whitespace character.
     Closes: #200763.
   * Output a warning if we cannot open a configuration file instead of
     treating it as a fatal error, in case our home directory is not readable
     by root.  Closes: #200701.
   * Set LC_ALL to C before spawning off dpkg --search, to avoid searching
     on localized strings.  Closes: #244316.
   * Don't require argument for start-stop-daemon -V.  Closes: #237589.
   * Correct use of @ARGV within dpkg-scanpackages, allowing -u to work
     once again.  Closes: #225086, #241503.
   * Make sure file permissions passed to dpkg-statoverride are numeric.
     Closes: #161156.
   * Correctly break out of the loop in install-info.
     Closes: #124225, #160761.
   * Add --dir-file option to install-info for GNU install-info
     compatibility.  Closes: #179192
   * Refer to debian-policy in dpkg-doc's description instead of the
     non-existant packaging-manual.  Closes: #120970.
   * Remove incorrect mention of build-essential from dpkg-checkbuilddeps
     manpage.  Closes: #219210.
   * Add a note about diverting shared libraries to the dpkg-divert
     manpage.  Closes: #214699.
   * Updated Translations:
     - Brazilian Portugese (Andre Luis Lopes).  Closes: #237864.
     - Catalan (Jordi Mallach).
     - Danish (Claus Hindsgaul).  Closes: #237624.
     - Dutch (Pieter-Paul Spiertz, Bart Cornelis, Erwin).
       Closes: #102094, #151799, #207758.
     - French (Sam Hocevar).  Closes: #243191.
     - German (Florian Ernst).  Closes: #109669, #115352, #187952, #244098.
     - Japanese manpages (KISE Hiroshi).  Closes: #220776.
     - Polish (Bartosz Fenski).  Closes: #242870.
     - Spanish (Javier Fernández-Sanguino Peña).  Closes: #166052.
     - Swedish (Peter Karlsson).
   * New Translations:
     - Japanese dpkg-source manpage (KISE Hiroshi).  Closes: #239000.
     - Norwegian Nynorsk (Gaute Hvoslef Kvalnes).  Closes: #233614.
     - Portguese (Miguel Figueiredo).  Closes: #240081.
     - Spanish dpkg-source manpage (Ruben Porras).  Closes: #171489.
Files: 
 3c0ee1d26bd55362b92eee8e6255aee0 798 base required dpkg_1.10.21.dsc
 a9f6c43891db74d727beab7dfc0ee663 1682647 base required dpkg_1.10.21.tar.gz
 e492251ba4cf345982782b7880056e1f 1220962 base required dpkg_1.10.21_i386.deb
 132ac9df0f3dd8fd8b7adbf409f8ed3e 105530 base required dselect_1.10.21_i386.deb
 48e0a00caea19997c46ad2d7539b2731 137490 utils standard dpkg-dev_1.10.21_all.deb
 794381a64e07416e48af7d6bb4ae52d0 10620 doc optional dpkg-doc_1.10.21_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAi/2fIexP3IStZ2wRAn8pAJ9/rxk0uozGIQta1eA1i+IQZIQx9QCgpA1B
Hn7++hlhNM0b38XnzfCRzhg=
=GiSq
-----END PGP SIGNATURE-----




Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 16:36:28 2014; Machine Name: buxtehude.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.