1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 01:55:10 +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:
Fabio M. Di Nitto 2009-10-12 04:06:42 +00:00
parent 79aa89a62a
commit 2cec0e4562
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;
}