usr/src/lib/libc/port/gen/getusershell.c
changeset 4887 feebf9260c2e
parent 2037 132880d31aba
child 6812 febeba71273d
equal deleted inserted replaced
4886:bf56b7d88729 4887:feebf9260c2e
     1 /*
     1 /*
     2  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
     2  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
     3  * Use is subject to license terms.
     3  * Use is subject to license terms.
     4  */
     4  */
     5 
     5 
     6 #pragma ident	"%Z%%M%	%I%	%E% SMI"
     6 #pragma ident	"%Z%%M%	%I%	%E% SMI"
     7 
     7 
    29 
    29 
    30 #define	SHELLS "/etc/shells"
    30 #define	SHELLS "/etc/shells"
    31 
    31 
    32 /*
    32 /*
    33  * Do not add local shells here.  They should be added in /etc/shells
    33  * Do not add local shells here.  They should be added in /etc/shells
       
    34  *
       
    35  * Do not add restricted shells:
       
    36  * Shells returned by getusershell traditionally allow:
       
    37  * - users to change away from (i.e., if you have an rksh in
       
    38  *   getusershell(), then users can change their shell to ksh)
       
    39  * - by default, ftp in is allowed only for shells returned by
       
    40  *   getusershell(); since FTP has no restrictions on directory
       
    41  *   movement, adding rksh to getusershell() would defeat that
       
    42  *   protection.
    34  */
    43  */
    35 const char *okshells[] = {
    44 const char *okshells[] = {
    36 	"/usr/bin/sh",
    45 	"/usr/bin/sh",
    37 	"/usr/bin/csh",
    46 	"/usr/bin/csh",
    38 	"/usr/bin/ksh",
    47 	"/usr/bin/ksh",
       
    48 	"/usr/bin/ksh93",
    39 	"/usr/bin/jsh",
    49 	"/usr/bin/jsh",
    40 	"/bin/sh",
    50 	"/bin/sh",
    41 	"/bin/csh",
    51 	"/bin/csh",
    42 	"/bin/ksh",
    52 	"/bin/ksh",
       
    53 	"/bin/ksh93",
    43 	"/bin/jsh",
    54 	"/bin/jsh",
    44 	"/sbin/sh",
    55 	"/sbin/sh",
    45 	"/sbin/jsh",
    56 	"/sbin/jsh",
    46 	"/usr/bin/pfsh",
    57 	"/usr/bin/pfsh",
    47 	"/usr/bin/pfcsh",
    58 	"/usr/bin/pfcsh",