forked from SELinuxProject/selinux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch moves all pcre1/2 dependencies into the new files regex.h and regex.c implementing the common denominator of features needed by libselinux. The compiler flag -DUSE_PCRE2 toggles between the used implementations. As of this patch libselinux supports either pcre or pcre2 but not both at the same time. The persistently stored file contexts information differs. This means libselinux can only load file context files generated by sefcontext_compile build with the same pcre variant. Also, for pcre2 the persistent format is architecture dependant. Stored precompiled regular expressions can only be used on the same architecture they were generated on. If pcre2 is used and sefcontext_compile shall generate portable output, it and libselinux must be compiled with -DNO_PERSISTENTLY_STORED_PATTERNS, at the cost of having to recompile the regular expressions at load time. Signed-off-by: Janis Danisevskis <jdanis@google.com> This patch includes includes: libselinux: fix memory leak on pcre2 Introduced a malloc on pcre_version(). Libselinux expected this to be static, just use a static internal buffer. Signed-off-by: William Roberts <william.c.roberts@intel.com>
- Loading branch information
Janis Danisevskis
authored and
Janis Danisevskis
committed
Sep 7, 2016
1 parent
36a21c3
commit 23838ba
Showing
8 changed files
with
699 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.