noinst_LIBRARIES += libmount_utils_ldiskfs.a
libmount_utils_ldiskfs_a_SOURCES = libmount_utils_ldiskfs.c
-libmount_utils_ldiskfs_a_CPPFLAGS := $(SELINUX)
+libmount_utils_ldiskfs_a_CPPFLAGS :=
if PLUGINS
lib_LTLIBRARIES += libmount_utils_ldiskfs.la
$(CC) $(LDFLAGS) $(MNTMODLDFLAGS) -shared -export-dynamic \
-o mount_osd_ldiskfs.so \
`$(AR) -t libmount_utils_ldiskfs.a` \
- $(MNTMODLIBS) $(SELINUX)
+ $(MNTMODLIBS)
else
PLUGIN_LIB += libmount_utils_ldiskfs.a
endif # PLUGINS
#include <linux/lustre/lustre_ver.h>
#include <libcfs/util/string.h>
-#ifdef HAVE_SELINUX
-#include <selinux/selinux.h>
-#endif
-
#include "mount_utils.h"
#define MAX_HW_SECTORS_KB_PATH "queue/max_hw_sectors_kb"
static bool is_e2fsprogs_feature_supp(const char *feature);
static void disp_old_e2fsprogs_msg(const char *feature, int make_backfs);
-/*
- * Concatenate context of the temporary mount point if selinux is enabled
- */
-#ifdef HAVE_SELINUX
-static void append_context_for_mount(char *mntpt, struct mkfs_opts *mop)
-{
- security_context_t fcontext;
-
- if (getfilecon(mntpt, &fcontext) < 0) {
- /* Continuing with default behaviour */
- fprintf(stderr, "%s: Get file context failed : %s\n",
- progname, strerror(errno));
- return;
- }
-
- if (fcontext != NULL) {
- append_unique(mop->mo_ldd.ldd_mount_opts,
- ",", "context", fcontext,
- sizeof(mop->mo_ldd.ldd_mount_opts));
- freecon(fcontext);
- }
-}
-#endif
-
/* Determine if a device is a block device (as opposed to a file) */
static int is_block(char *devname)
{
return errno;
}
- /*
- * Append file context to mount options if SE Linux is enabled
- */
- #ifdef HAVE_SELINUX
- if (is_selinux_enabled() > 0)
- append_context_for_mount(mntpt, mop);
- #endif
-
dev = mop->mo_device;
if (mop->mo_flags & MO_IS_LOOP)
dev = mop->mo_loopdev;
return ret;
}
-#ifdef HAVE_SELINUX
- /*
- * Append file context to mount options if SE Linux is enabled
- */
- if (is_selinux_enabled() > 0)
- append_context_for_mount(mntpt, mop);
-#endif
-
if (mop->mo_flags & MO_IS_LOOP)
dev = mop->mo_loopdev;
else