I wanted to have Assp running as the assp user on Mac OS X and in one of the recent updates it broke with an error of 'setruid() not implemented at assp.pl line 2033'. The offending line is this (in the subroutine switchUsers):

$<=$uid; $>=$uid; $<=$uid; $>=$uid;

A bit of Googling found this message here: http://groups.google.com/ group/comp.lang.perl.misc/browse_thread/thread/9beeaa638ba83213/ dba793905626ca75%23dba793905626ca75

The upshot is that setruid() is depreciated (and apparently now removed from Mac OS X) and so this line which Perl runs the first bit is interpreted as trying to change the real uid without changing the effective uid. It does this using the depreciated setruid() function call and then dies.

However as you can see from the next bit in the line, we actually want to change the effective uid as well so this whole line can simply be replaced with:

$< = $> = $uid;

And no more errors on launch!

I am not a Perl expert, and so I cannot say if this change will have an unexpected effect beyond setting the User ID as expected, but it works well for me on both Mac OS X 10.3.9 and 10.4.10.

/*
* Chris White,
* The Last Word Consulting Company Limited.
*
* Ph. +64 27 457 0248
*
* Email: [EMAIL PROTECTED]
* PGP Fingerprint: 60B8 7C67 9B5A 6665 535F 5522 A4E2 695D F77E AB78
*/


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Assp-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-user

Reply via email to