1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-22 17:35:59 +03:00

Merge Debian patch 05 debian: keep libdm-abi consistent.

This appears to be the only user visible feature that can change libdm ABI
at build time.

Thanks to Bastian Blank for the patch.
This commit is contained in:
fabbione 2009-10-12 04:06:42 +00:00
parent d3fd4c0381
commit 1dbfe1e856
3 changed files with 3 additions and 6 deletions

View File

@ -1,5 +1,6 @@
Version 1.02.39 -
=====================================
Make libdm ABI consistent when built with/without selinux support.
Version 1.02.38 - 25th September 2009
=====================================

View File

@ -201,10 +201,8 @@ static int _mk_link(const char *dev_dir, const char *vg_name,
return 0;
}
#ifdef HAVE_SELINUX
if (!dm_set_selinux_context(lv_path, S_IFLNK))
return_0;
#endif
return 1;
}

View File

@ -373,9 +373,9 @@ int dm_task_add_target(struct dm_task *dmt, uint64_t start, uint64_t size,
return 1;
}
#ifdef HAVE_SELINUX
int dm_set_selinux_context(const char *path, mode_t mode)
{
#ifdef HAVE_SELINUX
security_context_t scontext;
if (is_selinux_enabled() <= 0)
@ -396,9 +396,9 @@ int dm_set_selinux_context(const char *path, mode_t mode)
}
freecon(scontext);
#endif
return 1;
}
#endif
static int _add_dev_node(const char *dev_name, uint32_t major, uint32_t minor,
uid_t uid, gid_t gid, mode_t mode)
@ -445,10 +445,8 @@ static int _add_dev_node(const char *dev_name, uint32_t major, uint32_t minor,
log_debug("Created %s", path);
#ifdef HAVE_SELINUX
if (!dm_set_selinux_context(path, S_IFBLK))
return 0;
#endif
return 1;
}