Print the euid after the gid as demanded by POSIX.

Submitted by:	Martin Nagy <nagy.martin@gmail.com>
PR:		96239
MFC after:	2 weeks
This commit is contained in:
stefanf 2006-05-28 12:32:30 +00:00
parent a1a96d1eac
commit 1996e53039

View File

@ -252,14 +252,14 @@ id_print(struct passwd *pw, int use_ggl, int p_euid, int p_egid)
}
printf("uid=%u(%s)", uid, pw->pw_name);
printf(" gid=%u", gid);
if ((gr = getgrgid(gid)))
(void)printf("(%s)", gr->gr_name);
if (p_euid && (euid = geteuid()) != uid) {
(void)printf(" euid=%u", euid);
if ((pw = getpwuid(euid)))
(void)printf("(%s)", pw->pw_name);
}
printf(" gid=%u", gid);
if ((gr = getgrgid(gid)))
(void)printf("(%s)", gr->gr_name);
if (p_egid && (egid = getegid()) != gid) {
(void)printf(" egid=%u", egid);
if ((gr = getgrgid(egid)))