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
This commit is contained in:
parent
aa1c1b50fa
commit
69a4638c64
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=127316
2 changed files with 3 additions and 3 deletions
|
@ -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}
|
||||
|
|
|
@ -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() {}
|
||||
|
|
Loading…
Reference in a new issue