Michal Privoznik
4ce1106277
securityselinuxhelper: Fix retval of setcon_raw() and security_disable()
...
The securityselinuxhelper is a mock that's replacing libselinux
APIs with our own implementation to achieve deterministic
results. Our implementation uses env vars (among other things) to
hold internal state. For instance, "FAKE_SELINUX_CONTEXT" and
"FAKE_SELINUX_DISABLED" variables are used. However, as we were
switching from setenv() to g_setenv() we also changed the set of
possible retvals from setcon_raw() and security_disable().
Previously, the retval of setenv() was used directly which
returns 0 on success and -1 on error. But g_setenv() has
different retval semantics: it returns 1 on success and 0 on
error.
This discrepancy can be observed by running viridentitytest where
case #2 reports an error ("!") - because setcon_raw() returns 1.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-05-10 13:32:43 +02:00
..
2020-10-19 11:50:49 +02:00
2021-03-20 07:53:45 +04:00
2021-04-21 14:20:03 +02:00
2021-02-08 18:50:47 +04:00
2021-04-12 15:55:10 +02:00
2021-05-07 18:02:48 +02:00
2021-03-23 14:06:31 +01:00
2020-10-20 09:05:10 +02:00
2020-11-24 18:45:07 +00:00
2020-11-24 18:45:07 +00:00
2020-11-24 14:21:08 -05:00
2021-04-19 10:24:13 -05:00
2021-04-07 15:24:17 -05:00
2021-01-04 15:33:31 +01:00
2021-04-12 15:55:10 +02:00
2020-10-20 09:05:10 +02:00
2021-02-20 13:20:32 +01:00
2021-05-03 12:14:45 +02:00
2020-11-20 12:09:51 +00:00
2021-03-09 22:58:30 +00:00
2021-01-08 15:27:00 +01:00
2021-03-09 22:58:30 +00:00
2021-05-03 12:14:44 +02:00
2021-05-03 12:14:44 +02:00
2021-05-03 12:14:44 +02:00
2021-03-09 22:58:30 +00:00
2020-11-06 09:14:01 +01:00
2021-03-09 22:58:30 +00:00
2021-05-03 12:14:44 +02:00
2021-05-03 12:14:44 +02:00
2021-01-08 09:18:21 +01:00
2021-04-12 15:55:10 +02:00
2021-04-12 15:55:10 +02:00
2021-03-01 15:44:47 +01:00
2021-02-10 13:37:12 +01:00
2020-10-05 10:28:43 +01:00
2021-04-19 14:43:59 +02:00
2020-12-07 15:38:31 -07:00
2020-12-07 15:38:31 -07:00
2021-04-01 13:36:35 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-21 14:20:03 +02:00
2021-02-08 18:50:47 +04:00
2021-03-05 15:33:34 +01:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-01 14:01:06 -06:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-05-03 10:30:56 +02:00
2021-04-21 14:18:18 +02:00
2021-04-21 14:19:26 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-19 10:24:13 -05:00
2021-04-13 17:00:38 +02:00
2021-01-04 15:33:31 +01:00
2021-04-21 14:19:26 +02:00
2021-04-21 14:19:26 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-05-03 12:14:44 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-05-03 12:14:44 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-02-11 17:05:33 +01:00
2021-04-13 17:00:38 +02:00
2021-02-11 17:05:33 +01:00
2021-04-13 17:00:38 +02:00
2021-02-11 17:05:34 +01:00
2021-04-21 14:19:34 +02:00
2021-05-03 12:14:45 +02:00
2021-05-03 12:14:45 +02:00
2021-03-04 20:52:23 +01:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-05-10 13:32:43 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2020-11-19 17:25:44 +01:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-05-03 12:14:44 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-03-22 12:44:18 +01:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-02-02 15:00:55 +01:00
2021-04-13 17:00:38 +02:00
2021-02-10 11:03:39 +01:00
2021-04-21 14:18:51 +02:00
2021-04-21 14:19:26 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2020-11-09 12:25:49 +01:00
2020-11-09 15:43:53 +01:00
2021-04-12 15:55:10 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2020-11-27 16:28:31 +01:00
2021-02-10 11:03:39 +01:00
2021-04-13 17:00:38 +02:00
2021-04-12 15:55:10 +02:00
2020-12-17 09:27:51 +01:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-03-04 20:52:23 +01:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-03-08 22:41:40 +01:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-03-22 12:05:18 +01:00
2020-11-23 14:44:39 +01:00
2021-01-06 09:25:07 +01:00
2020-11-23 14:44:39 +01:00
2020-11-23 14:44:39 +01:00
2020-11-23 14:44:39 +01:00
2021-01-06 09:25:07 +01:00
2020-11-23 14:44:39 +01:00
2021-01-06 09:25:07 +01:00
2021-04-13 17:00:38 +02:00
2021-04-12 15:55:10 +02:00
2021-04-13 17:00:38 +02:00
2021-04-21 10:02:09 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00
2021-04-13 17:00:38 +02:00