summaryrefslogtreecommitdiff
path: root/app-forensics/ovaldi/files/ovaldi-5.10.1.7-disable_RetrieveSelinuxDomainLabel.patch
blob: 11d369022b030e187f73dca6172cf420034adc8e (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
--- src/probes/unix/Process58Probe.cpp.old	2014-10-08 08:56:37.000000000 +0200
+++ src/probes/unix/Process58Probe.cpp	2014-10-08 08:57:58.000000000 +0200
@@ -743,26 +743,8 @@
 }
 
 bool Process58Probe::RetrieveSelinuxDomainLabel(pid_t pid, string *label, string *err) {
-	security_context_t sctx;
-	int ec = getpidcon(pid, &sctx);
-	if (ec == -1) {
-		// getpidcon man page doesn't say errno is set... so we can't get a
-		// reason for the error.
-		*err = "getpidcon() failed";
-		return false;
-	}
-
-	SecurityContextGuard scg(sctx);
-	ContextGuard cg(sctx);
-
-	const char *tmp = context_type_get(cg);
-	if (!tmp) {
-		*err = string("context_get_type(")+sctx+"): "+strerror(errno);
-		return false;
-	}
-
-	*label = tmp;
-	return true;
+	*err = string("context_get_type(NotImplmented)");
+	return false;
 }
 
 #elif defined SUNOS