From 69a4638c64e5280f5b5ca34123a815493ae65635 Mon Sep 17 00:00:00 2001
From: Jacques Vidrine <nectar@FreeBSD.org>
Date: Tue, 25 Jan 2005 14:54:41 +0000
Subject: Oops, we want to twiddle the effective-user-ID, not the real-user-ID,
 since we need to recover credentials.  Relative to the previous commit,
 s/setuid/seteuid/g.

Reminded by:	a hot shower
---
 chinese/zhcon/Makefile                        | 2 +-
 chinese/zhcon/files/patch-src::configfile.cpp | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

(limited to 'chinese/zhcon')

diff --git a/chinese/zhcon/Makefile b/chinese/zhcon/Makefile
index c0e6d4306002..af9ac87a3716 100644
--- a/chinese/zhcon/Makefile
+++ b/chinese/zhcon/Makefile
@@ -7,7 +7,7 @@
 
 PORTNAME=	zhcon
 PORTVERSION=	0.2.3
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	chinese
 MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
 MASTER_SITE_SUBDIR=	${PORTNAME}
diff --git a/chinese/zhcon/files/patch-src::configfile.cpp b/chinese/zhcon/files/patch-src::configfile.cpp
index 158501602803..1955508f56ee 100644
--- a/chinese/zhcon/files/patch-src::configfile.cpp
+++ b/chinese/zhcon/files/patch-src::configfile.cpp
@@ -10,12 +10,12 @@
  
  ConfigFile::ConfigFile(const char *fn) {
 +    uid_t euid = geteuid();
-+    setuid(getuid());
++    seteuid(getuid());
      ifstream in(fn);
      if (!in)
          throw runtime_error("Could not open config file!");
      ParseFile(in);
-+    setuid(euid);
++    seteuid(euid);
  }
  
  ConfigFile::~ConfigFile() {}
-- 
cgit v1.2.3