Commit | Line | Data |
---|---|---|
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 | |
11 | getusershell, 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 | |
22 | returns a pointer to a legal user shell as defined by the | |
23 | system manager in the file | |
24 | .IR /etc/shells . | |
25 | If | |
26 | .I /etc/shells | |
fe953ca4 KB |
27 | is unreadable or does not exist, |
28 | .I getusershell | |
29 | behaves as if | |
778f0f70 KM |
30 | .I /bin/sh |
31 | and | |
32 | .I /bin/csh | |
fe953ca4 | 33 | were listed in the file. |
778f0f70 KM |
34 | .PP |
35 | .I Getusershell | |
36 | reads the next | |
37 | line (opening the file if necessary); | |
38 | .I setusershell | |
39 | rewinds the file; | |
40 | .I endusershell | |
41 | closes it. | |
42 | .SH FILES | |
43 | /etc/shells | |
fe953ca4 KB |
44 | .SH "SEE ALSO" |
45 | shells(5) | |
778f0f70 KM |
46 | .SH DIAGNOSTICS |
47 | The routine | |
48 | .I getusershell | |
fe953ca4 | 49 | returns a null pointer (0) on EOF. |
778f0f70 KM |
50 | .SH BUGS |
51 | All information | |
52 | is contained in a static area | |
53 | so it must be copied if it is | |
54 | to be saved. |