2 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\" References consulted:
7 .\" Linux libc source code
8 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
10 .\" Modified Sat Jul 24 19:17:53 1993 by Rik Faith (faith@cs.unc.edu)
11 .TH getusershell 3 (date) "Linux man-pages (unreleased)"
13 getusershell, setusershell, endusershell \- get permitted user shells
16 .RI ( libc ", " \-lc )
19 .B #include <unistd.h>
21 .B char *getusershell(void);
22 .B void setusershell(void);
23 .B void endusershell(void);
27 Feature Test Macro Requirements for glibc (see
28 .BR feature_test_macros (7)):
36 .\" commit 266865c0e7b79d4196e2cc393693463f03c90bd8
38 In glibc 2.19 and 2.20:
39 _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
40 Up to and including glibc 2.19:
41 _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
46 function returns the next line from the file
48 opening the file if necessary.
49 The line should contain
50 the pathname of a valid user shell.
60 were listed in the file.
74 function returns NULL on end-of-file.
78 For an explanation of the terms used in this section, see
84 Interface Attribute Value
91 T} Thread safety MT-Unsafe