1GETUSERSHELL(3)            Linux Programmer's Manual           GETUSERSHELL(3)
2
3
4

NAME

6       getusershell, setusershell, endusershell - get permitted user shells
7

SYNOPSIS

9       #include <unistd.h>
10
11       char *getusershell(void);
12
13       void setusershell(void);
14
15       void endusershell(void);
16
17   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
18
19       getusershell(), setusershell(), endusershell(): _BSD_SOURCE ||
20       (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
21

DESCRIPTION

23       The getusershell()  function  returns  the  next  line  from  the  file
24       /etc/shells,  opening  the  file if necessary.  The line should contain
25       the pathname of a valid user shell.  If /etc/shells does not  exist  or
26       is  unreadable, getusershell() behaves as if  /bin/sh and /bin/csh were
27       listed in the file.
28
29       The setusershell() function rewinds /etc/shells.
30
31       The endusershell() function closes /etc/shells.
32

RETURN VALUE

34       The getusershell() function returns a NULL pointer on end-of-file.
35

FILES

37       /etc/shells
38

CONFORMING TO

40       4.3BSD.
41

SEE ALSO

43       shells(5)
44

COLOPHON

46       This page is part of release 3.22 of the Linux  man-pages  project.   A
47       description  of  the project, and information about reporting bugs, can
48       be found at http://www.kernel.org/doc/man-pages/.
49
50
51
52GNU                               2007-07-26                   GETUSERSHELL(3)
Impressum