Commit | Line | Data |
---|---|---|
8bb980a3 C |
1 | GETUSERSHELL(3) BSD Programmer's Manual GETUSERSHELL(3) |
2 | ||
3 | N\bNA\bAM\bME\bE | |
4 | g\bge\bet\btu\bus\bse\ber\brs\bsh\bhe\bel\bll\bl, s\bse\bet\btu\bus\bse\ber\brs\bsh\bhe\bel\bll\bl, e\ben\bnd\bdu\bus\bse\ber\brs\bsh\bhe\bel\bll\bl - get legal user shells | |
5 | ||
6 | S\bSY\bYN\bNO\bOP\bPS\bSI\bIS\bS | |
7 | _\bc_\bh_\ba_\br _\b* | |
8 | g\bge\bet\btu\bus\bse\ber\brs\bsh\bhe\bel\bll\bl(_\bv_\bo_\bi_\bd); | |
9 | ||
10 | _\bv_\bo_\bi_\bd | |
11 | s\bse\bet\btu\bus\bse\ber\brs\bsh\bhe\bel\bll\bl(_\bv_\bo_\bi_\bd); | |
12 | ||
13 | _\bv_\bo_\bi_\bd | |
14 | e\ben\bnd\bdu\bus\bse\ber\brs\bsh\bhe\bel\bll\bl(_\bv_\bo_\bi_\bd); | |
15 | ||
16 | D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN | |
17 | The g\bge\bet\btu\bus\bse\ber\brs\bsh\bhe\bel\bll\bl() function returns a pointer to a legal user shell as | |
18 | defined by the system manager in the file _\b/_\be_\bt_\bc_\b/_\bs_\bh_\be_\bl_\bl_\bs. If _\b/_\be_\bt_\bc_\b/_\bs_\bh_\be_\bl_\bl_\bs is | |
19 | unreadable or does not exist, g\bge\bet\btu\bus\bse\ber\brs\bsh\bhe\bel\bll\bl() behaves as if _\b/_\bb_\bi_\bn_\b/_\bs_\bh and | |
20 | _\b/_\bb_\bi_\bn_\b/_\bc_\bs_\bh were listed in the file. | |
21 | ||
22 | The g\bge\bet\btu\bus\bse\ber\brs\bsh\bhe\bel\bll\bl() function reads the next line (opening the file if nec- | |
23 | essary); s\bse\bet\btu\bus\bse\ber\brs\bsh\bhe\bel\bll\bl() rewinds the file; e\ben\bnd\bdu\bus\bse\ber\brs\bsh\bhe\bel\bll\bl() closes it. | |
24 | ||
25 | F\bFI\bIL\bLE\bES\bS | |
26 | /etc/shells | |
27 | ||
28 | D\bDI\bIA\bAG\bGN\bNO\bOS\bST\bTI\bIC\bCS\bS | |
29 | The routine g\bge\bet\btu\bus\bse\ber\brs\bsh\bhe\bel\bll\bl() returns a null pointer (0) on EOF. | |
30 | ||
31 | S\bSE\bEE\bE A\bAL\bLS\bSO\bO | |
32 | shells(5) | |
33 | ||
34 | H\bHI\bIS\bST\bTO\bOR\bRY\bY | |
35 | The g\bge\bet\btu\bus\bse\ber\brs\bsh\bhe\bel\bll\bl() function appeared in 4.3BSD. | |
36 | ||
37 | B\bBU\bUG\bGS\bS | |
38 | The g\bge\bet\btu\bus\bse\ber\brs\bsh\bhe\bel\bll\bl() function leaves its result in an internal static ob- | |
39 | ject and returns a pointer to that object. Subsequent calls to | |
40 | g\bge\bet\btu\bus\bse\ber\brs\bsh\bhe\bel\bll\bl() will modify the same object. | |
41 | ||
42 | 4.3 Berkeley Distribution June 4, 1993 1 |