On 2004.02.19, Carl Robert Blesius <[EMAIL PROTECTED]> wrote: > OpenACS irc diagnosis: > > "so that is a bug. it should just return true instead of the uid, which > is what the comment actually says it does. it assumes all UIDs are >0" > > Comments? Fixes? Help?
This was opened today as bug #899759. My last response to it was: | If that's the case, then in my opinion, OSX and HPUX are | broken :-) POSIX says that uid_t is an unsigned short (16 | bits). Negative numbers aren't valid uids. This is why it's | safe to use a signed int (32 bits) where negative values | indicate errors unambiguously since all uids fall in the >=0 | range as they're all unsigned shorts which neatly fit inside a | signed int without sign conversion. | | Perhaps the right fix is to do this: | | retcode = (unsigned) pw->pw_uid; I lack an OSX machine (sadly) so I can't test this, but if someone can make this one-line change and test and confirm it fixes the problem, I'll commit the change into CVS. -- Dossy -- Dossy Shiobara mail: [EMAIL PROTECTED] Panoptic Computer Network web: http://www.panoptic.com/ "He realized the fastest way to change is to laugh at your own folly -- then you can let go and quickly move on." (p. 70) -- AOLserver - http://www.aolserver.com/ To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]> with the body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: field of your email blank.
