getusershell, setusershell, endusershell - get permitted user shells
#include <unistd.h> char *getusershell(void); void setusershell(void); void endusershell(void);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
The getusershell() function returns the next line
from the file
/etc/shells, opening the file if necessary. The
line should contain the pathname of a valid user shell. If
/etc/shells does not exist or is unreadable,
getusershell() behaves as if
/bin/csh were listed in the file.
The setusershell() function rewinds
The endusershell() function closes
The getusershell() function returns NULL on end-of-file.
This page is part of release 5.10 of the Linux
project. A description of the project, information about reporting bugs,
and the latest version of this page, can be found at