1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-09 18:03:17 +03:00

HAVE_SELINUX again

This commit is contained in:
Peter Rajnoha 2010-12-13 12:44:09 +00:00
parent cb12e3fc9f
commit 7e0db38528

View File

@ -387,10 +387,10 @@ int dm_task_add_target(struct dm_task *dmt, uint64_t start, uint64_t size,
return 1;
}
#ifdef HAVE_SELINUX
static int _selabel_lookup(const char *path, mode_t mode,
security_context_t *scontext)
{
#ifdef HAVE_SELINUX
#ifdef HAVE_SELINUX_LABEL_H
if (!_selabel_handle &&
!(_selabel_handle = selabel_open(SELABEL_CTX_FILE, NULL, 0))) {
@ -407,10 +407,10 @@ static int _selabel_lookup(const char *path, mode_t mode,
log_error("matchpathcon failed: %s", strerror(errno));
return 0;
}
#endif
#endif
return 1;
}
#endif
int dm_prepare_selinux_context(const char *path, mode_t mode)
{