mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2025-02-16 16:51:16 +00:00
Removed _all_ references to the define IDGODS. It was turned off anyway,
but still a glaring security hole waiting for someone to abuse.
This commit is contained in:
parent
0606295105
commit
c7f95dda2d
9 changed files with 1 additions and 100 deletions
1
AUTHORS
1
AUTHORS
|
@ -15,6 +15,7 @@ QW/Q1 tree merging:
|
||||||
Marcus Sundberg <mackan@stacken.kth.se>
|
Marcus Sundberg <mackan@stacken.kth.se>
|
||||||
Bill Currie <bill@taniwha.org>
|
Bill Currie <bill@taniwha.org>
|
||||||
Nelson J. Rush <chesterrr@att.net>
|
Nelson J. Rush <chesterrr@att.net>
|
||||||
|
Eric Windisch <windisch@nni.com>
|
||||||
|
|
||||||
Autoconf support:
|
Autoconf support:
|
||||||
Loring Holden <lsh@cs.brown.edu>
|
Loring Holden <lsh@cs.brown.edu>
|
||||||
|
|
1
TODO
1
TODO
|
@ -51,5 +51,4 @@ to quake-devel@lists.sourceforge.net with details.
|
||||||
* Fix q1/qw smurf attack
|
* Fix q1/qw smurf attack
|
||||||
* Fix oversized packet QW server crash
|
* Fix oversized packet QW server crash
|
||||||
* DOS/Win support in autoconf
|
* DOS/Win support in autoconf
|
||||||
* Remove all of the #ifdef IDGODS stuff
|
|
||||||
|
|
||||||
|
|
|
@ -253,10 +253,6 @@ extern unsigned short ntohs (unsigned short netshort);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef IDGODS
|
|
||||||
qboolean IsID(struct qsockaddr *addr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//
|
//
|
||||||
// public network functions
|
// public network functions
|
||||||
|
|
|
@ -205,10 +205,6 @@ void VID_UnlockBuffer (void);
|
||||||
|
|
||||||
#define SOUND_CHANNELS 8
|
#define SOUND_CHANNELS 8
|
||||||
|
|
||||||
// This makes anyone on id's net privileged
|
|
||||||
// Use for multiplayer testing only - VERY dangerous!!!
|
|
||||||
// #define IDGODS
|
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "bspfile.h"
|
#include "bspfile.h"
|
||||||
#include "vid.h"
|
#include "vid.h"
|
||||||
|
|
|
@ -952,58 +952,6 @@ void Host_Version_f (void)
|
||||||
Con_Printf ("Exe: "__TIME__" "__DATE__"\n");
|
Con_Printf ("Exe: "__TIME__" "__DATE__"\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef IDGODS
|
|
||||||
void Host_Please_f (void)
|
|
||||||
{
|
|
||||||
client_t *cl;
|
|
||||||
int j;
|
|
||||||
|
|
||||||
if (cmd_source != src_command)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if ((Cmd_Argc () == 3) && Q_strcmp(Cmd_Argv(1), "#") == 0)
|
|
||||||
{
|
|
||||||
j = Q_atof(Cmd_Argv(2)) - 1;
|
|
||||||
if (j < 0 || j >= svs.maxclients)
|
|
||||||
return;
|
|
||||||
if (!svs.clients[j].active)
|
|
||||||
return;
|
|
||||||
cl = &svs.clients[j];
|
|
||||||
if (cl->privileged)
|
|
||||||
{
|
|
||||||
cl->privileged = false;
|
|
||||||
cl->edict->v.flags = (int)cl->edict->v.flags & ~(FL_GODMODE|FL_NOTARGET);
|
|
||||||
cl->edict->v.movetype = MOVETYPE_WALK;
|
|
||||||
noclip_anglehack = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
cl->privileged = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Cmd_Argc () != 2)
|
|
||||||
return;
|
|
||||||
|
|
||||||
for (j=0, cl = svs.clients ; j<svs.maxclients ; j++, cl++)
|
|
||||||
{
|
|
||||||
if (!cl->active)
|
|
||||||
continue;
|
|
||||||
if (Q_strcasecmp(cl->name, Cmd_Argv(1)) == 0)
|
|
||||||
{
|
|
||||||
if (cl->privileged)
|
|
||||||
{
|
|
||||||
cl->privileged = false;
|
|
||||||
cl->edict->v.flags = (int)cl->edict->v.flags & ~(FL_GODMODE|FL_NOTARGET);
|
|
||||||
cl->edict->v.movetype = MOVETYPE_WALK;
|
|
||||||
noclip_anglehack = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
cl->privileged = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
void Host_Say(qboolean teamonly)
|
void Host_Say(qboolean teamonly)
|
||||||
{
|
{
|
||||||
|
@ -1894,9 +1842,6 @@ void Host_InitCommands (void)
|
||||||
Cmd_AddCommand ("name", Host_Name_f);
|
Cmd_AddCommand ("name", Host_Name_f);
|
||||||
Cmd_AddCommand ("noclip", Host_Noclip_f);
|
Cmd_AddCommand ("noclip", Host_Noclip_f);
|
||||||
Cmd_AddCommand ("version", Host_Version_f);
|
Cmd_AddCommand ("version", Host_Version_f);
|
||||||
#ifdef IDGODS
|
|
||||||
Cmd_AddCommand ("please", Host_Please_f);
|
|
||||||
#endif
|
|
||||||
Cmd_AddCommand ("say", Host_Say_f);
|
Cmd_AddCommand ("say", Host_Say_f);
|
||||||
Cmd_AddCommand ("say_team", Host_Say_Team_f);
|
Cmd_AddCommand ("say_team", Host_Say_Team_f);
|
||||||
Cmd_AddCommand ("tell", Host_Tell_f);
|
Cmd_AddCommand ("tell", Host_Tell_f);
|
||||||
|
|
|
@ -238,10 +238,6 @@ typedef struct
|
||||||
extern int hostCacheCount;
|
extern int hostCacheCount;
|
||||||
extern hostcache_t hostcache[HOSTCACHESIZE];
|
extern hostcache_t hostcache[HOSTCACHESIZE];
|
||||||
|
|
||||||
#ifdef IDGODS
|
|
||||||
qboolean IsID(struct qsockaddr *addr);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
//
|
//
|
||||||
// public network functions
|
// public network functions
|
||||||
|
|
|
@ -76,10 +76,6 @@ cvar_t config_modem_clear = {"_config_modem_clear", "ATZ", true};
|
||||||
cvar_t config_modem_init = {"_config_modem_init", "", true};
|
cvar_t config_modem_init = {"_config_modem_init", "", true};
|
||||||
cvar_t config_modem_hangup = {"_config_modem_hangup", "AT H", true};
|
cvar_t config_modem_hangup = {"_config_modem_hangup", "AT H", true};
|
||||||
|
|
||||||
#ifdef IDGODS
|
|
||||||
cvar_t idgods = {"idgods", "0"};
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int vcrFile = -1;
|
int vcrFile = -1;
|
||||||
qboolean recording = false;
|
qboolean recording = false;
|
||||||
|
|
||||||
|
@ -860,9 +856,6 @@ void NET_Init (void)
|
||||||
Cvar_RegisterVariable (&config_modem_clear);
|
Cvar_RegisterVariable (&config_modem_clear);
|
||||||
Cvar_RegisterVariable (&config_modem_init);
|
Cvar_RegisterVariable (&config_modem_init);
|
||||||
Cvar_RegisterVariable (&config_modem_hangup);
|
Cvar_RegisterVariable (&config_modem_hangup);
|
||||||
#ifdef IDGODS
|
|
||||||
Cvar_RegisterVariable (&idgods);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
Cmd_AddCommand ("slist", NET_Slist_f);
|
Cmd_AddCommand ("slist", NET_Slist_f);
|
||||||
Cmd_AddCommand ("listen", NET_Listen_f);
|
Cmd_AddCommand ("listen", NET_Listen_f);
|
||||||
|
@ -978,20 +971,3 @@ void SchedulePollProcedure(PollProcedure *proc, double timeOffset)
|
||||||
prev->next = proc;
|
prev->next = proc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef IDGODS
|
|
||||||
#define IDNET 0xc0f62800
|
|
||||||
|
|
||||||
qboolean IsID(struct qsockaddr *addr)
|
|
||||||
{
|
|
||||||
if (idgods.value == 0.0)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (addr->sa_family != 2)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if ((BigLong(*(int *)&addr->sa_data[2]) & 0xffffff00) == IDNET)
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -171,10 +171,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
#define SOUND_CHANNELS 8
|
#define SOUND_CHANNELS 8
|
||||||
|
|
||||||
// This makes anyone on id's net privileged
|
|
||||||
// Use for multiplayer testing only - VERY dangerous!!!
|
|
||||||
// #define IDGODS
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
typedef struct
|
typedef struct
|
||||||
|
|
|
@ -273,11 +273,7 @@ void SV_ConnectClient (int clientnum)
|
||||||
client->message.maxsize = sizeof(client->msgbuf);
|
client->message.maxsize = sizeof(client->msgbuf);
|
||||||
client->message.allowoverflow = true; // we can catch it
|
client->message.allowoverflow = true; // we can catch it
|
||||||
|
|
||||||
#ifdef IDGODS
|
|
||||||
client->privileged = IsID(&client->netconnection->addr);
|
|
||||||
#else
|
|
||||||
client->privileged = false;
|
client->privileged = false;
|
||||||
#endif
|
|
||||||
|
|
||||||
if (sv.loadgame)
|
if (sv.loadgame)
|
||||||
memcpy (client->spawn_parms, spawn_parms, sizeof(spawn_parms));
|
memcpy (client->spawn_parms, spawn_parms, sizeof(spawn_parms));
|
||||||
|
|
Loading…
Reference in a new issue