rpms/ularn/FC-4 ularn-drop-setgid.patch,1.1,1.2 ularn.spec,1.2,1.3

Michael Thomas (wart) fedora-extras-commits at redhat.com
Sun Apr 16 04:54:48 UTC 2006


Author: wart

Update of /cvs/extras/rpms/ularn/FC-4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25123/FC-4

Modified Files:
	ularn-drop-setgid.patch ularn.spec 
Log Message:
Update setgid patch to prevent closing the scoreboard file after writing it.  This file might get written multiple times during the game.



ularn-drop-setgid.patch:

Index: ularn-drop-setgid.patch
===================================================================
RCS file: /cvs/extras/rpms/ularn/FC-4/ularn-drop-setgid.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ularn-drop-setgid.patch	17 Mar 2006 18:12:24 -0000	1.1
+++ ularn-drop-setgid.patch	16 Apr 2006 04:54:48 -0000	1.2
@@ -1,6 +1,6 @@
 diff -Naur Ularn/data.c Ularn.new/data.c
---- Ularn/data.c	2006-03-16 13:40:53.000000000 -0800
-+++ Ularn.new/data.c	2006-03-16 13:39:41.000000000 -0800
+--- Ularn/data.c	2006-04-15 20:53:51.000000000 -0700
++++ Ularn.new/data.c	2006-04-15 20:52:46.000000000 -0700
 @@ -5,6 +5,7 @@
  
  char *libdir = LIBDIR;
@@ -10,8 +10,8 @@
  /* the game save filename   */
  char savefilename[MAXPATHLEN];
 diff -Naur Ularn/extern.h Ularn.new/extern.h
---- Ularn/extern.h	2006-03-16 13:40:53.000000000 -0800
-+++ Ularn.new/extern.h	2006-03-16 13:42:26.000000000 -0800
+--- Ularn/extern.h	2006-04-15 20:53:51.000000000 -0700
++++ Ularn.new/extern.h	2006-04-15 20:52:47.000000000 -0700
 @@ -713,6 +713,7 @@
  	/************** extern decls for all data items **********/
  
@@ -21,8 +21,8 @@
  extern char ckpfile[], monstnamelist[];
  extern char larnlevels[],lastmonst[];
 diff -Naur Ularn/header.h Ularn.new/header.h
---- Ularn/header.h	2006-03-16 13:40:53.000000000 -0800
-+++ Ularn.new/header.h	2006-03-17 07:02:33.000000000 -0800
+--- Ularn/header.h	2006-04-15 20:53:51.000000000 -0700
++++ Ularn.new/header.h	2006-04-15 20:52:48.000000000 -0700
 @@ -6,6 +6,9 @@
  #include <sys/param.h>
  #include <sys/times.h>
@@ -34,8 +34,8 @@
  #  include <sys/timeb.h>
  #endif /* FTIMER */
 diff -Naur Ularn/main.c Ularn.new/main.c
---- Ularn/main.c	2006-03-16 13:40:53.000000000 -0800
-+++ Ularn.new/main.c	2006-03-17 07:02:35.000000000 -0800
+--- Ularn/main.c	2006-04-15 20:53:51.000000000 -0700
++++ Ularn.new/main.c	2006-04-15 20:52:48.000000000 -0700
 @@ -50,7 +50,22 @@
  	struct passwd *pwe,*getpwuid();
  	extern char *optarg;
@@ -69,7 +69,7 @@
  
 diff -Naur Ularn/scores.c Ularn.new/scores.c
 --- Ularn/scores.c	2001-11-16 10:13:28.000000000 -0800
-+++ Ularn.new/scores.c	2006-03-16 14:22:14.000000000 -0800
++++ Ularn.new/scores.c	2006-04-15 21:10:20.000000000 -0700
 @@ -145,8 +145,9 @@
  writeboard()
  {
@@ -81,7 +81,24 @@
  		lprcat("Can't open scorefile for writing\n"); 
  		lflush();
  		return(-1); 
-@@ -185,7 +186,7 @@
+@@ -164,7 +165,15 @@
+ 		return(-1); 
+ 	}
+ 	fflush(fp);
+-	fclose(fp);  
++	rewind(fp);
++        /* Don't close the scoreboard filehandle.  If we're running setgid
++         * then we won't be able to open it again, and we might have to
++         * write to it multiple times if the user wants to pay his taxes
++         * more than once in a game.
++         */
++	/*
++  	fclose(fp);  
++	*/
+ 	return(0);
+ }
+ 
+@@ -185,7 +194,7 @@
  	}
  	if (writeboard()) 
  		return(-1);


Index: ularn.spec
===================================================================
RCS file: /cvs/extras/rpms/ularn/FC-4/ularn.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ularn.spec	17 Mar 2006 18:22:17 -0000	1.2
+++ ularn.spec	16 Apr 2006 04:54:48 -0000	1.3
@@ -1,6 +1,6 @@
 Name:           ularn
 Version:        1.5p4
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Simple roguelike game
 
 Group:          Amusements/Games
@@ -92,6 +92,10 @@
 
 
 %changelog
+* Sat Apr 15 2006 Wart <wart at kobold.org> 1.5p4-5
+- Update setgid patch to prevent closing the scoreboard file after writing
+  it.  This file might get written multiple times during the game.
+
 * Fri Mar 17 2006 Wart <wart at kobold.org> 1.5p4-4
 - Updated setgid patch to prevent someone from regaining setgid
   privileges.




More information about the fedora-extras-commits mailing list