mirror of
https://github.com/NixOS/mobile-nixos.git
synced 2024-12-17 04:51:31 +03:00
61 lines
1.7 KiB
Diff
61 lines
1.7 KiB
Diff
|
From 664fbd4cf7d6cadc7d9bd2265b58e3829da9c772 Mon Sep 17 00:00:00 2001
|
||
|
From: Samuel Dionne-Riel <samuel@dionne-riel.com>
|
||
|
Date: Sun, 8 Jul 2018 20:44:19 -0400
|
||
|
Subject: [PATCH 1/5] Removes references to selinux.
|
||
|
|
||
|
---
|
||
|
core/adb/adb.c | 3 +--
|
||
|
core/include/selinux/android.h | 2 --
|
||
|
core/ubuntu/selinux_stub.c | 1 -
|
||
|
3 files changed, 1 insertion(+), 5 deletions(-)
|
||
|
|
||
|
diff --git a/core/adb/adb.c b/core/adb/adb.c
|
||
|
index 3988146..41698e2 100644
|
||
|
--- a/core/adb/adb.c
|
||
|
+++ b/core/adb/adb.c
|
||
|
@@ -43,7 +43,6 @@
|
||
|
#include <sys/mount.h>
|
||
|
#include <linux/prctl.h>
|
||
|
#include <getopt.h>
|
||
|
-#include <selinux/selinux.h>
|
||
|
#else
|
||
|
#include "usb_vendors.h"
|
||
|
#endif
|
||
|
@@ -1390,7 +1389,7 @@ int adb_main(int is_daemon, int server_port)
|
||
|
D("Local port disabled\n");
|
||
|
} else {
|
||
|
char local_name[30];
|
||
|
- if ((root_seclabel != NULL) && (is_selinux_enabled() > 0)) {
|
||
|
+ if ((root_seclabel != NULL)) {
|
||
|
// b/12587913: fix setcon to allow const pointers
|
||
|
if (setcon((char *)root_seclabel) < 0) {
|
||
|
exit(1);
|
||
|
diff --git a/core/include/selinux/android.h b/core/include/selinux/android.h
|
||
|
index 00894f5..0cb8ae5 100644
|
||
|
--- a/core/include/selinux/android.h
|
||
|
+++ b/core/include/selinux/android.h
|
||
|
@@ -5,8 +5,6 @@
|
||
|
#include <sys/types.h>
|
||
|
#include <unistd.h>
|
||
|
|
||
|
-#include <selinux/label.h>
|
||
|
-
|
||
|
#ifdef __cplusplus
|
||
|
extern "C" {
|
||
|
#endif
|
||
|
diff --git a/core/ubuntu/selinux_stub.c b/core/ubuntu/selinux_stub.c
|
||
|
index b110e09..835a547 100644
|
||
|
--- a/core/ubuntu/selinux_stub.c
|
||
|
+++ b/core/ubuntu/selinux_stub.c
|
||
|
@@ -16,7 +16,6 @@
|
||
|
* Authored by: Thomas Voß <thomas.voss@canonical.com>
|
||
|
*/
|
||
|
|
||
|
-#include <selinux/selinux.h>
|
||
|
|
||
|
// Ubuntu does not use selinux, stub here functions we do not need
|
||
|
|
||
|
--
|
||
|
2.16.4
|
||
|
|