[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#503028: tzdata: postinst needs to restore SELinux context on /etc/localtime



Package: tzdata
Version: 2008h-2
Severity: normal
Tags: patch

On a system with SELinux enabled, copying a file into /etc/localtime causes
its security context to be set to etc_t, the default for files in /etc.  But
/etc/localtime needs to be labelled as locale_t, so you need to run
restorecon on it after copying.

--- debian/postinst.orig        2008-10-21 21:20:25.000000000 +0100
+++ debian/postinst     2008-10-21 21:20:34.000000000 +0100
@@ -29,6 +29,7 @@
         echo $AREA/$ZONE > /etc/timezone
         rm -f /etc/localtime && \
             cp -f /usr/share/zoneinfo/$AREA/$ZONE /etc/localtime
+        which restorecon >/dev/null 2>&1 && restorecon /etc/localtime

         echo
         echo "Current default timezone: '$AREA/$ZONE'"



--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.26.2

Debian Release: lenny/sid
  500 unstable        ftp.ie.debian.org
  500 testing         ftp.ie.debian.org
    1 experimental    ftp.ie.debian.org

--- Package information. ---
Depends          (Version) | Installed
==========================-+-===========
debconf                    | 1.5.24
 OR debconf-2.0            |


-- 
Martin Orr



Reply to: