From owner-man-jp-reviewer@jp.freebsd.org  Sat Feb  3 21:15:47 2001
Received: (from daemon@localhost)
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) id VAA32046;
	Sat, 3 Feb 2001 21:15:47 +0900 (JST)
	(envelope-from owner-man-jp-reviewer@jp.FreeBSD.org)
Received: from mi00.iij4u.or.jp (mi00.iij4u.or.jp [210.130.0.80])
	by castle.jp.freebsd.org (8.9.3+3.2W/8.7.3) with ESMTP id VAA32041
	for <man-jp-reviewer@jp.freebsd.org>; Sat, 3 Feb 2001 21:15:46 +0900 (JST)
	(envelope-from nokubi@ff.iij4u.or.jp)
Received: from ppp-client.ff.iij4u.or.jp (h167.p028.iij4u.or.jp [210.130.28.167])
	by mi00.iij4u.or.jp (8.8.8/MI1.3) with ESMTP id VAA15201
	for <man-jp-reviewer@jp.freebsd.org>; Sat, 3 Feb 2001 21:15:45 +0900 (JST)
Message-Id: <200102031215.VAA15201@mi00.iij4u.or.jp>
Received: from sassaby.nokubi.or.jp (sassaby.nokubi.or.jp [192.168.9.3]) by ppp-client.ff.iij4u.or.jp (8.11.1/3.5Wpl7-ppp) with ESMTP id f13CC5R16209 for <man-jp-reviewer@jp.freebsd.org>; Sat, 3 Feb 2001 21:12:06 +0900 (JST)
Received: from sassaby.nokubi.or.jp (localhost.nokubi.or.jp [127.0.0.1]) by sassaby.nokubi.or.jp (8.9.3/3.5Wpl7-glove) with ESMTP id VAA00477 for <man-jp-reviewer@jp.freebsd.org>; Sat, 3 Feb 2001 21:14:48 +0900 (JST)
To: man-jp-reviewer@jp.freebsd.org
Mime-Version: 1.0 (generated by tm-edit 7.108)
Content-Type: text/plain; charset=ISO-2022-JP
Date: Sat, 03 Feb 2001 21:14:47 +0900
From: NOKUBI Hirotaka <nokubi@ff.iij4u.or.jp>
Reply-To: man-jp-reviewer@jp.freebsd.org
Precedence: list
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+000315
X-Sequence: man-jp-reviewer 3287
Subject: [man-jp-reviewer 3287] (man2) setresuid.2
Errors-To: owner-man-jp-reviewer@jp.freebsd.org
Sender: owner-man-jp-reviewer@jp.freebsd.org
X-Originator: nokubi@ff.iij4u.or.jp

setresuid.2 $B$N=iLu$G$9!#(B

----
NOKUBI Hirotaka
Fingerprint20 = DEBC 0793 7CD6 92F1 0A1F  A792 9E2F EEEE A41B 171D

.\" Copyright (c) 2000
.\"      Sheldon Hearn.  All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES
.\"
.\" $FreeBSD: src/lib/libc/sys/setresuid.2,v 1.2.2.1 2000/04/22 17:07:05 phantom Exp $
.\"
.Dd January 17, 2000
.Dt SETRESUID 2
.Os
.Sh $BL>>N(B
.Nm setresgid ,
.Nm setresuid
.Nd $B%f!<%6$^$?$O%0%k!<%W$N<B(B ID$B!"<B8z(B ID$B!"(Bsaved ID $B$r%;%C%H$9$k(B
.Sh $B%i%$%V%i%j(B
.Lb libc
.Sh $B=q<0(B
.Fd #include <sys/types.h>
.Fd #include <unistd.h>
.Ft int
.Fn setresgid "gid_t rgid" "gid_t egid" "gid_t sgid"
.Ft int
.Fn setresuid "uid_t ruid" "uid_t eu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