[master] f2462d1 Oops, forgot we could be running as non-root there.

Poul-Henning Kamp phk at FreeBSD.org
Fri Dec 20 13:41:19 CET 2013


commit f2462d139f7709bc3b678df0bcf124b8401fed1a
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Fri Dec 20 12:41:07 2013 +0000

    Oops, forgot we could be running as non-root there.

diff --git a/bin/varnishd/mgt/mgt_vcc.c b/bin/varnishd/mgt/mgt_vcc.c
index bc7b4fe..d3e81de 100644
--- a/bin/varnishd/mgt/mgt_vcc.c
+++ b/bin/varnishd/mgt/mgt_vcc.c
@@ -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));
 
 
@@ -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 */



More information about the varnish-commit mailing list