Debian Bug report logs - #703012
debianutils: ischroot can no longer detect vservers

version graph

Package: debianutils; Maintainer for debianutils is Ileana Dumitrescu <[email protected]>; Source for debianutils is src:debianutils (PTS, buildd, popcon).

Affects: initscripts

Reported by: Andrew Ruthven <[email protected]>

Date: Thu, 14 Mar 2013 00:54:01 UTC

Severity: wishlist

Tags: moreinfo, wontfix

Merged with 703010, 703011

Found in versions debianutils/4.3.2, debianutils/4.3.4

Reply or subscribe to this bug.

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


Report forwarded to [email protected], Clint Adams <[email protected]>:
Bug#703012; Package debianutils. (Thu, 14 Mar 2013 00:54:03 GMT) (full text, mbox, link).


Acknowledgement sent to Andrew Ruthven <[email protected]>:
New Bug report received and forwarded. Copy sent to Clint Adams <[email protected]>. (Thu, 14 Mar 2013 00:54:04 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Andrew Ruthven <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: debianutils: ischroot can no longer detect vservers
Date: Tue, 12 Mar 2013 23:12:28 +1300
[Message part 1 (text/plain, inline)]
Package: debianutils
Version: 4.3.4
Severity: important

[resubmitting as something seems to have gone wrong with creating the bug]
[third time's the charm?]

Dear Maintainer,

The ischroot code checks to see if it can access /proc/1/root to determine
if it is a running inside a chroot. Within vservers you can now read
/proc/1/root so it is no longer a sufficient test for vservers.

On newer vserver patches a better check is to look for a VxID line in
/proc/self/status.  If the line is present you're running a vserver
kernel.  If the value is 0, then you're on the physical host, anything
else means you're in a vserver.

Inside a vserver:

puck@build-sid-amd64:/$ grep VxID /proc/self/status
VxID: 12
puck@build-sid-amd64:/$ 

On the physical host:

build-servers:~$ grep VxID /proc/self/status
VxID: 0
puck@build-servers:~$ 

A patch that adds this behaviour is attached, please feel free to rewrite! Also,
method that I've supplied works for non-root users as well, but I haven't added
that support.

I've set this bug report to important as it is stopping initscripts from being
installable on a Wheezy vserver.

This is the case on Linux kernel 3.4 + 2.3.3.9 vserver patch.  The 3.2 kernel
set of patches is not affected by this change of behaviour.

Cheers!



-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-28-vserver (SMP w/1 CPU core)
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=POSIX (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages debianutils depends on:
ii  libc6           2.13-37
ii  sensible-utils  0.0.7

debianutils recommends no packages.

debianutils suggests no packages.

-- no debconf information



[ischroot.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Merged 703010 703012 Request was from Andrew Ruthven <[email protected]> to [email protected]. (Thu, 14 Mar 2013 01:03:03 GMT) (full text, mbox, link).


Added tag(s) patch. Request was from Andrew Ruthven <[email protected]> to [email protected]. (Thu, 14 Mar 2013 01:03:06 GMT) (full text, mbox, link).


Merged 703010 703011 703012 Request was from Andrew Ruthven <[email protected]> to [email protected]. (Thu, 14 Mar 2013 01:03:07 GMT) (full text, mbox, link).


Marked as found in versions debianutils/4.3.2. Request was from Andrew Ruthven <[email protected]> to [email protected]. (Sun, 17 Mar 2013 08:24:06 GMT) (full text, mbox, link).


Added indication that 703012 affects initscripts Request was from Andrew Ruthven <[email protected]> to [email protected]. (Sun, 17 Mar 2013 08:24:08 GMT) (full text, mbox, link).


Severity set to 'wishlist' from 'important' Request was from Clint Adams <[email protected]> to [email protected]. (Thu, 16 Sep 2021 19:57:03 GMT) (full text, mbox, link).


Information forwarded to [email protected]:
Bug#703012; Package debianutils. (Wed, 12 Jul 2023 21:39:02 GMT) (full text, mbox, link).


Acknowledgement sent to Bastian Germann <[email protected]>:
Extra info received and forwarded to list. (Wed, 12 Jul 2023 21:39:02 GMT) (full text, mbox, link).


Message #22 received at [email protected] (full text, mbox, reply):

From: Bastian Germann <[email protected]>
To: [email protected]
Subject: Re: debianutils: ischroot can no longer detect vservers
Date: Wed, 12 Jul 2023 23:37:48 +0200
Control: tags -1 wontfix moreinfo - patch

I do not see VxID on my systems. I guess there are changes in the kernel 
that made it disappear. If you still want to get an equivalent change in 
please post a patch that applies for current unstable kernel.



Added tag(s) moreinfo and wontfix. Request was from Bastian Germann <[email protected]> to [email protected]. (Wed, 12 Jul 2023 21:39:03 GMT) (full text, mbox, link).


Removed tag(s) patch. Request was from Bastian Germann <[email protected]> to [email protected]. (Wed, 12 Jul 2023 21:39:03 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 13:01:34 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General 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.