"/bin/bash" is a valid shell, too. ftpd doesn't allow anyone to login,

who has a shell not returned by getusershell().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25128 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2008-04-24 16:07:02 +00:00
parent 9afa8bc573
commit d1dc42cc73

View File

@ -9,17 +9,21 @@
#include <unistd.h>
static const char* const kShells[] = {
"/bin/sh",
"/bin/bash",
NULL
};
static int sShellIndex;
char *
getusershell(void)
{
if (sShellIndex++ == 0)
return "/bin/sh";
if (kShells[sShellIndex] == NULL)
return NULL;
return NULL;
return (char*)kShells[sShellIndex++];
}