diff options
Diffstat (limited to 'abuild-sudo.c')
-rw-r--r-- | abuild-sudo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/abuild-sudo.c b/abuild-sudo.c index 08477dc..3ba48e7 100644 --- a/abuild-sudo.c +++ b/abuild-sudo.c @@ -14,7 +14,9 @@ static const char* valid_cmds[] = { "/bin/adduser", + "/usr/sbin/adduser", "/bin/addgroup", + "/usr/sbin/addgroup", "/sbin/apk", NULL }; @@ -24,6 +26,8 @@ const char *get_command_path(const char *cmd) const char *p; int i; for (i = 0; valid_cmds[i] != NULL; i++) { + if (access(valid_cmds[i], F_OK) == -1) + continue; p = strrchr(valid_cmds[i], '/') + 1; if (strcmp(p, cmd) == 0) return valid_cmds[i]; |