020-no_selinux.patch 1.4 KB

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