From owner-man-jp@jp.freebsd.org  Mon Jul  2 23:24:14 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id XAA87122;
	Mon, 2 Jul 2001 23:24:14 +0900 (JST)
	(envelope-from owner-man-jp@jp.FreeBSD.org)
Received: from tortoise.jp.freebsd.org (root@tortoise.jp.FreeBSD.ORG [210.157.158.41])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id XAA87117
	for <man-jp@jp.freebsd.org>; Mon, 2 Jul 2001 23:24:13 +0900 (JST)
	(envelope-from mistral@imasy.or.jp)
Received: from mistral.imasy.or.jp (root@[3ffe:505:2020:1:9862:d6f:50d0:dd32])
	by tortoise.jp.freebsd.org (8.11.3+3.4W/8.11.3) with ESMTP/inet6 id f62EOAF15255
	for <man-jp@jp.freebsd.org>; Mon, 2 Jul 2001 23:24:11 +0900 (JST)
	(envelope-from mistral@imasy.or.jp)
Received: (from yohta@localhost)
	by mistral.imasy.or.jp (8.11.4/8.11.4/mistral) id f62EO8x47495;
	Mon, 2 Jul 2001 23:24:08 +0900 (JST)
	(envelope-from yohta)
From: mistral@imasy.or.jp (Yoshihiko SARUMARU)
To: man-jp@jp.freebsd.org
In-Reply-To: Your message of "Mon, 02 Jul 2001 19:19:28 +0900".
	<20010702191928F.shimura@math.cst.nihon-u.ac.jp>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-2022-JP
X-Mailer: mnews [version 1.22PL5] 2001-02/07(Wed)
Date: Mon, 2 Jul 2001 23:24:06 +0900
Message-ID: <010702232406.M0147316@mistral.imasy.or.jp>
Reply-To: man-jp@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+010328
X-Sequence: man-jp 3574
Subject: [man-jp 3574] Re: id(1) =?ISO-2022-JP?B?GyRCJE4bKEI=?= -p
	=?ISO-2022-JP?B?GyRCJSolVyU3JWclcyRHJE4bKEI=?= euid
	=?ISO-2022-JP?B?GyRCJE5AYkxAGyhC?= 
Errors-To: owner-man-jp@jp.freebsd.org
Sender: owner-man-jp@jp.freebsd.org
X-Originator: mistral@imasy.or.jp

$B!!1n4]$G$9!#(B

2001-07-02($B7n(B) 19:19:28.$B:"!"(Bshimura@math.cst.nihon-u.ac.jp$B$5$s$O=q$-$^$7$?!#(B

> $B$H$3$m$,!"(B/usr/src/usr.bin/id/id.c $B$N3:EvItJ,(B (pretty(pw) $B$NDj5A$NCf$G(B
> $B$9$h$M(B) $B$r8+$k$H<!$N$h$&$K$J$C$F$$$^$9!#(B
> 
>  if ((eid = geteuid()) != rid) {
>          if ((pw = getpwuid(eid)))
>                  (void)printf("euid\t%s\n", pw->pw_name);
>          else
>                  (void)printf("euid\t%u\n", eid);
>  }
> 
> 
> $B$3$l$r8+$k8B$j$G$OI=<($5$l$k$N$O<B8z%f!<%6(B ID $B$@$H;W$&$N$G$9$,!"<B:]$N(B
> $BF0:n$O$I$&$J$N$G$7$g$&$+!#(B

$B!!<B8z%f!<%6$,I=<($5$l$k$G$7$g$&$M!#(B
  POSIX (The Single UNIX (R) Specification, Version 2) $B$G$b(B
|    If the effective and real user IDs do not match, the following will be
|    inserted immediately before the \n character in the previous format:
|    
|    " euid=%u(%s)"
|    
|    with the following arguments added at the end of the argument list:
|   
|    <effective user ID>,
|    <effective user-name>
$B$H$J$C$F$^$9!#(B
http://www.opengroup.org/onlinepubs/007908799/xcu/id.html   


  $B$7$+$7$=$b$=$b(B id $B$r<B9T$7$?$H$-$K<B%f!<%6$H<B8z%f!<%6$,0c$&$H(B
$B$$$&$N$O!"$I$&$$$&>l9g$J$s$G$7$g$&$M!#(Bsetuid $B$9$l$P$=$j$cJQ$o$j(B
$B$^$9$1$I!"$U$D$&$7$J$$$G$7$g$&$7!#(B

--
$B1n4]K'I'(B (Yoshihiko SARUMARU)
mail: mistral@imasy.or.jp       web: http://www.imasy.or.jp/~mistral/
