Wildcard Config

1. Fix the wildcard config file include.
2. Update the guard flags so macOS can also use wildcards.
3. Change the user priviledge separating setting to a bitfield.
4. Add test_configuration test to gitignore.
pull/445/head
John Safranek 2022-08-25 10:58:10 -07:00
parent d42230d629
commit 85069b816e
No known key found for this signature in database
GPG Key ID: 8CE817DE0D3CCB4A
2 changed files with 5 additions and 3 deletions

1
.gitignore vendored
View File

@ -58,6 +58,7 @@ examples/scpclient/wolfscp
# applications
apps/wolfsshd/wolfsshd
apps/wolfsshd/test/test_configuration
# test output
tests/*.test

View File

@ -59,7 +59,7 @@ struct WOLFSSHD_CONFIG {
char* authKeysFile;
long loginTimer;
word16 port;
byte usePrivilegeSeparation;
byte usePrivilegeSeparation:2;
byte passwordAuth:1;
byte pubKeyAuth:1;
byte permitRootLogin:1;
@ -445,7 +445,7 @@ static int HandleInclude(WOLFSSHD_CONFIG *conf, const char *value)
/* Ignore trailing whitespace */
ptr = value + WSTRLEN(value) - 1;
while (ptr != value) {
if (!WISSPACE(*ptr)) {
if (WISSPACE(*ptr)) {
ptr--;
}
else {
@ -474,7 +474,8 @@ static int HandleInclude(WOLFSSHD_CONFIG *conf, const char *value)
/* Use wildcard */
if (found) {
#ifdef __unix__
#if defined(__unix__) || defined(__unix) || \
(defined(__APPLE__) && defined(__MACH__))
int ret;
struct dirent *dir;
DIR *d;