Commit b19084e6 authored by intrigeri's avatar intrigeri Committed by Cyril Brulebois
Browse files

Abort the build if /etc/{passwd,group} has changed (refs: #15419).

Such changes can break automatic upgrades, as seen on #13426 and more
recently during the 3.6 release.

The /usr/share/tails/build/{passwd,group} added here come straight from the
Tails 3.8 ISO.
parent 08680169
#!/bin/sh
set -e
echo "Checking UIDs and GIDs stability"
for file in passwd group; do
if ! cmp "/usr/share/tails/build/${file}" "/etc/${file}"; then
echo "/etc/${file} differs from expected:" >&2
diff -Naur "/usr/share/tails/build/${file}" "/etc/${file}" >&2
echo "If these changes are innocuous, update " \
"config/chroot_local-includes/usr/share/tails/build/${file}." \
>&2
echo >&2
echo "See #15407 and #13426 for more context." >&2
fi
done
root:x:0:
daemon:x:1:
bin:x:2:
sys:x:3:
adm:x:4:
tty:x:5:
disk:x:6:
lp:x:7:
mail:x:8:
news:x:9:
uucp:x:10:
man:x:12:
proxy:x:13:
kmem:x:15:
dialout:x:20:
fax:x:21:
voice:x:22:
cdrom:x:24:
floppy:x:25:
tape:x:26:
sudo:x:27:
audio:x:29:pulse
dip:x:30:
www-data:x:33:
backup:x:34:
operator:x:37:
list:x:38:
irc:x:39:
src:x:40:
gnats:x:41:
shadow:x:42:
utmp:x:43:
video:x:44:
sasl:x:45:
plugdev:x:46:
staff:x:50:
games:x:60:
users:x:100:
nogroup:x:65534:
systemd-journal:x:101:
systemd-timesync:x:102:
systemd-network:x:103:
systemd-resolve:x:104:
input:x:106:
crontab:x:107:
netdev:x:108:
messagebus:x:105:
ssh:x:109:
memlockd:x:110:
ssl-cert:x:111:
vboxsf:x:112:
monkeysphere:x:113:
debian-tor:x:114:tor-launcher
lpadmin:x:115:
scanner:x:116:saned
colord:x:117:
saned:x:118:
pulse:x:119:
pulse-access:x:120:
Debian-gdm:x:121:
tails-persistence-setup:x:122:
clearnet:x:123:
htp:x:124:
tails-iuk-get-target-file:x:125:tails-install-iuk
tails-upgrade-frontend:x:126:
tor-launcher:x:127:
tails-install-iuk:x:128:
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
systemd-timesync:x:100:102:systemd Time Synchronization,,,:/run/systemd:/bin/false
systemd-network:x:101:103:systemd Network Management,,,:/run/systemd/netif:/bin/false
systemd-resolve:x:102:104:systemd Resolver,,,:/run/systemd/resolve:/bin/false
_apt:x:104:65534::/nonexistent:/bin/false
messagebus:x:103:105::/var/run/dbus:/bin/false
memlockd:x:105:110:memlockd system account,,,:/usr/lib/memlockd:/bin/false
monkeysphere:x:106:113:monkeysphere authentication user,,,:/var/lib/monkeysphere:/bin/bash
debian-tor:x:107:114::/var/lib/tor:/bin/false
speech-dispatcher:x:108:29:Speech Dispatcher,,,:/var/run/speech-dispatcher:/bin/false
colord:x:109:117:colord colour management daemon,,,:/var/lib/colord:/bin/false
saned:x:110:118::/var/lib/saned:/bin/false
pulse:x:111:119:PulseAudio daemon,,,:/var/run/pulse:/bin/false
hplip:x:112:7:HPLIP system user,,,:/var/run/hplip:/bin/false
Debian-gdm:x:113:121:Gnome Display Manager:/var/lib/gdm3:/bin/false
tails-persistence-setup:x:115:122::/home/tails-persistence-setup:/bin/false
clearnet:x:114:123::/home/clearnet:/bin/false
htp:x:116:124::/home/htp:/bin/false
tails-iuk-get-target-file:x:117:125::/home/tails-iuk-get-target-file:/bin/false
tails-upgrade-frontend:x:118:126::/home/tails-upgrade-frontend:/bin/false
tor-launcher:x:119:127::/home/tor-launcher:/bin/false
tails-install-iuk:x:120:128::/home/tails-install-iuk:/bin/false
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment