summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am5
-rw-r--r--src/statcmd.c4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 09a7330ce..2d776dd9a 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 39006527c..ffccf410d 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