[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

getuid() vs. geteuid() in auditctl



line 1162 in auditctl.c has this:

#ifndef DEBUG
  /* Make sure we are root */
  if (getuid() != 0) {
    fprintf(stderr, "You must be root to run this program.\n");
    return 4;
  }
#endif

Is there any particular reason to use getuid() there as opposed to
geteuid()? In my particular case, we have a setuid helper that allows
a normal user to run 'auditctl -l' (with a clean environment), and
this prevents the setuid helper from working.

Cheers,
peter
-- 
Peter Moody      Google    1.650.253.7306
Security Engineer  pgp:0xC3410038


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]