mountall does not preserve all attributes from /lib/udev/devices when populating /dev

Bug #507162 reported by Mat Martineau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mountall (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: mountall

Population of the /dev directory from /lib/udev/devices has changed with karmic.

In previous releases, "cp -a" was used to copy the device nodes in the udev init script. This preserved mode and ownership information on each device node.

mountall uses mknod() to populate /dev using the files in /lib/udev/devices as templates, but mknod() creates file system nodes owned by effective user ID of the process and the 'mode' parameter to mknod() is subject to the process' umask. All nodes are owned by root:root and are never writeable by non-root users, no matter what the user, group, or permissions are in /lib/udev/devices.

Related branches

summary: - mountall does not preserve file attributes when populating /dev
+ mountall does not preserve all attributes from /lib/udev/devices when
+ populating /dev
Revision history for this message
Mat Martineau (mat-martineau) wrote :

Looks like this changes in mountall 2.x, which instead uses upstart (configured with mounted-dev.conf) to do the initial population of /dev.

However, the current version of mounted-dev.conf ignores /lib/udev/devices and uses MAKEDEV instead (minor quibble: comments and commands in mounted-dev.conf are inconsistent).

The current udev README says:
 - The content of /lib/udev/devices directory which contains the nodes,
   symlinks and directories, which are always expected to be in /dev, should
   be copied over to the tmpfs mounted /dev, to provide the required nodes
   to initialize udev and continue booting.

While I hope the solution for this bug is to restore the 'cp -a' method of populating /dev (maybe in addition to using MAKEDEV in mounted-dev.conf), if the /lib/udev/devices directory is going to be ignored then it should probably not be created to begin with.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mountall - 2.5

---------------
mountall (2.5) lucid; urgency=low

  * conf/mounted-dev.conf:
    - Go back to copying from /lib/udev/devices, this is much faster for
      the devtmpfs case since almost all devices will already exist.
      LP: #507162.
  * src/mountall.c:
    - If we mount something new over /dev, we need to make /dev/console and
      /dev/null again as otherwise the whole system falls apart (even init).
      LP: #513919.
 -- Scott James Remnant <email address hidden> Wed, 17 Feb 2010 11:56:41 +0000

Changed in mountall (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.