Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WMACRO Update #570

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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