All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alejandro Colomar <alx@kernel.org>
To: "Štěpán Němec" <stepnem@smrk.net>
Cc: linux-man@vger.kernel.org
Subject: Re: [PATCH] seteuid.2: glibc implements seteuid calling setresuid, not setreuid
Date: Sun, 11 Feb 2024 19:52:48 +0100	[thread overview]
Message-ID: <ZckXgE9O_4QfWaLk@debian> (raw)
In-Reply-To: <20240207201336.477108-1-stepnem@smrk.net>

[-- Attachment #1: Type: text/plain, Size: 1729 bytes --]

Hi Štěpán,

On Wed, Feb 07, 2024 at 09:13:36PM +0100, Štěpán Němec wrote:
> Analogously with set*gid.
> 
> This has been the case since more than two decades, e.g.:
> 
>   commit eae59a5681a6 glibc-2.3.2-793-geae59a5681a6
>   Commit: Ulrich Drepper <drepper@redhat.com>
>   CommitDate: Sun Jun 8 22:37:53 2003 +0000
> 
>   Update.
> 
>           * sysdeps/unix/sysv/linux/seteuid.c (seteuid): Use setresuid32
>           syscall directly if possible.  If __ASSUME_SETRESUID_SYSCALL is
>           defined drop compatibility code.
>   [...]
> 
> The change in implementation from setreuid/setregid is also
> already mentioned two paragraphs earlier in the same man page.
> 
> Fixes: a36b2bb0eca4 ("seteuid.2: seteuid() and setegid() are implemented as library functions")
> Fixes: 8554dd0324b0 ("seteuid.2: tfix")
> Signed-off-by: Štěpán Němec <stepnem@smrk.net>

Patch applied.  Thanks.

Have a lovely day!
Alex

> ---
>  man2/seteuid.2 | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/man2/seteuid.2 b/man2/seteuid.2
> index 312ed1f9e002..0eae04f79fc9 100644
> --- a/man2/seteuid.2
> +++ b/man2/seteuid.2
> @@ -117,9 +117,9 @@ .SS C library/kernel differences
>  and
>  .BR setegid ()
>  are implemented as library functions that call, respectively,
> -.BR setreuid (2)
> +.BR setresuid (2)
>  and
> -.BR setregid (2).
> +.BR setresgid (2).
>  .SH STANDARDS
>  POSIX.1-2008.
>  .SH HISTORY
> 
> base-commit: 452f15569fc3cb1697b6482754dd51a56fcab970
> prerequisite-patch-id: 79eb7cb4939079d7fa9f00007856784f30801886
> -- 
> 2.43.0
> 

-- 
<https://www.alejandro-colomar.es/>
Looking for a remote C programming job at the moment.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2024-02-11 18:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-07 20:13 [PATCH] seteuid.2: glibc implements seteuid calling setresuid, not setreuid Štěpán Němec
2024-02-11 18:52 ` Alejandro Colomar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZckXgE9O_4QfWaLk@debian \
    --to=alx@kernel.org \
    --cc=linux-man@vger.kernel.org \
    --cc=stepnem@smrk.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.