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:
parent
d3fd4c0381
commit
1dbfe1e856
@ -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
|
||||
=====================================
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user