This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch master in repository dpkg.
commit 19966da8950830948181ee707858384d3a11effb Author: Guillem Jover <[email protected]> Date: Wed Feb 11 06:50:35 2015 +0100 dpkg-statoverride: Set the SE Linux context on --update When we update the file, we should apply the SE Linux context in the same way we are doing while unpacking binary packages. Closes: #690361 --- debian/changelog | 1 + src/Makefile.am | 5 +++++ src/statcmd.c | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/debian/changelog b/debian/changelog index 690aad7..99f06a3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -77,6 +77,7 @@ dpkg (1.18.0) UNRELEASED; urgency=low Based on a patch by Johannes Schauer <[email protected]>. * Add ‘.mailmap’ to the default dpkg-source ignore lists. * Remove old trigger related Breaks and Conflicts from dpkg. + * Set the SE Linux context on «dpkg-statoverride --update». Closes: #690361 [ Raphaël Hertzog ] * Drop myself from Uploaders. diff --git a/src/Makefile.am b/src/Makefile.am index 09a7330..2d776dd 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -78,9 +78,14 @@ dpkg_query_SOURCES = \ dpkg_statoverride_SOURCES = \ filesdb.c \ infodb-format.c \ + selinux.c \ statdb.c \ statcmd.c +dpkg_statoverride_LDADD = \ + $(LDADD) \ + $(SELINUX_LIBS) + dpkg_trigger_SOURCES = \ trigcmd.c diff --git a/src/statcmd.c b/src/statcmd.c index 3900652..ffccf41 100644 --- a/src/statcmd.c +++ b/src/statcmd.c @@ -167,6 +167,10 @@ statdb_node_apply(const char *filename, struct file_stat *filestat) ohshite(_("error setting ownership of `%.255s'"), filename); if (chmod(filename, filestat->mode)) ohshite(_("error setting permissions of `%.255s'"), filename); + + dpkg_selabel_load(); + dpkg_selabel_set_context(filename, filename, filestat->mode); + dpkg_selabel_close(); } static void -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/dpkg/dpkg.git -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

