Skip to content

Commit

Permalink
Merge pull request #570 from ejohnstown/wmacros
Browse files Browse the repository at this point in the history
WMACRO Update
  • Loading branch information
JacobBarthelmeh authored Sep 1, 2023
2 parents 0126528 + 491f3dc commit 03ec8fb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions apps/wolfsshd/auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ static int SearchForPubKey(const char* path, const WS_UserAuthData_PublicKey* pu
}

if (ret == WSSHD_AUTH_SUCCESS) {
if (WFOPEN(&f, authKeysPath, "rb") != 0) {
if (WFOPEN(NULL, &f, authKeysPath, "rb") != 0) {
wolfSSH_Log(WS_LOG_ERROR, "[SSHD] Unable to open %s",
authKeysPath);
ret = WS_BAD_FILE_E;
Expand Down Expand Up @@ -554,7 +554,7 @@ static int SearchForPubKey(const char* path, const WS_UserAuthData_PublicKey* pu
}

if (f != WBADFILE) {
WFCLOSE(f);
WFCLOSE(NULL, f);
}

if (ret == WSSHD_AUTH_SUCCESS && !foundKey) {
Expand Down
10 changes: 5 additions & 5 deletions apps/wolfsshd/configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ int wolfSSHD_ConfigLoad(WOLFSSHD_CONFIG* conf, const char* filename)
if (conf == NULL || filename == NULL)
return BAD_FUNC_ARG;

if (WFOPEN(&f, filename, "rb") != 0) {
if (WFOPEN(NULL, &f, filename, "rb") != 0) {
wolfSSH_Log(WS_LOG_ERROR, "Unable to open SSHD config file %s",
filename);
return BAD_FUNC_ARG;
Expand Down Expand Up @@ -1146,7 +1146,7 @@ int wolfSSHD_ConfigLoad(WOLFSSHD_CONFIG* conf, const char* filename)
break;
}
}
WFCLOSE(f);
WFCLOSE(NULL, f);

SetAuthKeysPattern(conf->authKeysFile);

Expand Down Expand Up @@ -1450,10 +1450,10 @@ void wolfSSHD_ConfigSavePID(const WOLFSSHD_CONFIG* conf)
char buf[12]; /* large enough to hold 'int' type with null terminator */

WMEMSET(buf, 0, sizeof(buf));
if (WFOPEN(&f, conf->pidFile, "wb") == 0) {
if (WFOPEN(NULL, &f, conf->pidFile, "wb") == 0) {
WSNPRINTF(buf, sizeof(buf), "%d", getpid());
WFWRITE(buf, 1, WSTRLEN(buf), f);
WFCLOSE(f);
WFWRITE(NULL, buf, 1, WSTRLEN(buf), f);
WFCLOSE(NULL, f);
}
}

Expand Down
2 changes: 1 addition & 1 deletion apps/wolfsshd/wolfsshd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1949,7 +1949,7 @@ static int StartSSHD(int argc, char** argv)
break;

case 'E':
ret = WFOPEN(&logFile, myoptarg, "ab");
ret = WFOPEN(NULL, &logFile, myoptarg, "ab");
if (ret != 0 || logFile == WBADFILE) {
fprintf(stderr, "Unable to open log file %s\n", myoptarg);
ret = WS_FATAL_ERROR;
Expand Down
2 changes: 1 addition & 1 deletion src/wolfscp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2095,7 +2095,7 @@ int wsScpRecvCallback(WOLFSSH* ssh, int state, const char* basePath,
return ret;
}

static int _GetFileSize(WFILE* fp, word32* fileSz)
static int _GetFileSize(void* fs, WFILE* fp, word32* fileSz)
{
WOLFSSH_UNUSED(fs);

Expand Down

0 comments on commit 03ec8fb

Please sign in to comment.