diff options
author | Colin Walters <walters@verbum.org> | 2014-02-02 11:32:52 -0500 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2014-02-02 11:32:52 -0500 |
commit | e580a88f4ed15b9af3ee9355a3ef5a4dc1cd82ab (patch) | |
tree | 0192d0fa15cd2b7832d240ffbaba814553f73b63 /src/ostree/ot-admin-builtin-diff.c | |
parent | f86a132eb0c0a9ac9212b8471f2e6185a7325f50 (diff) | |
download | ostree-e580a88f4ed15b9af3ee9355a3ef5a4dc1cd82ab.tar.gz |
SELinux: Ensure we label /var, and fix /etc merge wrt xattrs
First, /var needs to be labeled at least once. We should probably
rearrange things so that /var is only created (and labeled) on the
first deployment, but this patch adds a /var/.ostree-selabeled file
instead.
Second, when doing the /etc merge, we compare the xattrs of the old
/usr/etc versus the current /etc. The problem with that is that the
policy has different labels for /usr/etc on disk than the real /etc.
The correct fix for this is a bit invasive - we have to take the
physical content of the old /usr/etc, but compare the labels as if
they were really in /etc.
Instead for now, just ignore changes to xattrs. If the file
content/mode changes, then we take the new file (including any changed
xattrs).
Bottom line: just doing chcon -t blah_t /etc/foo.conf may be lost on
upgrade (for now).
Diffstat (limited to 'src/ostree/ot-admin-builtin-diff.c')
-rw-r--r-- | src/ostree/ot-admin-builtin-diff.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ostree/ot-admin-builtin-diff.c b/src/ostree/ot-admin-builtin-diff.c index 7497e1a5..6623b512 100644 --- a/src/ostree/ot-admin-builtin-diff.c +++ b/src/ostree/ot-admin-builtin-diff.c @@ -83,7 +83,8 @@ ot_admin_builtin_diff (int argc, char **argv, OstreeSysroot *sysroot, GCancellab modified = g_ptr_array_new_with_free_func ((GDestroyNotify) ostree_diff_item_unref); removed = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); added = g_ptr_array_new_with_free_func ((GDestroyNotify) g_object_unref); - if (!ostree_diff_dirs (orig_etc_path, new_etc_path, modified, removed, added, + if (!ostree_diff_dirs (OSTREE_DIFF_FLAGS_IGNORE_XATTRS, + orig_etc_path, new_etc_path, modified, removed, added, cancellable, error)) goto out; |