aboutsummaryrefslogtreecommitdiffstats
path: root/package/utils/f2fs-tools/patches/020-no_selinux.patch
blob: dcb3bd24c47ea99734f94ed3b9767a9518f410e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
--- a/configure.ac
+++ b/configure.ac
@@ -49,7 +49,7 @@ AC_PATH_PROG([LDCONFIG], [ldconfig],
 
 # Checks for libraries.
 PKG_CHECK_MODULES([libuuid], [uuid])
-PKG_CHECK_MODULES([libselinux], [libselinux])
+# PKG_CHECK_MODULES([libselinux], [libselinux])
 
 # Checks for header files.
 AC_CHECK_HEADERS([linux/fs.h fcntl.h mntent.h stdlib.h string.h \
--- a/fsck/sload.c
+++ b/fsck/sload.c
@@ -16,10 +16,11 @@
 #include <libgen.h>
 #include <dirent.h>
 #include <mntent.h>
+
+#ifdef WITH_ANDROID
 #include <selinux/selinux.h>
 #include <selinux/label.h>
 
-#ifdef WITH_ANDROID
 #include <selinux/label.h>
 #include <private/android_filesystem_config.h>
 
@@ -110,10 +111,12 @@ static int build_directory(struct f2fs_s
 		handle_selabel(dentries + i, S_ISDIR(stat.st_mode),
 							target_out_dir);
 
+#ifdef WITH_ANDROID
 		if (sehnd && selabel_lookup(sehnd, &dentries[i].secon,
 					dentries[i].path, stat.st_mode) < 0)
 			ERR_MSG("Cannot lookup security context for %s\n",
 						dentries[i].path);
+#endif
 
 		dentries[i].pino = dir_ino;
 
@@ -218,6 +221,7 @@ int f2fs_sload(struct f2fs_sb_info *sbi,
 		return ret;
 	}
 
+#ifdef WITH_ANDROID
 	if (sehnd) {
 		char *secontext = NULL;
 
@@ -233,6 +237,7 @@ int f2fs_sload(struct f2fs_sb_info *sbi,
 		}
 		free(secontext);
 	}
+#endif
 
 	/* update curseg info; can update sit->types */
 	move_curseg_info(sbi, SM_I(sbi)->main_blkaddr);