summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sterrett <mr_bones_@gentoo.org>2009-08-21 15:45:29 +0000
committerMichael Sterrett <mr_bones_@gentoo.org>2009-08-21 15:45:29 +0000
commitf470d1cd05ad20e08c92892c256ad1d89e383299 (patch)
treee91dcd02896c17ac84916960df6764ae50922416 /games-server
parentold (diff)
downloadgentoo-2-f470d1cd05ad20e08c92892c256ad1d89e383299.tar.gz
gentoo-2-f470d1cd05ad20e08c92892c256ad1d89e383299.tar.bz2
gentoo-2-f470d1cd05ad20e08c92892c256ad1d89e383299.zip
old
(Portage version: 2.1.6.13/cvs/Linux i686)
Diffstat (limited to 'games-server')
-rw-r--r--games-server/tetrix/Manifest2
-rw-r--r--games-server/tetrix/files/1.13.16.1.40c-droproot.patch171
-rw-r--r--games-server/tetrix/files/1.13.16.1.40c-paths.patch42
3 files changed, 0 insertions, 215 deletions
diff --git a/games-server/tetrix/Manifest b/games-server/tetrix/Manifest
index 39e27460a1e6..048a71fbd565 100644
--- a/games-server/tetrix/Manifest
+++ b/games-server/tetrix/Manifest
@@ -1,5 +1,3 @@
-AUX 1.13.16.1.40c-droproot.patch 5220 RMD160 48d22c7c7ca6adefa83bf3b7a6fcd9ee79b599f6 SHA1 5d7bdebf3e809949e19afaf8789ef2a7b8e82c8f SHA256 d059bbf7c5224b58eb6d816130c1f275414ffc2e126c7925e9804f2d368450e2
-AUX 1.13.16.1.40c-paths.patch 2235 RMD160 2b2b2b5421b752aae4fd8b6e6780e04ad974e738 SHA1 7429eeaed05b0b13ef64d1e951ebf51a9a86b82e SHA256 c1dadb4dd58ecc5cc1f3cd44dea698f229f13b94974bf48c2e3974741a4442a7
AUX tetrix-1.13.16.1.40c-build.patch 8770 RMD160 e639a886134d88490f99446c30c9b178ab753799 SHA1 af8c4dcba799b9b6cac89cd67e6bf7d7ac4215f0 SHA256 be3942bdf36a9e5df36d18b5ff5f81138ede4bea3b18ccd4f31a920719b1a328
AUX tetrix.rc 494 RMD160 7f4939e1d1932f7eb58bc3a17880f6168e0710da SHA1 58d94694174390f28c6529d5a9f61213da931804 SHA256 391e4f06c1a7651facf8e1c16e6039e2ce2a860a23c8a2dccfa3b3478f333f54
DIST tetrinetx-1.13.16+qirc-1.40c.tar.gz 81447 RMD160 447c1d239919f2390748c8808cd1c026d0236afc SHA1 3bc0a8ce53bef3ef68b028834689d6fe85c8150a SHA256 2b7210a0c8950c13e648d8abc36b7bca8ce58035999526301a715aacd40d15d4
diff --git a/games-server/tetrix/files/1.13.16.1.40c-droproot.patch b/games-server/tetrix/files/1.13.16.1.40c-droproot.patch
deleted file mode 100644
index bfba910cb527..000000000000
--- a/games-server/tetrix/files/1.13.16.1.40c-droproot.patch
+++ /dev/null
@@ -1,171 +0,0 @@
-diff -ur src.orig/game.c src/game.c
---- src.orig/game.c 2003-09-17 13:55:17.000000000 -0400
-+++ src/game.c 2003-09-17 23:01:10.644146104 -0400
-@@ -2,6 +2,8 @@
- game.c
-
- */
-+#include <pwd.h>
-+#include <grp.h>
-
- /* securitywrite() */
- /* Writes out the security structure into a text format game.secure file */
-@@ -149,6 +151,11 @@
- fprintf(file_out,"# bindip [0.0.0.0] - What IP should server be bound to (0.0.0.0 means all)\n");
- fprintf(file_out,"bindip=%s\n", game.bindip);
- fprintf(file_out,"\n");
-+ fprintf(file_out,"# username/group to switch UID/GID to");
-+ fprintf(file_out,"droproot=%d\n", game.droproot);
-+ fprintf(file_out,"dropuser=%s\n", game.user);
-+ fprintf(file_out,"dropgroup=%s\n", game.group);
-+ fprintf(file_out,"\n");
- fprintf(file_out,"# maxchannels [1] - How many channels should be available on server\n");
- fprintf(file_out,"maxchannels=%d\n", game.maxchannels);
- fprintf(file_out,"\n");
-@@ -466,6 +473,21 @@
- strncpy(game.bindip, id_value, IPLEN-1); game.bindip[IPLEN-1]=0;
- error=0;
- }
-+ if (!strcasecmp(id_tag,"droproot"))
-+ {
-+ game.droproot=atoi(id_value);
-+ error=0;
-+ }
-+ if (!strcasecmp(id_tag,"dropuser"))
-+ {
-+ strncpy(game.user, id_value, USERNAMELEN-1); game.bindip[USERNAMELEN-1]=0;
-+ error=0;
-+ }
-+ if (!strcasecmp(id_tag,"dropgroup"))
-+ {
-+ strncpy(game.group, id_value, USERNAMELEN-1); game.bindip[USERNAMELEN-1]=0;
-+ error=0;
-+ }
-
-
- if (!strcasecmp(id_tag,"maxchannels"))
-@@ -854,6 +876,22 @@
- }
- fclose(file_in);
- lvprintf(3,"Read game configuration from %s\n", FILE_CONF);
-+ if (game.droproot) {
-+ struct passwd *vpw;
-+ struct group *vgr;
-+ game.droproot = 0;
-+ vpw = getpwnam(game.user);
-+ if (vpw) {
-+ game.userid = vpw->pw_uid;
-+ vgr = getgrnam(game.group);
-+ if (vgr) {
-+ game.groupid = vgr->gr_gid;
-+ game.droproot = 1;
-+ }
-+ }
-+ if (!game.droproot)
-+ lvprintf(2,"Drop root was requested but the specified user/group were invalid!\n");
-+ }
- return(0);
- }
-
-diff -ur src.orig/main.c src/main.c
---- src.orig/main.c 2003-09-17 13:55:17.000000000 -0400
-+++ src/main.c 2003-09-17 23:17:43.858154624 -0400
-@@ -4878,10 +4878,13 @@
- long int timeticks, otimeticks;
-
- /* Initialise */
-+ xx = (argc == 2 && !strcmp(argv[1],"-q"));
-+ if (!xx)
- printf("Loading Tetrix. Please wait...\n");
- init_main();
- init_resolver();
- init_game();
-+ if (!xx)
- printf("Initializing security/ban list...\n");
- init_security();
- init_banlist(banlist, MAXBAN);
-@@ -4890,6 +4893,7 @@
- read_banlist(FILE_BAN_COMPROMISE, combanlist, MAXBAN);
- init_allowlist();
- read_allowlist();
-+ if (!xx)
- printf("Initializing winlist...\n");
- init_winlist(winlist, MAXWINLIST);
- init_winlist(winlist2, MAXWINLIST);
-@@ -4898,16 +4902,21 @@
- readwinlist(FILE_WINLIST2, winlist2, MAXWINLIST);
- readwinlist(FILE_WINLIST3, winlist3, MAXWINLIST);
- sleep(1);
-+ if (!xx)
- printf("Initialize network connection...\n");
- init_net();
-+ if (!xx)
- printf("Gameplay ... ");
- usleep(300000);
- init_telnet_port();
-+ if (!xx)
- printf("Spectator ... ");
- usleep(300000);
- init_playback_port();
-+ if (!xx)
- printf("Ircadm ... \n");
- init_query_port();
-+ if (!xx)
- printf("Completed!!!\n");
-
- if (securityread() < 0)
-@@ -4933,6 +4942,14 @@
-
- /* Write out PID */
- writepid();
-+
-+ /* drop root */
-+ if (game.droproot) {
-+ if (setgid(game.groupid))
-+ perror("Could not setgid");
-+ if (setuid(game.userid))
-+ perror("Could not setuid");
-+ }
-
- /* Reset time */
- timeticks = time(NULL);
-diff -ur src.orig/main.h src/main.h
---- src.orig/main.h 2003-09-17 13:55:17.000000000 -0400
-+++ src/main.h 2003-09-17 23:00:12.054053152 -0400
-@@ -48,6 +48,7 @@
- /* Defines */
- #define TETVERSION "1.13" /* What Tetrinet version we are for */
- #define SERVERBUILD "16+qirc-1.40b" /* What build we are at */
-+#define USERNAMELEN 30 /* Maximum length of username/group for droproot */
- #define NICKLEN 30 /* Maximum length of Nickname */
- #define VERLEN 10 /* Maximum length of Tetrinet version */
- #define UHOSTLEN 121 /* Maximum length of Hostname */
-@@ -235,6 +236,12 @@
-
- int verbose; /* Verbosity */
- char pidfile[PIDFILELEN+1];
-+
-+ int droproot; /* should we drop root when starting ? */
-+ char user[USERNAMELEN+1];
-+ uid_t userid;
-+ char group[USERNAMELEN+1];
-+ gid_t groupid;
- };
-
-
-Only in src: makefile
-Files src.orig/tetrix and src/tetrix differ
---- bin/game.conf.orig 2003-09-17 23:19:02.703168360 -0400
-+++ bin/game.conf 2003-09-17 23:18:58.062873792 -0400
-@@ -13,6 +13,11 @@
- # bindip [0.0.0.0] - What IP should server be bound to (0.0.0.0 means all)
- bindip=0.0.0.0
-
-+# username/group to switch UID/GID to
-+droproot=1
-+dropuser=games
-+dropgroup=games
-+
- # maxchannels [1] - How many channels should be available on server
- maxchannels=8
-
diff --git a/games-server/tetrix/files/1.13.16.1.40c-paths.patch b/games-server/tetrix/files/1.13.16.1.40c-paths.patch
deleted file mode 100644
index 35b29a748c5d..000000000000
--- a/games-server/tetrix/files/1.13.16.1.40c-paths.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- src/config.h.orig 2003-09-13 21:04:28.894714336 -0400
-+++ src/config.h 2003-09-13 21:07:43.610113096 -0400
-@@ -7,16 +7,16 @@
- */
-
- /* Location of the various external files */
--#define FILE_MOTD "game.motd" /* Message of the Day File */
--#define FILE_PMOTD "game.pmotd" /* Playback motd */
--#define FILE_CONF "game.conf" /* Game configuration File */
--#define FILE_WINLIST "game.winlist" /* Winlist storage file */
--#define FILE_WINLIST2 "game.winlist2" /* Winlist storage file */
--#define FILE_WINLIST3 "game.winlist3" /* Winlist storage file */
-+#define FILE_MOTD "GENTOO_CONFDIR/game.motd" /* Message of the Day File */
-+#define FILE_PMOTD "GENTOO_CONFDIR/game.pmotd" /* Playback motd */
-+#define FILE_CONF "GENTOO_CONFDIR/game.conf" /* Game configuration File */
-+#define FILE_WINLIST "GENTOO_STATEDIR/game.winlist" /* Winlist storage file */
-+#define FILE_WINLIST2 "GENTOO_STATEDIR/game.winlist2" /* Winlist storage file */
-+#define FILE_WINLIST3 "GENTOO_STATEDIR/game.winlist3" /* Winlist storage file */
-
--#define FILE_BAN "game.ban" /* List of Banned IP's */
--#define FILE_BAN_COMPROMISE "game.ban.compromise" /* List of Banned IP's */
--#define FILE_ALLOW "game.allow" /* List of allow IP's */
--#define FILE_LOG "game.log" /* Logfile */
--#define FILE_PID "game.pid" /* Default PID */
--#define FILE_SECURE "game.secure" /* Security file */
-+#define FILE_BAN "GENTOO_CONFDIR/game.ban" /* List of Banned IP's */
-+#define FILE_BAN_COMPROMISE "GENTOO_CONFDIR/game.ban.compromise" /* List of Banned IP's */
-+#define FILE_ALLOW "GENTOO_CONFDIR/game.allow" /* List of allow IP's */
-+#define FILE_LOG "GENTOO_LOGDIR/tetrix.log" /* Logfile */
-+#define FILE_PID "/var/run/tetrix.pid" /* Default PID */
-+#define FILE_SECURE "GENTOO_CONFDIR/game.secure" /* Security file */
---- bin/game.conf.orig 2003-09-13 21:21:03.748473576 -0400
-+++ bin/game.conf 2003-09-13 21:21:12.584130352 -0400
-@@ -8,7 +8,7 @@
- # Any text after a # is ignored, and can be used as comments.
-
- # pidfile [game.pid] - Where should the Process ID be written
--pidfile=game.pid
-+pidfile=/var/run/tetrix.pid
-
- # bindip [0.0.0.0] - What IP should server be bound to (0.0.0.0 means all)
- bindip=0.0.0.0