[master] 545290b81 Use UID_MAX instead of -1
Poul-Henning Kamp
phk at FreeBSD.org
Wed Sep 5 07:29:09 UTC 2018
commit 545290b81f38ad1282eb0c7f7c2034cd4d4c645b
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Sep 5 07:25:30 2018 +0000
Use UID_MAX instead of -1
diff --git a/bin/varnishd/mgt/mgt_jail_unix.c b/bin/varnishd/mgt/mgt_jail_unix.c
index f91cf24b9..a173726f0 100644
--- a/bin/varnishd/mgt/mgt_jail_unix.c
+++ b/bin/varnishd/mgt/mgt_jail_unix.c
@@ -39,6 +39,7 @@
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
+#include <sys/limits.h>
#include "mgt/mgt.h"
#include "common/heritage.h"
@@ -280,7 +281,7 @@ vju_make_workdir(const char *dname, const char *what, struct vsb *vsb)
dname, strerror(errno));
return (1);
}
- AZ(chown(dname, -1, vju_gid));
+ AZ(chown(dname, UID_MAX, vju_gid));
AZ(seteuid(vju_uid));
return (0);
}
More information about the varnish-commit
mailing list