Commit bd5636c9 authored by Natanael Copa's avatar Natanael Copa

abuild-sudo: error check getlogin()

parent 5487632f
......@@ -75,8 +75,9 @@ int main(int argc, const char *argv[])
errx(1, "%s: Group not found", ABUILD_GROUP);
if (!is_in_group(grent->gr_gid)) {
char *name = getlogin();
errx(1, "User %s is not a member of group %s\n",
getlogin(), ABUILD_GROUP);
name ? name : "(unknown)", ABUILD_GROUP);
}
cmd = strrchr(argv[0], '-');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment