This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 3e17e303793192f70f7f2644a93d93d8edf33976 Author: yushuailong <[email protected]> AuthorDate: Thu Oct 8 20:38:11 2026 +0800 docs(identity): clarify setxid credential semantics Document that unprivileged setreuid() and setregid() calls may explicitly retain the current real ID. Clarify that supplying a real ID, even when unchanged, refreshes the saved ID from the effective ID. Assisted-by: OpenAI Codex Signed-off-by: yushuailong <[email protected]> --- Documentation/os/scheduling/user_identity.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/os/scheduling/user_identity.rst b/Documentation/os/scheduling/user_identity.rst index 9f621c80e8a..b9416e75472 100644 --- a/Documentation/os/scheduling/user_identity.rst +++ b/Documentation/os/scheduling/user_identity.rst @@ -89,10 +89,10 @@ This implements temporary privilege drop with ``seteuid()`` / These functions set the real and/or effective IDs in a single call. When the effective ID is zero, any requested real and effective values may be assigned and the saved set-ID is updated accordingly. When the effective ID is -non-zero, each requested value must equal the current effective ID, saved -set-ID, or (for the effective argument only) the real ID; otherwise the call -returns ``-1`` with ``errno`` set to ``EPERM``. When the real ID is changed, -or the effective ID is changed to a value not equal to the real ID, the saved +non-zero, each requested value must equal the current real, effective, or saved +set-ID; otherwise the call returns ``-1`` with ``errno`` set to ``EPERM``. +When the real ID is explicitly specified (its argument is not ``-1``), or the +effective ID is explicitly set to a value not equal to the real ID, the saved set-ID is set to the new effective ID. ``getresuid()`` and ``getresgid()``
