1.. title:: clang-tidy - clang-analyzer-security.SetgidSetuidOrder
2.. meta::
3   :http-equiv=refresh: 5;URL=https://clang.llvm.org/docs/analyzer/checkers.html#security-setgidsetuidorder-c
4
5clang-analyzer-security.SetgidSetuidOrder
6=========================================
7
8The checker checks for sequences of ``setuid(getuid())`` and ``setgid(getgid())``
9calls (in this order). If such a sequence is found and there is no other
10privilege-changing function call (``seteuid``, ``setreuid``, ``setresuid`` and
11the GID versions of these) in between, a warning is generated. The checker finds
12only exactly ``setuid(getuid())`` calls (and the GID versions), not for example
13if the result of ``getuid()`` is stored in a variable.
14
15The `clang-analyzer-security.SetgidSetuidOrder` check is an alias, please see
16`Clang Static Analyzer Available Checkers
17<https://clang.llvm.org/docs/analyzer/checkers.html#security-setgidsetuidorder-c>`_
18for more information.
19