rpms/rogue/devel rogue-5.4-setgid.patch,1.2,1.3

Michael Thomas (wart) fedora-extras-commits at redhat.com
Mon May 15 22:49:02 UTC 2006


Author: wart

Update of /cvs/extras/rpms/rogue/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26705

Modified Files:
	rogue-5.4-setgid.patch 
Log Message:
Fix patch to apply cleanly.



rogue-5.4-setgid.patch:

Index: rogue-5.4-setgid.patch
===================================================================
RCS file: /cvs/extras/rpms/rogue/devel/rogue-5.4-setgid.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- rogue-5.4-setgid.patch	15 May 2006 22:31:10 -0000	1.2
+++ rogue-5.4-setgid.patch	15 May 2006 22:49:02 -0000	1.3
@@ -1,6 +1,6 @@
 diff -Naur rogue/extern.c rogue.new/extern.c
 --- rogue/extern.c	2006-01-03 16:17:29.000000000 -0800
-+++ rogue.new/extern.c	2006-03-30 13:24:12.000000000 -0800
++++ rogue.new/extern.c	2006-05-15 15:43:43.000000000 -0700
 @@ -111,7 +111,7 @@
  };
  
@@ -11,8 +11,8 @@
  int lastscore = -1;			/* Score before this turn */
  int no_command = 0;			/* Number of turns asleep */
 diff -Naur rogue/extern.h rogue.new/extern.h
---- rogue/extern.h	2006-03-19 11:22:14.000000000 -0800
-+++ rogue.new/extern.h	2006-03-30 13:24:22.000000000 -0800
+--- rogue/extern.h	2006-05-15 15:43:15.000000000 -0700
++++ rogue.new/extern.h	2006-05-15 15:43:43.000000000 -0700
 @@ -50,7 +50,7 @@
  
  extern char	fruit[], orig_dsusp, prbuf[], whoami[];
@@ -24,7 +24,7 @@
  extern struct ltchars	ltc;
 diff -Naur rogue/mach_dep.c rogue.new/mach_dep.c
 --- rogue/mach_dep.c	2006-01-30 08:36:21.000000000 -0800
-+++ rogue.new/mach_dep.c	2006-04-01 19:26:15.000000000 -0800
++++ rogue.new/mach_dep.c	2006-05-15 15:43:43.000000000 -0700
 @@ -45,7 +45,9 @@
  #include <sys/stat.h>
  #include <limits.h>
@@ -89,7 +89,7 @@
  
 diff -Naur rogue/main.c rogue.new/main.c
 --- rogue/main.c	2006-01-29 16:11:32.000000000 -0800
-+++ rogue.new/main.c	2006-03-30 13:40:16.000000000 -0800
++++ rogue.new/main.c	2006-05-15 15:43:43.000000000 -0700
 @@ -24,6 +24,13 @@
      char *env;
      int lowtime;
@@ -114,7 +114,7 @@
  	{
 diff -Naur rogue/mdport.c rogue.new/mdport.c
 --- rogue/mdport.c	2006-01-29 18:24:39.000000000 -0800
-+++ rogue.new/mdport.c	2006-04-11 19:26:43.000000000 -0700
++++ rogue.new/mdport.c	2006-05-15 15:45:21.000000000 -0700
 @@ -193,8 +193,17 @@
  md_normaluser()
  {
@@ -136,30 +136,30 @@
  }
  
 @@ -397,22 +406,35 @@
- char *
- md_getroguedir()
- {
--    static char path[1024];
-+    static char path[PATH_MAX];
-     char *end,*home;
- 
--    if ( (home = getenv("ROGUEHOME")) != NULL)
+ char *
+ md_getroguedir()
+ {
+-    static char path[1024];
++    static char path[PATH_MAX];
+     char *end,*home;
+ 
+-    if ( (home = getenv("ROGUEHOME")) != NULL)
 +    /* Disable the use of ROGUEHOME to prevent users from
 +     * maliciously overwriting save files from other setgid games.
 +     */
 +    if ( (home = getenv("ROGUEHOME")) != NULL && 0)
-     {
-         if (*home)
-         {
--            strncpy(path, home, PATH_MAX - 20);
--
--            end = &path[strlen(path)-1];
--
--            while( (end >= path) && ((*end == '/') || (*end == '\\')))
--                *end-- = '\0';
--
--            if (directory_exists(path))
--                return(path);
+     {
+         if (*home)
+         {
+-            strncpy(path, home, PATH_MAX - 20);
+-
+-            end = &path[strlen(path)-1];
+-
+-            while( (end >= path) && ((*end == '/') || (*end == '\\')))
+-                *end-- = '\0';
+-
+-            if (directory_exists(path))
+-                return(path);
 +            /* The magic number 20 is used to guarantee that the save/lock
 +             * filenames (which are much shorter than 20 characters) can
 +             * be appended to this buffer.
@@ -179,12 +179,12 @@
 +                if (directory_exists(path))
 +                    return(path);
 +            }
-         }
-     }
- 
+         }
+     }
+ 
 diff -Naur rogue/rip.c rogue.new/rip.c
 --- rogue/rip.c	2006-01-03 16:17:29.000000000 -0800
-+++ rogue.new/rip.c	2006-03-30 13:32:17.000000000 -0800
++++ rogue.new/rip.c	2006-05-15 15:43:43.000000000 -0700
 @@ -60,7 +60,6 @@
      int i;
      SCORE *sc2;
@@ -246,7 +246,7 @@
  /*
 diff -Naur rogue/save.c rogue.new/save.c
 --- rogue/save.c	2006-01-30 08:05:35.000000000 -0800
-+++ rogue.new/save.c	2006-03-30 13:33:45.000000000 -0800
++++ rogue.new/save.c	2006-05-15 15:43:43.000000000 -0700
 @@ -335,7 +335,40 @@
  
  /*
@@ -309,7 +309,7 @@
              &top_ten[i].sc_flags, &top_ten[i].sc_monster,
 diff -Naur rogue/state.c rogue.new/state.c
 --- rogue/state.c	2006-01-03 16:17:29.000000000 -0800
-+++ rogue.new/state.c	2006-03-30 13:09:46.000000000 -0800
++++ rogue.new/state.c	2006-05-15 15:43:43.000000000 -0700
 @@ -2138,7 +2138,8 @@
      rs_write_int(savef, no_food);
      rs_write_ints(savef,a_class,MAXARMORS);




More information about the fedora-extras-commits mailing list