Comment 8 for bug 591807

Revision history for this message
Kees Cook (kees) wrote :

Actually, we need to rebuild the /dev/.udev/rules.d/root.rules file in the postinst so that anything that may have gotten leaked into it is removed before allowing udev to reload:

umask 0022
rm -f /dev/.udev/rules.d/root.rules
if [ -l /dev/root ]; then
    printf 'SUBSYSTEM=="block", ENV{MAJOR}=="%d", ENV{MINOR}=="%d", SYMLINK+="root"\n' $(/usr/bin/stat -L -c '0x%t 0x%T' /dev/root) > /dev/.udev/rules.d/root.rules
fi