public inbox for linux-audit@redhat.com
 help / color / mirror / Atom feed
* getuid() vs. geteuid() in auditctl
@ 2012-03-16 21:50 Peter Moody
  2012-03-20 18:07 ` Steve Grubb
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Moody @ 2012-03-16 21:50 UTC (permalink / raw)
  To: linux-audit

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-21 21:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-16 21:50 getuid() vs. geteuid() in auditctl Peter Moody
2012-03-20 18:07 ` Steve Grubb
2012-03-21 16:38   ` Peter Moody
2012-03-21 20:12     ` Steve Grubb
2012-03-21 21:34       ` Peter Moody

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox