File: rcmd.3

package info (click to toggle)
manpages-ja 0.5.0.0.20080615-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 20,508 kB
  • ctags: 1
  • sloc: sh: 13,690; perl: 157; makefile: 114
file content (219 lines) | stat: -rw-r--r-- 7,177 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
.\"	$NetBSD: rcmd.3,v 1.9 1996/05/28 02:07:39 mrg Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\"	The Regents of the University of California.  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.
.\" 3. All advertising materials mentioning features or use of this software
.\"    must display the following acknowledgement:
.\"	This product includes software developed by the University of
.\"	California, Berkeley and its contributors.
.\" 4. Neither the name of the University nor the names of its contributors
.\"    may be used to endorse or promote products derived from this software
.\"    without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\"     @(#)rcmd.3	8.1 (Berkeley) 6/4/93
.\"
.\" Contributed as Linux man page by David A. Holland, 970908
.\" I have not checked whether the Linux situation is exactly the same.
.\"
.\" 2007-12-08, mtk, Converted from mdoc to man macros
.\"
.\"
.\" Japanese Version Copyright (c) 1999 NAKANO Takeo all rights reserved.
.\" Translated Mon Mar 1 1999 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
.\"
.\"WORD:	standard name		(ۥȤ) ɸ̾
.\"WORD:	regular file		̾ե
.\"
.TH RCMD 3 2007-12-28 "Linux" "Linux Programmer's Manual"
.SH ̾
rcmd, rresvport, iruserok, ruserok \- ⡼ȥޥɤ˥ȥ꡼֤ؿ
.SH 
.nf
.B #include <netdb.h> \ \ \fP/* Or <unistd.h> on some systems */
.sp
.BI "int rcmd(char **" ahost ", int " inport ", const char *" locuser ", "
.BI "         const char *" remuser ", const char *" cmd ", int *" fd2p );
.sp
.BI "int rresvport(int *" port );
.sp
.BI "int iruserok(uint32_t " raddr ", int " superuser ", "
.BI "             const char *" ruser ", const char *" luser );
.sp
.BI "int ruserok(const char *" rhost ", int " superuser ", "
.BI "            const char *" ruser ", const char *" luser );
.fi
.sp
.in -4n
glibc εǽޥ׷
.RB ( feature_test_macros (7)
):
.in
.sp
.BR rcmd (),
.BR rresvport (),
.BR ruserok ():
_BSD_SOURCE
.SH 
.BR rcmd ()
ؿϡѡ桼⡼ȥޥǥޥɤ¹Ԥ뤿
Ѥ롣ΤȤøݡֹȤˤǧڥब
Ѥ롣
.BR rresvport ()
ؿϡøݡȶ֤Υɥ쥹ĥåȤ
ǥץ֤
.BR iruserok ()
ؿ
.BR ruserok ()
ؿϡ
.BR rcmd ()
ǥӥ׵Ԥä饤ȤǧڤԤ
СѤؿǤ롣
ʾ 4 Ĥδؿϡ٤Ʊե˵ҤƤꡢ
.BR rshd (8)
Сˤä (¾δؿȤȤ) Ѥ롣
.PP
.BR rcmd ()
ؿ
.BR gethostbyname (3)
Ѥ
.I *ahost
λȤԤۥȤ¸ߤʤ \-1 ֤
Ĥä
.I *ahost
˥ۥȤɸ̾ (standard name) 򥻥åȤơ
ͽ󤵤Ƥ륤󥿡ͥåȥݡ
.I inport
ͳǥСؤ³Ω롣
.PP
³顢󥿡ͥåȥɥᥤ¸ߤ륿
.B SOCK_STREAM
ΥåȤƤӽФȤ֤롣
ΥåȤ¦ϥ⡼ȥޥɤ
.I stdin

.I stdout
³롣
.I fd2p
Ǥʤϡץؤ³⤦Ѱդ졢
Υǥץ
.I *fd2p
˥åȤ롣
ץϥ⡼ȥޥɤɸ२顼 (unit 2) 
Υ֤ͥ
ޤץϤ³äХȥǡ
Unix ʥֹȤư⡼ȥޥɤΥץ
롼פؤȥʥ롣
.I fd2p
ξϡ
.I stderr
(⡼ȥޥɤ unit 2) 
.I stdout
ȰˤޤȤ롣ޤξϥ⡼ȥץ
ǤդΥʥ뤳ȤϤǤʤʤ롣
Ӱ賰 (out-of-band) ǡѤС
⡼ȥץդȤϤǤ뤫⤷ʤ
.PP
ץȥξܺ٤
.BR rshd (8)
˵ҤƤ롣
.PP
.BR rresvport ()
ؿøɥ쥹˥Хɤ줿åȤ뤿Ѥ롣
ΥåȤ
.BR rcmd ()
ʤɤδؿǤѤŬƤ롣󥿡ͥåȥݡȤøݡȤϡ
0  1023 ϰϤǤ롣ѡ桼Υɥ쥹
åȤ˥Хɤ뤳ȤǤ롣
.PP
.BR iruserok ()

.BR ruserok ()
ؿϡޤʲΰ: ⡼ȥۥ (
.BR iruserok ()
 IP ɥ쥹ǡ
.BR ruserok ()
ϥۥ̾ǻ) 2 ĤΥ桼̾桼̾
ѡ桼ΤΤǤ뤫ɤ򼨤ե饰Ǥ롣
⤷桼\fBѡ桼ǤϤʤ\fPϡδؿ
.I /etc/hosts.equiv
եå롣ե뤬Ĥʤäꡢ
ƤΥå˼Ԥˤϡ
桼Υۡǥ쥯ȥˤ
.I .rhosts
եåơӥ׵᤬ĤƤ뤫ɤĴ٤롣
.PP
Υե뤬¸ߤʤäꡢ
̾ե (regular file) ǤϤʤäꡢ
桼ޤϥѡ桼ʳνͭäꡢ
ͭ԰ʳ񤭹߲ǽäꤷˤϡ
ΥåϼưŪ˼Ԥ롣
ޥ̾
.I hosts.equiv
˥ꥹȤƤꡢ
ۥȤȥ⡼ȥ桼̾
.I .rhosts
ե˽񤫤Ƥˤ 0 ֤롣
ʳξˤϡ
.BR iruserok ()

.BR ruserok ()
 \-1 ֤
.RB ( gethostname (2)
ˤäƼ) ɥᥤ󤬥⡼ȤΥɥᥤƱϡ
ޥ̾ꤹФ褤
.PP
⡼ȥۥȤ IP ɥ쥹狼äƤϡ
.BR ruserok ()

.BR iruserok () Ѥɤ
.BR ruserok ()
ϥ⡼ȥۥȤν°ɥᥤ DNS СǤʤƤ
ѤǤ뤫Ǥ롣
.SH ֤
.BR rcmd ()
ؿͭʥåȥǥץ֤
Ԥ \-1 ֤ɸ२顼Ϥ˿ǥå
ɽ롣
.PP
.BR rresvport ()
ؿϡȥХɤ줿ͭʥåȥǥץ֤
Ԥ \-1 ֤Хѿ
.I errno
򥨥顼θбͤ˥åȤ롣
.B EAGAIN
ϡδؿˤƤϡ֤٤ƤΥͥåȥݡȤ
Ȥ̣ɽ
.SH 
POSIX.1-2001 ˤϤʤ
BSD ϡSolaris ¾¿Υƥ¸ߤ롣
δؿ 4.2BSD о줷
.SH Ϣ
.BR rlogin (1),
.BR rsh (1),
.BR intro (2),
.BR rexec (3),
.BR rexecd (8),
.BR rlogind (8),
.BR rshd (8)