Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: [Snort-devel] Re: SIGHUP doesn't work

From: Jeff Nathan <jeff(at)snort.org>
Date: Tue Sep 23 2003 - 02:22:37 EDT


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday, September 23, 2003, at 01:43 AM, Denny Page wrote:

>>> BTW, can you not do a setreuid() back to root since the saved uid

The wrapper function SetUidGid() (in util.c) calls setuid(). A call to setuid() made by root sets the saved user ID to the euid. Thus, if we added code to call setreuid(), it would use the saved user ID which was equivalent to the euid when setuid() was called which would serve no purpose.

Conceptually, I see what you're getting at, but as explained on page 217 of APUE (Advanced Programming in the Unix Environment), it doesn't work. As I understand it, calling setreuid() is useful for the exec family of functions on setuid binaries but not when setuid() is called.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)

iD8DBQE/b+azEqr8+Gkj0/0RAsQDAJ9ujfQcYvvTpqSxCTKUJa7+GpRg/QCgpra/ S0np7Bh3C7wFgreHsa/gafQ=
=bba8
-----END PGP SIGNATURE-----



This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven.
http://thinkgeek.com/sf

Snort-devel mailing list
Snort-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/snort-devel Received on Tue Sep 23 02:30:18 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:08:09 EDT

Do you need help?X

Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library