apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: [PATCH] avoid crashing when given invalid user/group ids on win32
Date Mon, 23 Jan 2006 07:05:01 GMT
Garrett Rooney wrote:
> 
> The test is trying to send a nonexistant UID/GID (it hardcodes 9999999
> as the value, FWIW), that seems like "faulty data" to me.  If you
> aren't allowed to just throw random crap at these functions that's
> also fine, but given that we actually have a test for that behavior it
> sure implies that it's allowed.  If not, the test should go away and
> we should probably document that these values are platform specific,
> and that the only portable way to get one is via an APR function that
> goes from name to UID or name to GID.

I guess the point/question comes down to this, is 9999999 a valid
apr_uid_t / apr_gid_t?  If they are then yes, I concur with your patch.
But nothing on the win32 side could return such a value.  Those types
are pointers to data.

Now could we have an invalid user/group on win32?  Sure, but it wouldn't
be a numeric constant on win32 like this example.  It would be a pointer
to a SID that was unrecognized.

Bill

Mime
View raw message