Fix compiler errors for PPC32

pull/435/head
Andrew Hutchings 2022-07-29 13:33:12 +01:00
parent b6924ff604
commit afdc1f4c67
1 changed files with 9 additions and 2 deletions

View File

@ -395,11 +395,18 @@ static int SHELL_Subsystem(WOLFSSHD_CONNECTION* conn, WOLFSSH* ssh)
/* Child process */
const char *args[] = {"-sh", NULL};
char cmd[80];
int ret;
signal(SIGINT, SIG_DFL);
setgid(p_passwd->pw_gid);
setuid(p_passwd->pw_uid);
ret = setgid(p_passwd->pw_gid);
if (ret) {
printf("Error executing setgid\n");
}
ret = setuid(p_passwd->pw_uid);
if (ret) {
printf("Error executing setuid\n");
}
if (system("env") != 0) {
printf("0 return value from system call\n");
}