From 2e4d69e5ea48535ec6669d644abb36b4fb20452c Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Fri, 29 Jul 2022 13:34:47 +0100 Subject: [PATCH] Missed one function in PPC32 fix --- apps/wolfsshd/wolfsshd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/wolfsshd/wolfsshd.c b/apps/wolfsshd/wolfsshd.c index d94e61e3..b2f31387 100644 --- a/apps/wolfsshd/wolfsshd.c +++ b/apps/wolfsshd/wolfsshd.c @@ -418,7 +418,11 @@ static int SHELL_Subsystem(WOLFSSHD_CONNECTION* conn, WOLFSSH* ssh) WMEMSET(cmd, 0, sizeof(cmd)); XSNPRINTF(cmd, sizeof(cmd), "su %s", userName); printf("executing command [%s]\n", cmd); - system(cmd); + errno = 0; + ret = system(cmd); + if (ret && errno) { + printf("error executing command\n"); + } rc = chdir(p_passwd->pw_dir); if (rc != 0) { return WS_FATAL_ERROR;