flag fields are u_int's
[unix-history] / usr / src / lib / libc / gen / getusershell.3
CommitLineData
65b85f8f
KB
1.\" Copyright (c) 1985 The Regents of the University of California.
2.\" All rights reserved.
778f0f70 3.\"
91cff1e1 4.\" %sccs.include.redist.man%
65b85f8f 5.\"
91cff1e1 6.\" @(#)getusershell.3 6.4 (Berkeley) %G%
778f0f70
KM
7.\"
8.TH GETUSERSHELL 3 ""
9.UC 6
10.SH NAME
11getusershell, setusershell, endusershell \- get legal user shells
12.SH SYNOPSIS
13.nf
14.B char *getusershell()
15.PP
16.B setusershell()
17.PP
18.B endusershell()
19.fi
20.SH DESCRIPTION
21.I Getusershell
22returns a pointer to a legal user shell as defined by the
23system manager in the file
24.IR /etc/shells .
25If
26.I /etc/shells
fe953ca4
KB
27is unreadable or does not exist,
28.I getusershell
29behaves as if
778f0f70
KM
30.I /bin/sh
31and
32.I /bin/csh
fe953ca4 33were listed in the file.
778f0f70
KM
34.PP
35.I Getusershell
36reads the next
37line (opening the file if necessary);
38.I setusershell
39rewinds the file;
40.I endusershell
41closes it.
42.SH FILES
43/etc/shells
fe953ca4
KB
44.SH "SEE ALSO"
45shells(5)
778f0f70
KM
46.SH DIAGNOSTICS
47The routine
48.I getusershell
fe953ca4 49returns a null pointer (0) on EOF.
778f0f70
KM
50.SH BUGS
51All information
52is contained in a static area
53so it must be copied if it is
54to be saved.