Commits

Author Commit Message Labels Comments Date
Stephen Smalley
Merge branch 'master' into seandroid
Branches
seandroid
William Roberts
restorecon: do not set security.restorecon_last on ramfs and tmpfs When setting the last value for restorecon, it should skip over the ramfs and tmpfs, as setting last on non-persistent file systems makes no sense. Notably, this avoids triggering a CAP_SYS_ADMIN capability check and a SELinux setattr permission check to the file when applying restorecon to ramfs or tmpfs filesystems. Change-Id: I7e7ebaa9d62c7bc6a5587cc9c472dcb4a7a49513 Signed-off-by: William Rob…
Stephen Smalley
Merge branch 'master' into seandroid
Branches
seandroid
Richard Haines
libselinux: Enhance spec file support This file labeling update brings libselinux into line with upstream selinux except for minor changes to support MacOS X and Bionic. Update file labeling to support a PCRE formatted binary file_contexts file. The file is generated on the host using sefcontext_compile. Should the bin file not be present (because the build process has not been implemented yet) or corrupt, the load process will fallb…
Stephen Smalley
Merge branch 'master' into seandroid
Branches
seandroid
Jeffrey Vander Stoep
Merge "Revert "libselinux: Enhance spec file support""
Tags
android-m-preview-1
Jeffrey Vander Stoep
Revert "libselinux: Enhance spec file support" This reverts commit c0798527a397fecde8ad703c565204e3ef828801. There is a change in how file names are matched. Unescaped periods are no longer treated like a regex period (matching any character including an actual period). For example in devices/moto/shamu/sepolicy/file_contexts, several of the block devices have unescaped periods. These partitions do not receive their proper label, and the devi…
Jeffrey Vander Stoep
Merge "libselinux: Enhance spec file support"
Richard Haines
libselinux: Enhance spec file support This file labeling update brings libselinux into line with upstream selinux except for minor changes to support MacOS X and Bionic. Update file labeling to support a PCRE formatted binary file_contexts file. The file is generated on the host using sefcontext_compile. Should the bin file not be present (because the build process has not been implemented yet) or corrupt, the load process will fallb…
Stephen Smalley
Merge branch 'master' into seandroid
Branches
seandroid
dcashman
restorecon: only operate on canonical paths. Bug: 20128916 Change-Id: I9b063e31df1056d6760a2ee96771c3d4948ee661
Stephen Smalley
Merge branch 'master' into seandroid
Branches
seandroid
Jeffrey Vander Stoep
Merge "Revert "Add cleanspec""
Tags
android-m-preview
Jeffrey Vander Stoep
Merge "Revert "Move host functionality to common selinux dir""
Jeffrey Vander Stoep
Revert "Add cleanspec" Reverting commit that made this change necessary: 992200ff0364edcbae2a1b279abe7af7e02596de This reverts commit f58320b85af336fab4d2d697a03fb8a8eb3a931f. Change-Id: Ie971180822a387d68183260c8ca3206bf1582679
Jeffrey Vander Stoep
Revert "Move host functionality to common selinux dir" This change breaks the Mac build due to no stdio_ext.h This reverts commit 992200ff0364edcbae2a1b279abe7af7e02596de. Change-Id: Ic5a20dd4ed41b325174202ce992d557fe09f23da
Jeff Vander Stoep
Merge "Move host functionality to common selinux dir"
Jeff Vander Stoep
Add cleanspec Preserve incremental build after libselinux host functionality move to common selinux directory Change-Id: Ia07a9cb04a520307de8aacbc02721b4382d7fd58
Jeff Vander Stoep
Move host functionality to common selinux dir Device side libselinux has Android specific modifications. but host side tools do not. Move host functionality over to common selinux directory. This allows tools with libselinux dependency e.g. audit2allow to be built in tree. Change-Id: I30967f45928c6c20572114b52fa946f366a024a6
Stephen Smalley
Merge branch 'master' into seandroid
Branches
seandroid
dcashman
Change seapp_context isSystemServer to bool. This brings it in line with the other is* members of struct seapp_context and better reflects its usage. Change-Id: I6e2d1891e7bd38b5164dfe66b66d698ad48323d5
Branches
seandroid-5.1.1
Stephen Smalley
libselinux: Reject duplicate entries within seapp_contexts. Presently it will permit duplicate entries (either duplicated on input selectors or entirely) and whichever one ended up first in the sorted list would win (and this would be arbitrary as the comparison function would return 0 since they have the same input selectors). Treat it as an error instead and fail. Change-Id: I611515699b35b04dfc5c5020b92a88bff24ca606 Signed-off-by: Stephen Smalley <sds@…
Branches
seandroid-5.1.1
Stephen Smalley
libselinux: Reject duplicate keys in seapp_context entries. Presently it will leak the memory from the first definition and use the last one in each line. Treat it as an error instead and fail. Change-Id: I6a6383bf6ace59b1fd504c01047fd685c16c4849 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Branches
seandroid-5.1.1
Stephen Smalley
libselinux: Add a README.android file. Add a README.android file to libselinux explaining how it relates to upstream, how it differs, and which new files were added. Change-Id: I113f7fac5ed6a3f37fd65ce790fd59b2496998cc Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Branches
seandroid-5.1.1
Stephen Smalley
libselinux: Only use /data/security policy if all files are present. Otherwise if we have a matching selinux_version but only a subset of the expected policy files (sepolicy, *_contexts) under /data/security, then we'll fail when attempting to open the missing files. This does not check that mac_permissions.xml is present as that is only opened and used by SELinuxMMAC, not by libselinux, but we should likely change SELinuxMMAC to do the same. The alternative woul…
Branches
seandroid-5.1.1
Stephen Smalley
libselinux: drop sebool= support SELinux policy booleans are prohibited in AOSP, so we can drop the support for the sebool= input selector. Change-Id: I4828cdf1e5370b1dee7d1e887fd7a3d54be2d95d Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Branches
seandroid-5.1.1
Stephen Smalley
libselinux: fix policy reload logic I5d6d6eb7438361bbb072540c96361cef95c83a9e introduced a bug in the policy reload logic such that we incorrectly (but harmlessly) load policy twice from / on each boot and never load policy from /data/security/current even if it is present. Also, even prior to that change, we were failing to reload policy from / if we previously had loaded a policy from /data/security/current and that policy was re…
Branches
seandroid-5.1.1
Stephen Smalley
libselinux: pcre_study can return NULL without error. Per the man page, pcre_study can return NULL without error if it could not find any additional information. Errors are indicated by the combination of a NULL return value and a non-NULL error string. Fix the handling so that we do not incorrectly reject file_contexts entries. Change-Id: I2e7b7e01d85d96dd7fe78545d3ee3834281c4eba Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Branches
seandroid-5.1.1
Stephen Smalley
Coding style fix for sizeof operator. commit dcd8167f7722c1f00c71f54af5425434da2d6cbc upstream. Change-Id: I3373f01811d93348801fa8ae4156ab4edd6f259b Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Branches
seandroid-5.1.1
Stephen Smalley
Fix avc_has_perm() returns -1 even when SELinux is in permissive mode. commit 8b114a3bf25b7b818910cca77528de80cdb953f8 upstream. If we get an EINVAL from security_compute_av* (indicates an invalid source or target security context, likely due to a policy reload that removed one or the other) and we are in permissive mode, then handle it like any other permission denial, i.e. log but do not deny it. Change-Id: I6cb5f06e7468d685b647513ed7a653f2f6676a2a Reported-by: L…
Branches
seandroid-5.1.1
  1. Prev
  2. Next