OSDN Git Service

Update release for LDP 3.67
[linuxjm/LDP_man-pages.git] / release / man3 / getusershell.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\" Modified Sat Jul 24 19:17:53 1993 by Rik Faith (faith@cs.unc.edu)
30 .\"*******************************************************************
31 .\"
32 .\" This file was generated with po4a. Translate the source file.
33 .\"
34 .\"*******************************************************************
35 .\"
36 .\" Japanese Version Copyright (c) 1997 ISHIOKA Takashi
37 .\"         all rights reserved.
38 .\" Translated Mon Sep  8 15:02:18 1997
39 .\"         by ISHIOKA Takashi
40 .\"O .SH NAME
41 .\"O getusershell, setusershell, endusershell \- get permitted user shells
42 .\"O .SH SYNOPSIS
43 .\"O Feature Test Macro Requirements for glibc (see
44 .\"O .BR feature_test_macros (7)):
45 .\"O .SH DESCRIPTION
46 .\"O The
47 .\"O .BR getusershell ()
48 .\"O function returns the next line from the file
49 .\"O \fI/etc/shells\fP, opening the file if necessary.
50 .\"O The line should contain
51 .\"O the pathname of a valid user shell.
52 .\"O If \fI/etc/shells\fP does not exist or
53 .\"O is unreadable,
54 .\"O .BR getusershell ()
55 .\"O behaves as if  \fI/bin/sh\fP and
56 .\"O \fI/bin/csh\fP were listed in the file.
57 .\"O The
58 .\"O .BR setusershell ()
59 .\"O function rewinds \fI/etc/shells\fP.
60 .\"O The
61 .\"O .BR endusershell ()
62 .\"O function closes \fI/etc/shells\fP.
63 .\"O .SH "RETURN VALUE"
64 .\"O The
65 .\"O .BR getusershell ()
66 .\"O function returns a NULL pointer on end-of-file.
67 .\"O .SH FILES
68 .\"O .SH "CONFORMING TO"
69 .\"O .SH "SEE ALSO"
70 .\"
71 .TH GETUSERSHELL 3 2013\-06\-21 GNU "Linux Programmer's Manual"
72 .SH 名前
73 getusershell, setusershell, endusershell \- 許可されたユーザシェルを得る
74 .SH 書式
75 .nf
76 \fB#include <unistd.h>\fP
77 .sp
78 \fBchar *getusershell(void);\fP
79 .sp
80 \fBvoid setusershell(void);\fP
81 .sp
82 \fBvoid endusershell(void);\fP
83 .fi
84 .sp
85 .in -4n
86 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
87 .in
88 .sp
89 .ad l
90 \fBgetusershell\fP(), \fBsetusershell\fP(), \fBendusershell\fP():
91 .RS 4
92 _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500)
93 .RE
94 .ad b
95 .SH 説明
96 \fBgetusershell\fP()  関数は \fI/etc/shells\fP ファイルから (開く必要があればこのファイルを開いてから)
97 現在行の次の一行を返す。 返された行の中身は有効なユーザシェルのうちの一つのパス名である。 (訳注. 一行に付き一つのシェルのパス名が書かれている。)
98 もし \fI/etc/shells\fP が存在しないか、読み込み不可の場合には、 \fBgetusershell\fP()  は \fI/bin/sh\fP と
99 \fI/bin/csh\fP がファイルに記されているかのようにふるまう。
100 .PP
101 \fBsetusershell\fP()  関数は \fI/etc/shells\fP ファイルの ファイルポインタを先頭に戻す。
102 .PP
103 \fBendusershell\fP()  関数は \fI/etc/shells\fP ファイルを閉じる。
104 .SH 返り値
105 \fBgetusershell\fP() 関数はファイルの終端では NULL を返す。
106 .SH ファイル
107 .nf
108 /etc/shells
109 .fi
110 .SH 属性
111 .SS "マルチスレッディング (pthreads(7) 参照)"
112 関数 \fBgetusershell\fP(), \fBsetusershell\fP(), \fBendusershell\fP() はスレッドセーフではない。
113 .SH 準拠
114 4.3BSD.
115 .SH 関連項目
116 \fBshells\fP(5)
117 .SH この文書について
118 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.67 の一部
119 である。プロジェクトの説明とバグ報告に関する情報は
120 http://www.kernel.org/doc/man\-pages/ に書かれている。