--- cdrtools-2.01a37/cdrecord/cdrecord.c~ 2004-12-12 20:38:26 +0300 +++ cdrtools-2.01a37/cdrecord/cdrecord.c 2004-12-12 20:58:26 +0300 @@ -466,8 +466,10 @@ main(ac, av) /* * XXX Below this point we do not need root privilleges anymore. */ + /* XXX Quick'n'dirty hack for linux kernel >= 2.6.8.1 compatability if (geteuid() != getuid()) { /* AIX does not like to do this */ /* If we are not root */ + /* #ifdef HAVE_SETREUID if (setreuid(-1, getuid()) < 0) #else @@ -479,6 +481,8 @@ main(ac, av) #endif comerr("Panic cannot set back effective uid.\n"); } + */ + /* * WARNING: We now are no more able to do any privilleged operation * unless we have been called by root. @@ -983,10 +987,12 @@ if (lverbose > 2) * even on OS that do not support getreuid() which is *BSD * and SUSv3 only. */ + /* XXX Quick'n'dirty hack for linux kernel >= 2.6.8.1 compatability if (oeuid != getuid()) { if (setreuid(-1, oeuid) < 0) errmsg("Could set back effective uid.\n"); } + */ #endif /* * fork() here to start the extra process needed for @@ -1001,11 +1007,13 @@ if (lverbose > 2) /* * XXX Below this point we never need root privilleges anymore. */ + /* XXX Quick'n'dirty hack for linux kernel >= 2.6.8.1 compatability if (geteuid() != getuid()) { /* AIX does not like to do this */ /* If we are not root */ - if (setreuid(-1, getuid()) < 0) + /* if (setreuid(-1, getuid()) < 0) comerr("Panic cannot set back effective uid.\n"); } + */ #endif } if ((*dp->cdr_set_speed_dummy)(scgp, dp, &speed) < 0) {