Nick Kralevich
cb1dddad27
Don't set sehash when calling restoreconRecursive
...
restorecon_recursive updates the SELinux label of the files in the
filesystem, and then attempts to write the xattr "security.sehash" as an
optimization for future restorecons. Writing security.* extended
attributes requires CAP_SYS_ADMIN, which system_server doesn't have (and
shouldn't have).
Suppress the computation and writing of the hash value. It's not
needed.
This bug has been around for a long time, but due to the fix for
bug 62302954, the error message is being generated more frequently
now.
TODO: It would be better if the default for restorecon was to suppress
the hash computation, since otherwise it encourages programs to be
overprivileged with CAP_SYS_ADMIN. I'll plan on doing that in a followup
commit.
Bugs where this error message has been called out:
Bug: 129766333
Bug: 129271240
Bug: 128700692
Bug: 129925723
Test: install an APK and ensure that no "SELinux: setxattr failed"
error messages are generated.
Change-Id: I83f4f225e4e73453daea42dbcabf0f8a06d320d6
2019-04-04 16:11:37 -07:00
..
2019-02-13 16:02:03 +00:00
2018-10-22 17:28:24 -07:00
2018-12-28 14:26:35 +00:00
2018-04-05 15:43:51 +01:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2018-01-29 11:09:14 -08:00
2017-10-18 12:35:10 -07:00
2019-03-18 12:04:18 +00:00
2018-02-18 22:43:13 -08:00
2018-02-16 22:11:35 +00:00
2019-03-18 12:04:18 +00:00
2018-11-12 16:15:31 -08:00
2019-03-18 12:04:18 +00:00
2019-03-15 10:28:06 +00:00
2019-03-13 11:49:42 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2018-02-16 14:17:41 -05:00
2018-05-17 15:03:00 -07:00
2019-03-18 12:04:18 +00:00
2018-04-06 14:59:07 -07:00
2019-03-18 12:04:18 +00:00
2019-01-31 15:10:21 +08:00
2019-03-18 12:04:18 +00:00
2018-04-11 16:37:57 -07:00
2018-05-10 18:17:50 +01:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2017-11-16 22:58:45 -07:00
2019-03-18 12:04:18 +00:00
2017-12-13 13:59:04 -07:00
2018-02-26 20:55:26 -08:00
2018-03-29 15:04:14 -07:00
2019-03-18 12:04:18 +00:00
2019-03-06 17:17:30 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2018-07-17 15:35:49 -07:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-01-31 15:10:21 +08:00
2019-01-14 22:36:09 +00:00
2019-01-14 22:36:09 +00:00
2017-12-15 15:35:34 -08:00
2018-03-16 18:15:46 -07:00
2018-03-16 18:15:46 -07:00
2019-03-27 17:39:07 +08:00
2018-04-16 12:44:32 -06:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2018-04-18 13:23:24 -07:00
2019-03-18 12:04:18 +00:00
2018-04-13 17:01:13 -07:00
2018-05-06 22:25:05 -07:00
2018-01-18 14:41:41 -08:00
2017-08-07 23:08:36 +00:00
2017-08-07 23:08:36 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-03-06 17:17:30 +00:00
2019-01-25 11:22:58 -08:00
2019-03-18 12:04:18 +00:00
2018-12-28 16:05:22 -08:00
2017-09-20 23:39:20 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2017-11-09 19:40:03 +00:00
2019-01-28 12:46:33 +00:00
2017-10-11 18:35:14 -07:00
2019-03-18 12:04:18 +00:00
2018-01-09 12:05:39 -08:00
2019-03-18 12:04:18 +00:00
2018-03-07 18:02:55 +00:00
2017-11-01 14:49:10 -07:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2018-05-21 15:55:28 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-04-04 16:11:37 -07:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-03-21 15:16:58 +08:00
2017-06-28 16:49:12 -07:00
2019-03-18 12:04:18 +00:00
2017-11-21 10:17:14 -08:00
2019-03-18 12:04:18 +00:00
2018-02-16 22:11:35 +00:00
2019-03-18 12:04:18 +00:00
2018-01-24 13:08:19 -08:00
2018-01-24 13:08:19 -08:00
2017-10-20 16:29:59 -07:00
2018-09-10 23:19:49 +00:00
2019-03-18 12:04:18 +00:00
2017-06-09 15:23:04 -07:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2018-12-12 15:02:26 +01:00
2019-03-18 12:04:18 +00:00
2017-08-07 23:08:36 +00:00
2017-08-16 08:01:12 +00:00
2017-11-01 09:43:14 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2018-12-12 15:02:26 +01:00
2018-12-12 15:02:26 +01:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2018-03-07 11:04:34 +00:00
2018-05-22 18:43:48 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00
2019-03-18 12:04:18 +00:00