[clang-tidy][Part1] Add a new module Android and three new checks.
Summary:
A common source of security bugs is code that opens a file descriptors without using the O_CLOEXEC flag. (Without that flag, an opened sensitive file would remain open across a fork+exec to a lower-privileged SELinux domain, leaking that sensitive data.).
Add a new Android module and one checks in clang-tidy.
-- open(), openat(), and open64() should include O_CLOEXEC in their flags argument. [android-file-open-flag]
Links to part2 and part3:
https://reviews.llvm.org/D33745
https://reviews.llvm.org/D33747
Reviewers: chh, alexfh, aaron.ballman, hokein
Reviewed By: alexfh, hokein
Subscribers: jbcoe, joerg, malcolm.parsons, Eugene.Zelenko, srhines, mgorny, xazax.hun, cfe-commits, krytarowski
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D33304
llvm-svn: 306165
2017-06-24 05:37:29 +08:00
|
|
|
set(LLVM_LINK_COMPONENTS support)
|
|
|
|
|
|
|
|
add_clang_library(clangTidyAndroidModule
|
|
|
|
AndroidTidyModule.cpp
|
2017-08-11 06:09:22 +08:00
|
|
|
CloexecCheck.cpp
|
2017-06-30 01:40:57 +08:00
|
|
|
CloexecCreatCheck.cpp
|
2017-08-15 01:04:16 +08:00
|
|
|
CloexecDupCheck.cpp
|
2017-06-30 01:42:23 +08:00
|
|
|
CloexecFopenCheck.cpp
|
2017-08-15 01:45:48 +08:00
|
|
|
CloexecInotifyInit1Check.cpp
|
2017-08-15 01:25:41 +08:00
|
|
|
CloexecInotifyInitCheck.cpp
|
2017-08-11 06:09:22 +08:00
|
|
|
CloexecMemfdCreateCheck.cpp
|
2017-06-30 03:13:29 +08:00
|
|
|
CloexecOpenCheck.cpp
|
2017-07-13 01:43:36 +08:00
|
|
|
CloexecSocketCheck.cpp
|
[clang-tidy][Part1] Add a new module Android and three new checks.
Summary:
A common source of security bugs is code that opens a file descriptors without using the O_CLOEXEC flag. (Without that flag, an opened sensitive file would remain open across a fork+exec to a lower-privileged SELinux domain, leaking that sensitive data.).
Add a new Android module and one checks in clang-tidy.
-- open(), openat(), and open64() should include O_CLOEXEC in their flags argument. [android-file-open-flag]
Links to part2 and part3:
https://reviews.llvm.org/D33745
https://reviews.llvm.org/D33747
Reviewers: chh, alexfh, aaron.ballman, hokein
Reviewed By: alexfh, hokein
Subscribers: jbcoe, joerg, malcolm.parsons, Eugene.Zelenko, srhines, mgorny, xazax.hun, cfe-commits, krytarowski
Tags: #clang-tools-extra
Differential Revision: https://reviews.llvm.org/D33304
llvm-svn: 306165
2017-06-24 05:37:29 +08:00
|
|
|
|
|
|
|
LINK_LIBS
|
|
|
|
clangAST
|
|
|
|
clangASTMatchers
|
|
|
|
clangBasic
|
|
|
|
clangLex
|
|
|
|
clangTidy
|
|
|
|
clangTidyUtils
|
|
|
|
)
|