20 lines · plain
1.. title:: clang-tidy - clang-analyzer-security.SetgidSetuidOrder2.. meta::3 :http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-setgidsetuidorder-c4 5clang-analyzer-security.SetgidSetuidOrder6=========================================7 8The checker checks for sequences of ``setuid(getuid())`` and9``setgid(getgid())`` calls (in this order). If such a sequence is found and10there is no other privilege-changing function call (``seteuid``, ``setreuid``,11``setresuid`` and the GID versions of these) in between, a warning is12generated. The checker finds only exactly ``setuid(getuid())`` calls (and the13GID versions), not for example if the result of ``getuid()`` is stored in14a variable.15 16The `clang-analyzer-security.SetgidSetuidOrder` check is an alias, please see17`Clang Static Analyzer Available Checkers18<https://clang.llvm.org/docs/analyzer/checkers.html#security-setgidsetuidorder-c>`_19for more information.20