.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" Modified Sat Jul 24 19:17:53 1993 by Rik Faith (faith@cs.unc.edu) .\" Japanese Version Copyright (c) 1997 ISHIOKA Takashi .\" all rights reserved. .\" Translated Mon Sep 8 15:02:18 1997 .\" by ISHIOKA Takashi .TH GETUSERSHELL 3 2007-07-26 "GNU" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O getusershell, setusershell, endusershell \- get permitted user shells getusershell, setusershell, endusershell \- 許可されたユーザシェルを得る .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .sp .B char *getusershell(void); .sp .B void setusershell(void); .sp .B void endusershell(void); .fi .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .ad l .BR getusershell (), .BR setusershell (), .BR endusershell (): .RS 4 _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500) .RE .ad b .\"O .SH DESCRIPTION .SH 説明 .\"O The .\"O .BR getusershell () .\"O function returns the next line from the file .\"O \fI/etc/shells\fP, opening the file if necessary. .\"O The line should contain .\"O the pathname of a valid user shell. .\"O If \fI/etc/shells\fP does not exist or .\"O is unreadable, .\"O .BR getusershell () .\"O behaves as if \fI/bin/sh\fP and .\"O \fI/bin/csh\fP were listed in the file. .BR getusershell () 関数は \fI/etc/shells\fP ファイルから (開く必要があればこのファイルを開いてから) 現在行の次の一行を返す。 返された行の中身は有効なユーザシェルのうちの一つのパス名である。 (訳注. 一行に付き一つのシェルのパス名が書かれている。) もし \fI/etc/shells\fP が存在しないか、読み込み不可の場合には、 .BR getusershell () は \fI/bin/sh\fP と \fI/bin/csh\fP がファイルに記されているかのようにふるまう。 .PP .\"O The .\"O .BR setusershell () .\"O function rewinds \fI/etc/shells\fP. .BR setusershell () 関数は \fI/etc/shells\fP ファイルの ファイルポインタを先頭に戻す。 .PP .\"O The .\"O .BR endusershell () .\"O function closes \fI/etc/shells\fP. .BR endusershell () 関数は \fI/etc/shells\fP ファイルを閉じる。 .\"O .SH "RETURN VALUE" .SH 返り値 .\"O The .\"O .BR getusershell () .\"O function returns a NULL pointer on end-of-file. .BR getusershell () 関数はファイルの終端ではNULL ポインタを返す。 .\"O .SH FILES .SH ファイル .nf /etc/shells .fi .\"O .SH "CONFORMING TO" .SH 準拠 4.3BSD. .\"O .SH "SEE ALSO" .SH 関連項目 .BR shells (5)