Skip to content

Commit

Permalink
Oops, forgot we could be running as non-root there.
Browse files Browse the repository at this point in the history
  • Loading branch information
bsdphk committed Dec 20, 2013
1 parent a04892d commit f2462d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/varnishd/mgt/mgt_vcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ mgt_run_cc(const char *vcl, struct vsb *sb, int C_flag)
VSB_printf(sb, "Failed to create %s: %s", sf, strerror(errno));
return (NULL);
}
AZ(fchown(sfd, mgt_param.uid, mgt_param.gid));
(void)fchown(sfd, mgt_param.uid, mgt_param.gid);
AZ(close(sfd));


Expand Down Expand Up @@ -279,7 +279,7 @@ mgt_run_cc(const char *vcl, struct vsb *sb, int C_flag)
(void)unlink(sf);
return (NULL);
}
AZ(fchown(i, mgt_param.uid, mgt_param.gid));
(void)fchown(i, mgt_param.uid, mgt_param.gid);
AZ(close(i));

/* Build the C-compiler command line */
Expand Down

0 comments on commit f2462d1

Please sign in to comment.