summaryrefslogtreecommitdiff
path: root/core/java/android/os/SELinux.java
Commit message (Collapse)AuthorAgeFilesLines
* Use new UnsupportedAppUsage annotation.Artur Satayev2019-12-181-1/+1
| | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I534e3fd1305e2f4af076986770033478448a665c
* Don't set sehash when calling restoreconRecursiveNick Kralevich2019-04-051-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. (cherry picked from commit cb1dddad27b86e675f7141ca429e9bb8ab8ac410) Change-Id: Ifc5be24d14029cb616d5564366fc10a0b93c9939
* Set packages.list context to packages_list_file.Florian Mayer2019-04-031-0/+7
| | | | | | | | | Bug: 123186697 Test: adb shell su root ls -lZd /data/system/packages.list -rw-r----- 1 system package_info u:object_r:packages_list_file:s0 35816 2019-04-02 14:17 /data/system/packages.list Change-Id: I62ae03b5c2acf6c703f2e4c6f49cc68825e3a785
* Add @UnsupportedAppUsage annotationsAndrei Onea2019-03-151-0/+6
| | | | | | | | | | | | | | | | For packages: android.os This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: I4ece0a3f37f88fc2508cb965092aed7cabc61819
* Add @UnsupportedAppUsage to methods known to be used by appsDavid Brazdil2019-01-281-0/+2
| | | | | | | | | | | Exempted-From-Owner-Approval: Automatic changes to the codebase affecting only @UnsupportedAppUsage annotations, themselves added without requiring owners approval earlier. Bug: 123308819 Bug: 122291025 Test: m appcompat Change-Id: Iafd62b8ece0d19268fad65086134a1e7369bc0bb
* Add a hidden API for fgetfilecon(3)Makoto Onuki2018-08-061-1/+8
| | | | | | Test: manual test with the debug code Bug: 111381531 Change-Id: Ie9d6fe9e737b852cc825990a83bda6eb95cf1160
* Drop unusable SELinux APIs.Stephen Smalley2015-03-131-28/+0
| | | | | | | | | setSELinuxEnforce is not allowed by policy. get/setBooleanValue and getBooleanNames are moot since SELinux policy booleans are forbidden by CTS. Change-Id: I512953edd1c38828efce698ae8475603775c32e8 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
* Change new file installs to be cluster-based!Jeff Sharkey2014-07-081-13/+18
| | | | | | | | | | | | | | | | Now that all the other pieces are in place, we're ready to start installing new file-based packages as a cluster (the new unified directory-based layout). This greatly simplifies the renaming process. Also add helper methods to ApplicationInfo to give a much clearer mapping between it and internal field names, since we can't change the public API. Add recursive restorecon(). Bug: 14975160 Change-Id: I72a63c5ddbc594c2fec4a91dd59f73ef253fbfd7
* Slow progress towards APK clusters.Jeff Sharkey2014-07-021-0/+19
| | | | | | | | | | | | | | | | | Differentiate between "split APKs" and "cluster packages". A cluster package is a directory containing zero or more APKs (base+splits), and a monolithic package is a single APK (base). PackageSetting will use the directory name as its codePath, so track the baseCodePath separately. Clarify documentation in several places. Require that all installers provide file:// URIs through existing hidden APIs; PackageInstaller hasn't been able to read content:// URIs for a long time. Bug: 14975160 Change-Id: I1c6fed1b55205c2474b09871161a98a26669d22e
* Fix SELinux.java doc errorsRichard Haines2013-05-221-7/+5
| | | | | | | This fixes five errors when building the Java docs. It also removes two obsolete lines. Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
* Introduce a restorecon JNI binding.rpcraig2012-07-251-0/+71
| | | | | | | | | Label the vmdl.*\.tmp files and the final .apk file differently. Modify the WallpaperManagerService to restorecon the wallpaper file. Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil> Change-Id: Idfc056e9ec0508d7e11100626a7114f341f1af70
* Add JNI bindings for some of the libselinux interfaces.Stephen Smalley2012-03-301-0/+105
Change-Id: Ifcc68cb06f9f56a04f3bc64dd9906a9436fabc88