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