"/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:
parent
9afa8bc573
commit
d1dc42cc73
@ -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++];
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user