Skip to content
Commit cc8a1620 authored by Jesse Hathaway's avatar Jesse Hathaway Committed by Adhemerval Zanella
Browse files

getlogin_r: return early when linux sentinel value is set



When there is no login uid Linux sets /proc/self/loginid to the sentinel
value of, (uid_t) -1. If this is set we can return early and avoid
needlessly looking up the sentinel value in any configured nss
databases.

Checked on aarch64-linux-gnu.

	* sysdeps/unix/sysv/linux/getlogin_r.c (__getlogin_r_loginuid): Return
	early when linux sentinel value is set.

Reviewed-by: default avatarAdhemerval Zanella <adhemerval.zanella@linaro.org>
parent 8bfd94d0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment