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():
20           _BSD_SOURCE || (_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

ATTRIBUTES

40   Multithreading (see pthreads(7))
41       The getusershell(), setusershell() and endusershell() functions are not
42       thread-safe.
43

CONFORMING TO

45       4.3BSD.
46

SEE ALSO

48       shells(5)
49

COLOPHON

51       This page is part of release 3.53 of the Linux  man-pages  project.   A
52       description  of  the project, and information about reporting bugs, can
53       be found at http://www.kernel.org/doc/man-pages/.
54
55
56
57GNU                               2013-06-21                   GETUSERSHELL(3)
Impressum