diff --git a/.gitignore b/.gitignore index 8db4d74d..86575574 100644 --- a/.gitignore +++ b/.gitignore @@ -58,6 +58,7 @@ examples/scpclient/wolfscp # applications apps/wolfsshd/wolfsshd +apps/wolfsshd/test/test_configuration # test output tests/*.test diff --git a/apps/wolfsshd/configuration.c b/apps/wolfsshd/configuration.c index 31178a22..a7c85e4f 100644 --- a/apps/wolfsshd/configuration.c +++ b/apps/wolfsshd/configuration.c @@ -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;