conflicts between shutdown hooks of nvram-wakeup and e.g. noad

Christoph Martin pkg-vdr-dvb-devel@lists.alioth.debian.org
Fri, 14 Jan 2005 12:04:33 +0100


This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enigAC740C54F4AF2081FC89DFA2
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hi Thomas,

Thomas Schmidt schrieb:
> * Thomas Schmidt schrieb am 06.01.05, um 23:10 Uhr:
> 
>>>You could either make the script readable only by user vdr or check in
>>>the script the real against the effective uid and exit if the calling
>>>user is not user vdr.
>>
>>Thank you for your help, will try to implement this during the next
>>weekend.
> 
> Well, the shutdown-hooks are now working as user, i had to write a
> (very small) c-wrapper for this, because it is impossible to run 
> shell-scripts with setuid/setgid. Still need to add the check for
> effective/real uid. Any tips how to realize this? 

In C you have:

       getuid returns the real user ID of the current process.

       geteuid returns the effective user ID of the current process.

But personaly I wood use a suid-perl script to do this. There you have
the variable $< and $> which give you the uids. suid-perl is better
equipped for security checks in suid scripts. You have to use taint
checking etc.

Christoph
-- 
============================================================================
Christoph Martin, EDV der Verwaltung, Uni-Mainz, Germany
 Internet-Mail:  Christoph.Martin@Uni-Mainz.DE
  Telefon: +49-6131-3926337
      Fax: +49-6131-3922856

--------------enigAC740C54F4AF2081FC89DFA2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB56dBgeVih7XOVJcRAi3lAJ9PcK+xDpLygiTSIsVvtiJzg1im/gCggPBj
FhtPQGgQHpwThbsjh1K5nIo=
=tiyI
-----END PGP SIGNATURE-----

--------------enigAC740C54F4AF2081FC89DFA2--