[PATCH v2] erofs-utils: support selinux file contexts

Li GuiFu bluce.lee at aliyun.com
Sun Jun 7 21:49:57 AEST 2020


On 2020/6/6 16:17, Gao Xiang wrote:
> Add --file-contexts flag that allows passing a selinux
> file_context file to setup file selabels.
>
> Signed-off-by: Gao Xiang <hsiangkao at redhat.com>
> ---
> changes since v1:
>  fix selinux error handing and wrap up selabel
>  open pointed out by Guifu;
>
>  configure.ac           |  27 +++++++++
>  include/erofs/config.h |  21 +++++++
>  include/erofs/xattr.h  |   3 +-
>  lib/config.c           |  42 +++++++++++++
>  lib/exclude.c          |  12 +---
>  lib/inode.c            |   3 +-
>  lib/xattr.c            | 130 ++++++++++++++++++++++++++++++++---------
>  man/mkfs.erofs.1       |   3 +
>  mkfs/Makefile.am       |   4 +-
>  mkfs/main.c            |  15 ++++-
>  10 files changed, 217 insertions(+), 43 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 870dfb9..5145971 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -67,6 +67,15 @@ AC_ARG_WITH(uuid,
>     [AS_HELP_STRING([--without-uuid],
>        [Ignore presence of libuuid and disable uuid support @<:@default=enabled@:>@])])
>  
> +AC_ARG_WITH(selinux,
> +   [AS_HELP_STRING([--with-selinux],
> +      [enable and build with selinux support @<:@default=no@:>@])],
> +   [case "$with_selinux" in
> +      yes|no) ;;
> +      *) AC_MSG_ERROR([invalid argument to --with-selinux])
> +      ;;
> +    esac], [with_selinux=no])
> Can "with_selinux" to be set as "auto" ? it can be decide by the host, selinux installed enable selinux feature
>


More information about the Linux-erofs mailing list