commit - 4384702894b5e91328b08b6e0487f3d92bd00c5c
commit + 9928b132651fc6bff74254404777ec2dfcd4f9c8
blob - 03cfa9264e97a034a49d4be7da221944cb1eda34
blob + ed5bbd87051a58c687b26b3585c2a1e3714d65f3
--- gotd/auth.c
+++ gotd/auth.c
int ngroups = NGROUPS_MAX;
pw = getpwuid(euid);
- if (pw == NULL)
- return got_error_from_errno("getpwuid");
+ if (pw == NULL) {
+ if (errno)
+ return got_error_from_errno("getpwuid");
+ else
+ return got_error_set_errno(EACCES, repo_name);
+ }
if (getgrouplist(pw->pw_name, pw->pw_gid, groups, &ngroups) == -1)
log_warnx("group membership list truncated");