← Back to team overview

touch-packages team mailing list archive

[Bug 1332538] Re: No UID checks on rootfs updates

 

My syslog stopped growing, noted owner change:

phablet@ubuntu-phablet:~$ ls -l /var/log
total 129012
-rw-r--r-- 1 root        root        0 Apr 30 06:25 alternatives.log
-rw-r--r-- 1 root        root      346 Apr 29 14:55 alternatives.log.1
-rw-r--r-- 1 root        root     1476 Feb 23  2014 alternatives.log.2.gz
-rw-r----- 1 root        adm         0 Sep 15 10:17 apport.log
-rw-r----- 1 root        adm       866 Sep 15 09:43 apport.log.1
-rw-r----- 1 root        adm       449 Sep 12 10:04 apport.log.2.gz
-rw-r----- 1 root        adm       548 Sep 11 19:02 apport.log.3.gz
-rw-r----- 1 root        adm       308 Sep 10 09:12 apport.log.4.gz
-rw-r----- 1 root        adm        83 Sep  9 16:32 apport.log.5.gz
-rw-r----- 1 root        adm       473 Sep  8 17:41 apport.log.6.gz
-rw-r----- 1 root        adm       515 Sep  8 09:47 apport.log.7.gz
drwxr-xr-x 2 root        root     4096 Sep  1 00:19 apt
-rw-r----- 1 usermetrics adm    599137 Aug 20 09:04 auth.log
-rw-r----- 1 usermetrics adm    143042 Jul 27 06:49 auth.log.1
-rw-r----- 1 usermetrics adm     10891 Jul 21 06:27 auth.log.2.gz
-rw-r----- 1 usermetrics adm      7086 Jul 13 07:08 auth.log.3.gz
-rw-r----- 1 usermetrics adm      2968 Jul  6 06:26 auth.log.4.gz
-rw-r--r-- 1 root        root    65466 Feb 23  2014 bootstrap.log
-rw-rw---- 1 root        utmp        0 Sep  1 00:19 btmp
-rw-rw---- 1 root        utmp        0 Aug  1 06:25 btmp.1
-rw-r----- 1 root        adm     68038 Sep 15 14:52 dmesg
-rw-r----- 1 root        adm     49406 Sep 15 14:50 dmesg.0
-rw-r----- 1 root        adm     17487 Sep 15 09:45 dmesg.1.gz
-rw-r----- 1 root        adm     16090 Sep 15 09:43 dmesg.2.gz
-rw-r----- 1 root        adm     19710 Sep 12 12:41 dmesg.3.gz
-rw-r----- 1 root        adm     15836 Sep 12 12:39 dmesg.4.gz
-rw-r--r-- 1 root        root    13392 Sep  5 10:05 dpkg.log
-rw-r--r-- 1 root        root    21400 Aug 29 08:56 dpkg.log.1
-rw-r--r-- 1 root        root     4885 Jul 25 14:46 dpkg.log.2.gz
-rw-r--r-- 1 root        root     1116 Jun 20 14:53 dpkg.log.3.gz
-rw-r--r-- 1 root        root      642 Jun  2 17:50 dpkg.log.4.gz
-rw-r--r-- 1 root        root      166 Apr 29 14:55 dpkg.log.5.gz
-rw-r--r-- 1 root        root      382 Apr 15 16:29 dpkg.log.6.gz
-rw-r--r-- 1 root        root    57849 Feb 23  2014 dpkg.log.7.gz
-rw-r--r-- 1 root        root   768288 Feb 23  2014 faillog
-rw-r--r-- 1 root        root      976 Feb 23  2014 fontconfig.log
drwxr-xr-x 2 root        root     4096 Feb 24  2014 fsck
drwxr-xr-x 2 root        root     4096 Feb 24  2014 installer
-rw-r----- 1 usermetrics adm         0 Jul 27 07:47 kern.log
-rw-r----- 1 usermetrics adm  61050880 Jul 23 16:01 kern.log.1
-rw-r----- 1 usermetrics adm  13139240 Jul 21 06:35 kern.log.2.gz
-rw-r----- 1 usermetrics adm  10502851 Jul 13 07:22 kern.log.3.gz
-rw-r----- 1 usermetrics adm   6091087 Jul  6 06:27 kern.log.4.gz
-rw-rw-r-- 1 root        utmp  9347504 Sep 15 15:12 lastlog
drwxr-xr-x 2 root        root     4096 Sep 15 14:53 lightdm
drwxr-xr-x 2 root        root     4096 Apr  9 16:30 lxc
-rw-r--r-- 1 root        root    53174 May 17 04:34 pm-powersave.log
-rw-r--r-- 1 root        root   145082 Apr 30 17:16 pm-powersave.log.1
-rw-r--r-- 1 root        root     1212 Apr  1 14:37 pm-powersave.log.2.gz
-rw-r--r-- 1 root        root      569 Feb 28  2014 pm-powersave.log.3.gz
-rw-r----- 1 usermetrics adm   5834017 Aug 20 09:04 syslog
-rw-r----- 1 usermetrics adm   7914503 Aug  1 06:25 syslog.2
-rw-r----- 1 usermetrics adm   4069377 Jul 31 06:46 syslog.2.gz
-rw-r----- 1 usermetrics adm   4574517 Jul 30 06:56 syslog.3.gz
-rw-r----- 1 usermetrics adm   1963161 Jul 28 06:48 syslog.4.gz
-rw-r----- 1 usermetrics adm   2014220 Jul 27 06:57 syslog.5.gz
-rw-r----- 1 usermetrics adm   1852850 Jul 26 07:08 syslog.6.gz
-rw-r----- 1 usermetrics adm    796570 Jul 25 06:27 syslog.7.gz
drwxrws--- 2 root        root     4096 Feb 24  2014 system-image
drwxr-xr-x 2 root        root    32768 Sep 15 14:47 ubuntu-download-manager
drwxr-xr-x 2 root        root    24576 Sep 15 15:08 ubuntu-location-service
-rw-r--r-- 1 root        root   366680 Sep 15 14:49 udev
drwxr-xr-x 2 root        root     4096 Feb 28  2014 unattended-upgrades
drwxr-xr-x 2 root        root    20480 Sep 15 14:49 upstart
-rw-rw-r-- 1 root        utmp    82176 Sep 15 15:12 wtmp
-rw-rw-r-- 1 root        utmp   120576 Aug 29 22:39 wtmp.1

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to system-image in Ubuntu.
https://bugs.launchpad.net/bugs/1332538

Title:
  No UID checks on rootfs updates

Status in “system-image” package in Ubuntu:
  New

Bug description:
  Hi,

  system-image updates will currently happily deliver an updated
  /etc/passwd with the list of UIDs reordered. This typically happens
  when we seed new software that creates a new user upon install.

  In a recent update, my /var/crash became owned by autopilot; most
  likely the UID of whoopsie became the one of autopilot after the
  update.

  In the short-term, we could catch such UID insertions at rootfs
  creation time, either before or after a rootfs hits the -proposed
  channel.

  In the mid-term, we need a strategy to cope with UID additions/removals/reorderings. One way to handle this would be to post-process UIDs by keeping a list of historical UIDs on the server side. For instance, on system-image.u.c systems we'd do this:
  - for the first image, import /etc/passwd and keep a copy on system-image.u.c
  - for updated images, compare /etc/passwd with the server copy; for each new UID, allocate a new system UIDs in the system-image.u.c master database
  - remap UIDs from the rootfs tarball to the ones in the system-image.u.c master database

  For instance, whoopsie would get a system UID allocated on system-
  image.u.c the first time it's used in an image, say 120, then it keep
  that 120 UID for all subsequent images. If a new image comes out of
  livecd-rootfs with whoopsie as UID 121, we'd remap the UIDs to UID 120
  and update /etc/passwd, /var/crash and any other file accordingly.

  Perhaps there's a more clever way to deal with this; ideas welcome! I
  fear that if we allow for UIDs to change in the distributed rootfs, we
  will have trouble updating all the user owned files, including on
  removable media, unmounted filesystems, in filesystem snapshots etc.

  Cheers,

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/system-image/+bug/1332538/+subscriptions