Commit 61c0f889 authored by Marco Mariani's avatar Marco Mariani

patch to run as non-root (skip setuid)

parent b413ff2e
......@@ -19,6 +19,7 @@ DBLIB := -L$(ZIMBRA_HOME)/bdb-$(BDB_VERSION)/lib -ldb
POSTFIX_TGZ_TARGET := \
$(P4_ROOT)/ThirdPartyBuilds/$(BUILD_PLATFORM)/postfix/postfix-$(POSTFIX_VERSION).tgz
BDB_PATCH := patch -g0 -p1 < ../patches/postfix-zimbra-bdb.patch;
NOROOT_PATCH := patch -g0 -p1 < ../patches/noroot.patch;
PCRE_DEF := -DHAS_PCRE
PCRE_INCLUDE := -I$(PCRE_PREFIX)/include
......@@ -48,6 +49,7 @@ build:
(mv postfix-$(POSTFIX_RELEASE) postfix-$(POSTFIX_VERSION); \
cd postfix-$(POSTFIX_VERSION); \
$(BDB_PATCH) \
$(NOROOT_PATCH) \
$(PATCH) \
patch -g0 -p1 < ../patches/postfix-main-cf-zimbra.patch; \
$(MAKE) $(MAKEARGS) makefiles \
......
--- a/src/util/set_ugid.c
+++ b/src/util/set_ugid.c
@@ -44,7 +44,7 @@
void set_ugid(uid_t uid, gid_t gid)
{
- int saved_errno = errno;
+/* int saved_errno = errno;
if (geteuid() != 0)
if (seteuid(0) < 0)
@@ -58,4 +58,4 @@ void set_ugid(uid_t uid, gid_t gid)
if (msg_verbose > 1)
msg_info("setugid: uid %ld gid %ld", (long) uid, (long) gid);
errno = saved_errno;
-}
+*/}
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