Seth Woolley's Man Viewer

getusershell(3) - endusershell, getusershell, setusershell, endusershell, getusershell, setusershell - get legal user shells - man 3 getusershell

([section] manual, -k keyword, -K [section] search, -f whatis)
man plain no title

GETUSERSHELL(3)            Linux Programmer's Manual           GETUSERSHELL(3)



NAME
       getusershell, setusershell, endusershell - get legal user shells

SYNOPSIS
       #include <unistd.h>

       char *getusershell(void);

       void setusershell(void);

       void endusershell(void);

DESCRIPTION
       The  getusershell()  function  returns  the  next  line  from  the file(1,n)
       /etc/shells, opening the file(1,n) if(3,n) necessary.  The  line  should  contain
       the  pathname  of a valid user shell.  If /etc/shells does not exist or
       is unreadable, getusershell() behaves as if(3,n)  /bin/sh and /bin/csh  were
       listed in(1,8) the file.

       The setusershell() function rewinds /etc/shells.

       The endusershell() function closes /etc/shells.

RETURN VALUE
       The getusershell() function returns a NULL pointer on end-of-file.

FILES
       /etc/shells

CONFORMING TO
       BSD 4.3

SEE ALSO
       shells(5)



BSD                               1993-07-04                   GETUSERSHELL(3)

References for this manual (incoming links)