NAME
getusershell(), setusershell(), endusershell() — get legal user shells
SYNOPSIS
#include <unistd.h>
char *getusershell(void);
void setusershell(void);
void endusershell(void);
Obsolescent Interfaces
char *getusershell_r(char **shell_datap);
void setusershell_r(char **shell_datap);
void endusershell_r(char **shell_datap);
DESCRIPTION
- getusershell()
Returns a pointer to the first legal user shell
as defined in the file
/etc/shells
(see
shells(4)).
If
/etc/shells
does not exist or is not readable,
getusershell()
returns the following standard system shells:
/sbin/sh
/usr/bin/sh
/usr/bin/rsh
/usr/bin/ksh
/usr/bin/rksh
/usr/bin/csh
/usr/bin/keysh
as if they were contained in
/etc/shells.
The file is left open so that the next call returns the next shell.
A null pointer (0) is returned on
EOF
or error.
- setusershell()
Rewinds the file.
- endusershell()
Closes the file.
Obsolescent Interfaces
getusershell_r(),
setusershell_r(),
endusershell_r()
get legal user shells.
WARNINGS
getusershell_r(),
setusershell_r()
and
endusershell_r()
are obsolescent interfaces supported only for compatibility with
existing DCE applications. New multithreaded applications should use
getusershell(),
setusershell()
and
endusershell().
AUTHOR
getusershell()
was developed by HP and the University of California, Berkeley.