67 lines
1.4 KiB
Groff
67 lines
1.4 KiB
Groff
.\" @(#)getusershell.3 1.1 94/10/31 SMI; from UCB 4.3 BSD
|
|
.\" Copyright (c) 1985 Regents of the University of California.
|
|
.\" All rights reserved. The Berkeley software License Agreement
|
|
.\" specifies the terms and conditions for redistribution.
|
|
.\"
|
|
.TH GETUSERSHELL 3 "6 October 1987"
|
|
.SH NAME
|
|
getusershell, setusershell, endusershell \- get legal user shells
|
|
.SH SYNOPSIS
|
|
.nf
|
|
.B char *getusershell(\|)
|
|
.LP
|
|
.B setusershell(\|)
|
|
.LP
|
|
.B endusershell(\|)
|
|
.fi
|
|
.SH DESCRIPTION
|
|
.IX "getusershell()" "" "\fLgetusershell()\fP \(em get legal user shells"
|
|
.IX "setusershell()" "" "\fLsetusershell()\fP \(em function"
|
|
.IX "endusershell()" "" "\fLendusershell()\fP \(em function"
|
|
.LP
|
|
.B getusershell(\|)
|
|
returns a pointer to a legal user shell as defined by the
|
|
system manager in the file
|
|
.BR /etc/shells .
|
|
If
|
|
.B /etc/shells
|
|
does not exist, the four locations of the two standard system shells
|
|
.BR /bin/sh ,
|
|
.BR /bin/csh ,
|
|
.B /usr/bin/sh
|
|
and
|
|
.B /usr/bin/csh
|
|
are returned.
|
|
.LP
|
|
.B getusershell(\|)
|
|
reads the next
|
|
line (opening the file if necessary);
|
|
.B setusershell(\|)
|
|
rewinds the file;
|
|
.B endusershell(\|)
|
|
closes it.
|
|
.SH FILES
|
|
.PD 0
|
|
.TP 20
|
|
.B /etc/shells
|
|
.TP
|
|
.B /bin/sh
|
|
.TP
|
|
.B /bin/csh
|
|
.TP
|
|
.B /usr/bin/sh
|
|
.TP
|
|
.B /usr/bin/csh
|
|
.PD
|
|
.SH DIAGNOSTICS
|
|
The routine
|
|
.B getusershell(\|)
|
|
returns a
|
|
.SM NULL
|
|
pointer (0) on
|
|
.SM EOF
|
|
or error.
|
|
.SH BUGS
|
|
All information is contained in a static area
|
|
so it must be copied if it is to be saved.
|