| 1 | .\" Copyright (c) 1985 The Regents of the University of California. |
| 2 | .\" All rights reserved. |
| 3 | .\" |
| 4 | .\" Redistribution and use in source and binary forms are permitted |
| 5 | .\" provided that the above copyright notice and this paragraph are |
| 6 | .\" duplicated in all such forms and that any documentation, |
| 7 | .\" advertising materials, and other materials related to such |
| 8 | .\" distribution and use acknowledge that the software was developed |
| 9 | .\" by the University of California, Berkeley. The name of the |
| 10 | .\" University may not be used to endorse or promote products derived |
| 11 | .\" from this software without specific prior written permission. |
| 12 | .\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR |
| 13 | .\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED |
| 14 | .\" WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
| 15 | .\" |
| 16 | .\" @(#)getusershell.3 6.3 (Berkeley) %G% |
| 17 | .\" |
| 18 | .TH GETUSERSHELL 3 "" |
| 19 | .UC 6 |
| 20 | .SH NAME |
| 21 | getusershell, setusershell, endusershell \- get legal user shells |
| 22 | .SH SYNOPSIS |
| 23 | .nf |
| 24 | .B char *getusershell() |
| 25 | .PP |
| 26 | .B setusershell() |
| 27 | .PP |
| 28 | .B endusershell() |
| 29 | .fi |
| 30 | .SH DESCRIPTION |
| 31 | .I Getusershell |
| 32 | returns a pointer to a legal user shell as defined by the |
| 33 | system manager in the file |
| 34 | .IR /etc/shells . |
| 35 | If |
| 36 | .I /etc/shells |
| 37 | is unreadable or does not exist, |
| 38 | .I getusershell |
| 39 | behaves as if |
| 40 | .I /bin/sh |
| 41 | and |
| 42 | .I /bin/csh |
| 43 | were listed in the file. |
| 44 | .PP |
| 45 | .I Getusershell |
| 46 | reads the next |
| 47 | line (opening the file if necessary); |
| 48 | .I setusershell |
| 49 | rewinds the file; |
| 50 | .I endusershell |
| 51 | closes it. |
| 52 | .SH FILES |
| 53 | /etc/shells |
| 54 | .SH "SEE ALSO" |
| 55 | shells(5) |
| 56 | .SH DIAGNOSTICS |
| 57 | The routine |
| 58 | .I getusershell |
| 59 | returns a null pointer (0) on EOF. |
| 60 | .SH BUGS |
| 61 | All information |
| 62 | is contained in a static area |
| 63 | so it must be copied if it is |
| 64 | to be saved. |