Commit | Line | Data |
---|---|---|
778f0f70 KM |
1 | .\" Copyright (c) 1985 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
5 | .\" @(#)getusershell.3 6.1 (Berkeley) %G% | |
6 | .\" | |
7 | .TH GETUSERSHELL 3 "" | |
8 | .UC 6 | |
9 | .SH NAME | |
10 | getusershell, setusershell, endusershell \- get legal user shells | |
11 | .SH SYNOPSIS | |
12 | .nf | |
13 | .B char *getusershell() | |
14 | .PP | |
15 | .B setusershell() | |
16 | .PP | |
17 | .B endusershell() | |
18 | .fi | |
19 | .SH DESCRIPTION | |
20 | .I Getusershell | |
21 | returns a pointer to a legal user shell as defined by the | |
22 | system manager in the file | |
23 | .IR /etc/shells . | |
24 | If | |
25 | .I /etc/shells | |
26 | does not exist, the two standard system shells | |
27 | .I /bin/sh | |
28 | and | |
29 | .I /bin/csh | |
30 | are returned. | |
31 | .PP | |
32 | .I Getusershell | |
33 | reads the next | |
34 | line (opening the file if necessary); | |
35 | .I setusershell | |
36 | rewinds the file; | |
37 | .I endusershell | |
38 | closes it. | |
39 | .SH FILES | |
40 | /etc/shells | |
41 | .SH DIAGNOSTICS | |
42 | The routine | |
43 | .I getusershell | |
44 | returns a null pointer (0) on EOF or error. | |
45 | .SH BUGS | |
46 | All information | |
47 | is contained in a static area | |
48 | so it must be copied if it is | |
49 | to be saved. |