From 3aeb56903602be572f56e254631d35f952b616ba Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Tue, 25 Oct 2005 17:30:00 +0000 Subject: [PATCH] Export dm_set_selinux_context. --- WHATS_NEW_DM | 1 + libdm/.exported_symbols | 1 + libdm/libdevmapper.h | 5 +++++ libdm/libdm-common.c | 4 ++-- libdm/libdm-common.h.in | 2 -- 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/WHATS_NEW_DM b/WHATS_NEW_DM index 60cb014e6..3ee22beeb 100644 --- a/WHATS_NEW_DM +++ b/WHATS_NEW_DM @@ -1,5 +1,6 @@ Version 1.02.00 - ============================= + Export dm_set_selinux_context(). Add dm_driver_version(). Added dependency tree functions to library. Added hash, bitset, pool, dbg_malloc to library. diff --git a/libdm/.exported_symbols b/libdm/.exported_symbols index 5f7d31f32..6dac95471 100644 --- a/libdm/.exported_symbols +++ b/libdm/.exported_symbols @@ -83,3 +83,4 @@ dm_hash_get_first dm_hash_get_next dm_driver_version dm_deptree_deactivate_children +dm_set_selinux_context diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h index cc5df7602..f773026d8 100644 --- a/libdm/libdevmapper.h +++ b/libdm/libdevmapper.h @@ -453,3 +453,8 @@ struct dm_hash_node *dm_hash_get_next(struct dm_hash_table *t, struct dm_hash_no v = dm_hash_get_next(h, v)) #endif /* LIB_DEVICE_MAPPER_H */ + +/* + * selinux + */ +int dm_set_selinux_context(const char *path, mode_t mode); diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c index c288eafc7..2439f2f0d 100644 --- a/libdm/libdm-common.c +++ b/libdm/libdm-common.c @@ -199,7 +199,7 @@ int dm_task_add_target(struct dm_task *dmt, uint64_t start, uint64_t size, } #ifdef HAVE_SELINUX -int set_selinux_context(const char *path, mode_t mode) +int dm_set_selinux_context(const char *path, mode_t mode) { security_context_t scontext; @@ -266,7 +266,7 @@ static int _add_dev_node(const char *dev_name, uint32_t major, uint32_t minor, } #ifdef HAVE_SELINUX - if (!set_selinux_context(path, S_IFBLK)) + if (!dm_set_selinux_context(path, S_IFBLK)) return 0; #endif diff --git a/libdm/libdm-common.h.in b/libdm/libdm-common.h.in index c2ae54380..3407fc442 100644 --- a/libdm/libdm-common.h.in +++ b/libdm/libdm-common.h.in @@ -28,8 +28,6 @@ int rm_dev_node(const char *dev_name); int rename_dev_node(const char *old_name, const char *new_name); void update_devs(void); -int set_selinux_context(const char *path, mode_t mode); - #define DM_LIB_VERSION @DM_LIB_VERSION@ #endif