1getusershell(3C)         Standard C Library Functions         getusershell(3C)
2
3
4

NAME

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

SYNOPSIS

9       #include <unistd.h>
10
11       char *getusershell(void);
12
13
14       void setusershell(void);
15
16
17       void endusershell(void);
18
19

DESCRIPTION

21       The  getusershell() function returns a pointer to a legal user shell as
22       defined by the system manager in the file /etc/shells.  If  /etc/shells
23       does  not  exist, the following locations of the standard system shells
24       are used in its place:
25
26         /bin/bash                  /bin/csh
27         /bin/jsh                   /bin/ksh
28         /bin/ksh93                 /bin/pfcsh
29         /bin/pfksh                 /bin/pfsh
30         /bin/sh                    /bin/tcsh
31         /bin/zsh                   /sbin/jsh
32         /sbin/pfsh                 /sbin/sh
33         /usr/bin/bash              /usr/bin/csh
34         /usr/bin/jsh               /usr/bin/ksh
35         /usr/bin/ksh93             /usr/bin/pfcsh
36         /usr/bin/pfksh             /usr/bin/pfsh
37         /usr/bin/sh                /usr/bin/tcsh
38         /usr/bin/zsh               /usr/sfw/bin/zsh
39         /usr/xpg4/bin/sh
40
41
42
43       The getusershell() function opens the file /etc/shells, if  it  exists,
44       and returns the next entry in the list of shells.
45
46
47       The setusershell() function rewinds the file or the list.
48
49
50       The  endusershell()  function closes the file, frees any memory used by
51       getusershell() and setusershell(), and rewinds the file /etc/shells.
52

RETURN VALUES

54       The getusershell() function returns a null pointer on EOF.
55

BUGS

57       All information is contained in memory that may be freed with a call to
58       endusershell(), so it must be copied if it is to be saved.
59

NOTES

61       Restricted shells should not be listed in /etc/shells.
62
63
64
65SunOS 5.11                        1 Nov 2007                  getusershell(3C)
Impressum