diff options
author | Colin Walters <walters@verbum.org> | 2016-03-01 17:42:59 -0500 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2016-03-01 21:45:26 -0500 |
commit | 16979cc5ed9b158b1a9b5ba929c8af32baa41d9d (patch) | |
tree | 41614ab83ed32cbda21ad497d4f4a6a1a0b37f75 /src/libostree/ostree-sepolicy.h | |
parent | 2badf36cfdd7684eb83bb5d4113a4be6217a63ee (diff) | |
download | ostree-16979cc5ed9b158b1a9b5ba929c8af32baa41d9d.tar.gz |
lib: Introduce versioned symbols
As rpm-ostree evolves, it keeps driving API additions to libostree.
This creates a relatively tight coupling.
However, if delivering via e.g. RPM, unless one manually remembers to
increment the `Requires:` in the spec file, it's possible for the two
to become desynchronized.
RPM handles versioned symbols and will ensure a dependency if the
application starts using a newer version.
To implement this, switch to `-fvisibility=hidden`, along with an
annotation in the header, and finally add a `.sym` file.
This matches what other projects like systemd and libvirt do.
Although rather than attempting to retroactively version symbols, glom
them all onto the current one.
Diffstat (limited to 'src/libostree/ostree-sepolicy.h')
-rw-r--r-- | src/libostree/ostree-sepolicy.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libostree/ostree-sepolicy.h b/src/libostree/ostree-sepolicy.h index ac8a0e9c..83e3b379 100644 --- a/src/libostree/ostree-sepolicy.h +++ b/src/libostree/ostree-sepolicy.h @@ -30,16 +30,21 @@ G_BEGIN_DECLS #define OSTREE_IS_SEPOLICY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), OSTREE_TYPE_SEPOLICY)) +_OSTREE_PUBLIC GType ostree_sepolicy_get_type (void); +_OSTREE_PUBLIC OstreeSePolicy* ostree_sepolicy_new (GFile *path, GCancellable *cancellable, GError **error); +_OSTREE_PUBLIC GFile * ostree_sepolicy_get_path (OstreeSePolicy *self); +_OSTREE_PUBLIC const char *ostree_sepolicy_get_name (OstreeSePolicy *self); +_OSTREE_PUBLIC gboolean ostree_sepolicy_get_label (OstreeSePolicy *self, const char *relpath, guint32 unix_mode, @@ -53,6 +58,7 @@ typedef enum { OSTREE_SEPOLICY_RESTORECON_FLAGS_KEEP_EXISTING = (1 << 1) } OstreeSePolicyRestoreconFlags; +_OSTREE_PUBLIC gboolean ostree_sepolicy_restorecon (OstreeSePolicy *self, const char *path, GFileInfo *info, @@ -62,11 +68,13 @@ gboolean ostree_sepolicy_restorecon (OstreeSePolicy *self, GCancellable *cancellable, GError **error); +_OSTREE_PUBLIC gboolean ostree_sepolicy_setfscreatecon (OstreeSePolicy *self, const char *path, guint32 mode, GError **error); +_OSTREE_PUBLIC void ostree_sepolicy_fscreatecon_cleanup (void **unused); #define ostree_cleanup_sepolicy_fscreatecon __attribute__ ((cleanup(ostree_sepolicy_fscreatecon_cleanup))) |