}
$out_shells[] = chop($s);
}
+ // in most cases, we do need to add the default shell in case it wouldn't be in the ../etc/shells already (no regression)
if ($add_user_default_shell) {
$user_default_shell = account_get_user_default_shell();
if (! file_exists($user_default_shell) ) {
if (!function_exists("pg_pconnect")) {
$result[] = 'ERROR: Missing Postgresql support in PHP, please install/compile php-pg.';
}
+ // verify the compatibility between the user_default_shell ini var and the contents of .../etc/shells
$user_default_shell = forge_get_config('user_default_shell');
- $shells = account_getavailableshells();
+ // pass FALSE to make sure the var contents isn't added to the list
+ $shells = account_getavailableshells(FALSE);
if (!in_array($user_default_shell, $shells)) {
$result[] = 'WARNING: default user shell "'. $user_default_shell .'" not in allowed shells (check ini var "user_default_shell" and contents of '. forge_get_config('chroot') .'/etc/shells or /etc/shells).';
}