NAME
	  getusershell,	getusershell_r,	setusershell, endusershell -
	  Gets names of	legal user shells

     LIBRARY
	  Standard C Library (libc.a)

     SYNOPSIS
	  char *getusershell( void );

	  int getusershell_r(
	       char *shell) ;

	  int setusershell( void );

	  int endusershell( void );


     PARAMETERS
	  shell	    Selected shell.


     DESCRIPTION
	  The getusershell() function returns a	pointer	to a string
	  that contains	the name of a legal user shell as defined by
	  the system manager in	the /etc/shells	file. If the
	  /etc/shells file does	not exist, the standard	system shells
	  are returned.

	  On subsequent	calls, the getusershell() function returns the
	  next shell.  The endusershell() function resets the list so
	  that subsequent calls	of getusershell() rereads the list
	  from /etc/shells.  The setusershell()	function rereads the
	  list from /etc/shells	and subsequent calls of	getusershell()
	  start	from the beginning.

	  The getusershell_r() function	is the reentrant version of
	  the getusershell() function.	Upon successful	completion,
	  the pointer is stored	in shell.

     NOTES
	  For the getusershell(), setusershell(), and endusershell()
	  functions, the returned information is in a static area.  It
	  must be copied if it is to be	saved.

     RETURN VALUES
	  Upon successful completion for the getusershell(), setuser-
	  shell(), and endusershell() functions, a pointer to a	char-
	  acter	string is returned.  A null pointer is returned	on EOF
	  (End-of-File)	or error.

	  The getusershell_r() function	returns	0 (zero) for success
	  and a	-1 for failure.

     ERRORS
	  Upon an error	in the getusershell_r()	function, errno	may be
	  set to one of	the following values:

	  [EINVAL]  shell is an	invalid	shell pointer (such as NULL).

	  [ESRCH]   shell is at	the end	of the shell list.


     FILES
	  /etc/shells
		    Contains the names of legal	user shells.






































Acknowledgement and Disclaimer