mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Fix naming conflicts in cpp/world-writable-file-creation
This commit is contained in:
@@ -12,17 +12,16 @@
|
||||
|
||||
import cpp
|
||||
import FilePermissions
|
||||
import semmle.code.cpp.commons.unix.Constants
|
||||
|
||||
predicate worldWritableCreation(FileCreationExpr fc, int mode) {
|
||||
mode = localUmask(fc).mask(fc.getMode()) and
|
||||
sets(mode, s_iwoth())
|
||||
sets(mode, UnixConstants::s_iwoth())
|
||||
}
|
||||
|
||||
predicate setWorldWritable(FunctionCall fc, int mode) {
|
||||
fc.getTarget().getName() = ["chmod", "fchmod", "_chmod", "_wchmod"] and
|
||||
mode = fc.getArgument(1).getValue().toInt() and
|
||||
sets(mode, s_iwoth())
|
||||
sets(mode, UnixConstants::s_iwoth())
|
||||
}
|
||||
|
||||
from Expr fc, int mode, string message
|
||||
|
||||
Reference in New Issue
Block a user