Skip to content
Snippets Groups Projects
Commit 4423ab7b authored by Natanael Copa's avatar Natanael Copa
Browse files

abuild-sudo: also look for adduser/group in /usr/sbin

seems like it moved in recent busybox. we need to support both variants
parent 38ab58a5
No related branches found
No related tags found
No related merge requests found
......@@ -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];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment