aboutsummaryrefslogtreecommitdiffstats
path: root/code/unix
diff options
context:
space:
mode:
authorludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-09-03 12:02:28 +0000
committerludwig <ludwig@edf5b092-35ff-0310-97b2-ce42778d08ea>2005-09-03 12:02:28 +0000
commit64d3885c6735f1cfa6eb84eb96f566ce957dd6a0 (patch)
tree60b373b3165d35e4281417e2284618c93d4be570 /code/unix
parentf5d55eb7927af70bca515f4abd438b80f5b134df (diff)
downloadioquake3-aero-64d3885c6735f1cfa6eb84eb96f566ce957dd6a0.tar.gz
ioquake3-aero-64d3885c6735f1cfa6eb84eb96f566ce957dd6a0.zip
remove useless setuid code
git-svn-id: svn://svn.icculus.org/quake3/trunk@73 edf5b092-35ff-0310-97b2-ce42778d08ea
Diffstat (limited to 'code/unix')
-rw-r--r--code/unix/linux_qgl.c3
-rw-r--r--code/unix/linux_snd.c5
-rw-r--r--code/unix/unix_main.c5
3 files changed, 1 insertions, 12 deletions
diff --git a/code/unix/linux_qgl.c b/code/unix/linux_qgl.c
index d56c8cd..b509c0e 100644
--- a/code/unix/linux_qgl.c
+++ b/code/unix/linux_qgl.c
@@ -3038,10 +3038,9 @@ qboolean QGL_Init( const char *dllname )
{
char fn[1024];
// FILE *fp; // bk001204 - unused
- extern uid_t saved_euid; // unix_main.c
// if we are not setuid, try current directory
- if (getuid() == saved_euid) {
+ if (1) {
getcwd(fn, sizeof(fn));
Q_strcat(fn, sizeof(fn), "/");
Q_strcat(fn, sizeof(fn), dllname);
diff --git a/code/unix/linux_snd.c b/code/unix/linux_snd.c
index 6c589bc..676b7d5 100644
--- a/code/unix/linux_snd.c
+++ b/code/unix/linux_snd.c
@@ -82,7 +82,6 @@ qboolean SNDDMA_Init(void)
// char *s; // bk001204 - unused
struct audio_buf_info info;
int caps;
- extern uid_t saved_euid;
if (snd_inited)
return 1;
@@ -96,12 +95,8 @@ qboolean SNDDMA_Init(void)
// open /dev/dsp, confirm capability to mmap, and get size of dma buffer
if (!audio_fd) {
- seteuid(saved_euid);
-
audio_fd = open(snddevice->string, O_RDWR);
- seteuid(getuid());
-
if (audio_fd < 0) {
perror(snddevice->string);
Com_Printf("Could not open %s\n", snddevice->string);
diff --git a/code/unix/unix_main.c b/code/unix/unix_main.c
index a242c2d..51a302a 100644
--- a/code/unix/unix_main.c
+++ b/code/unix/unix_main.c
@@ -61,7 +61,6 @@ refexport_t re;
unsigned sys_frame_time;
-uid_t saved_euid;
qboolean stdin_active = qtrue;
// =============================================================
@@ -1261,10 +1260,6 @@ int main ( int argc, char* argv[] )
char cdpath[PATH_MAX] = {0};
void Sys_SetDefaultCDPath(const char *path);
- // go back to real user for config loads
- saved_euid = geteuid();
- seteuid(getuid());
-
Sys_ParseArgs( argc, argv ); // bk010104 - added this for support
strncat(cdpath, argv[0], sizeof(cdpath)-1);