.\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" %%%LICENSE_START(VERBATIM) .\" 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. .\" %%%LICENSE_END .\" .\" 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) .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1997 ISHIOKA Takashi .\" all rights reserved. .\" Translated Mon Sep 8 15:02:18 1997 .\" by ISHIOKA Takashi .\"O .SH NAME .\"O getusershell, setusershell, endusershell \- get permitted user shells .\"O .SH SYNOPSIS .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): .\"O .SH DESCRIPTION .\"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. .\"O The .\"O .BR setusershell () .\"O function rewinds \fI/etc/shells\fP. .\"O The .\"O .BR endusershell () .\"O function closes \fI/etc/shells\fP. .\"O .SH "RETURN VALUE" .\"O The .\"O .BR getusershell () .\"O function returns a NULL pointer on end-of-file. .\"O .SH FILES .\"O .SH "CONFORMING TO" .\"O .SH "SEE ALSO" .\" .TH GETUSERSHELL 3 " 2016\-03\-15" GNU "Linux Programmer's Manual" .SH 名前 getusershell, setusershell, endusershell \- 許可されたユーザーシェルを得る .SH 書式 .nf \fB#include \fP .PP \fBchar *getusershell(void);\fP .PP \fBvoid setusershell(void);\fP .PP \fBvoid endusershell(void);\fP .fi .PP .RS -4 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .RE .PP .ad l \fBgetusershell\fP(), \fBsetusershell\fP(), \fBendusershell\fP(): .nf .\" commit 266865c0e7b79d4196e2cc393693463f03c90bd8 glibc 2.21 以降: _DEFAULT_SOURCE glibc 2.19 と 2.20: _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500) glibc 2.19 以前: _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500) .fi .ad b .SH 説明 \fBgetusershell\fP() 関数は \fI/etc/shells\fP ファイルから (開く必要があればこのファイルを開いてから) 現在行の次の一行を返す。 返された行の中身は有効なユーザーシェルのうちの一つのパス名である。 (訳注. 一行に付き一つのシェルのパス名が書かれている。) もし \fI/etc/shells\fP が存在しないか、読み込み不可の場合には、 \fBgetusershell\fP() は \fI/bin/sh\fP と \fI/bin/csh\fP がファイルに記されているかのようにふるまう。 .PP \fBsetusershell\fP() 関数は \fI/etc/shells\fP ファイルの ファイルポインターを先頭に戻す。 .PP \fBendusershell\fP() 関数は \fI/etc/shells\fP ファイルを閉じる。 .SH 返り値 \fBgetusershell\fP() 関数はファイルの終端では NULL を返す。 .SH ファイル \fI/etc/shells\fP .SH 属性 この節で使用されている用語の説明については、 \fBattributes\fP(7) を参照。 .TS allbox; lbw31 lb lb l l l. インターフェース 属性 値 T{ \fBgetusershell\fP(), \fBsetusershell\fP(), .br \fBendusershell\fP() T} Thread safety MT\-Unsafe .TE .SH 準拠 4.3BSD. .SH 関連項目 \fBshells\fP(5) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 5.10 の一部である。プロジェクトの説明とバグ報告に関する情報は \%https://www.kernel.org/doc/man\-pages/ に書かれている。