Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5311bbd2 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Steve Kondik
Browse files

fs_mgr: Drop the context mount option from non-selinux builds

Transitioning devices may have the context option present in the
fstab, even if we're not doing selinux builds.
Since we don't set or even create the contexts on those builds,
this will make mount fail, and either the mountpoint ends up absent,
or boot fails entirely

Change-Id: Ic5cc7f5632cc3d62459dfaaf7719d662737e1641
parent 679e2100
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -3,6 +3,10 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)

ifeq ($(HAVE_SELINUX),true)
LOCAL_CFLAGS += -DHAVE_SELINUX
endif

LOCAL_SRC_FILES:= fs_mgr.c

LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
+8 −2
Original line number Diff line number Diff line
@@ -192,8 +192,14 @@ static int parse_flags(char *flags, struct flag_list *fl,
                /* It's not a known flag, so it must be a filesystem specific
                 * option.  Add it to fs_options if it was passed in.
                 */
#ifndef HAVE_SELINUX
                /* Drop context option from non-selinux builds */
                if (strncmp(p,"context=",8))
#endif
                {
                    strlcat(fs_options, p, fs_options_len);
                    strlcat(fs_options, ",", fs_options_len);
                }
            } else {
                /* fs_options was not passed in, so if the flag is unknown
                 * it's an error.