[icebreaker] 06/22: 1.21-8
Andreas Gnau
rondom-guest at moszumanska.debian.org
Sat Sep 9 09:06:46 UTC 2017
This is an automated email from the git hooks/post-receive script.
rondom-guest pushed a commit to branch master
in repository icebreaker.
commit 4cc12c020fdb4a12d8773fb40d2778b2af1fdb11
Author: LaMont Jones <lamont at debian.org>
Date: Wed Sep 12 09:07:39 2007 -0600
1.21-8
---
debian/changelog | 6 ++++++
options.c | 13 +++++++++++++
2 files changed, 19 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 2f9c3e7..90c5925 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+icebreaker (1.21-8) unstable; urgency=low
+
+ * Fix options writing code. Closes: #174679
+
+ -- LaMont Jones <lamont at debian.org> Mon, 19 May 2003 20:15:14 -0600
+
icebreaker (1.21-7) unstable; urgency=low
* remove unnecessary diffs from upstream.
diff --git a/options.c b/options.c
index 89f931c..331267b 100644
--- a/options.c
+++ b/options.c
@@ -25,6 +25,8 @@
#include <stdio.h>
#include <string.h>
#include <ctype.h>
+#include <unistd.h>
+#include <sys/types.h>
#include "icebreaker.h"
#include "globals.h"
#include "icebreaker.h"
@@ -51,11 +53,14 @@ int readoptions(void)
char optbuf[20];
char valbuf[10];
int i;
+ uid_t gid=getegid(), uid=geteuid();
setdefaultoptions();
snprintf(filename,255,"%s/%s",homedir,OPTIONFILE);
+ seteuid(getuid());
+ setegid(getgid());
optionfile=fopen(filename,"r");
if (optionfile==NULL)
{
@@ -110,6 +115,8 @@ int readoptions(void)
}
fclose(optionfile);
+ setegid(gid);
+ seteuid(uid);
return false;
}
@@ -118,8 +125,12 @@ int writeoptions(void)
{
FILE * optionfile;
char filename[255];
+ uid_t gid=getegid(), uid=geteuid();
+
snprintf(filename,255,"%s/%s",homedir,OPTIONFILE);
+ seteuid(getuid());
+ setegid(getgid());
optionfile=fopen(filename,"w");
if (optionfile==NULL)
{
@@ -168,6 +179,8 @@ int writeoptions(void)
fclose(optionfile);
+ setegid(gid);
+ seteuid(uid);
return false;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/icebreaker.git
More information about the Pkg-games-commits
mailing list