[re-adding the list] [please don't top-post on technical lists] On 02/22/2011 02:14 PM, Markus Gothe wrote: > The issue is with PIMd-NG (http://pimd-ng.sf.net). ...
I'm not sure if you emailed me privately because of sensitive content in
your email, but hopefully I've trimmed enough of your content to avoid
risking any public exposure of a security issue, if that was your intent
behind mailing just me instead of the list.
>
> For some reason FreeBSD chose 'unsigned long' for the request part instead of
> the 'signed int'-POSIX variant argument to ioctl().
We know. And the configure test should be detecting that, as well as
letting rpl_ioctl work around that.
Maybe the real problem is that we need to ensure that our replacement
does not do sign extension. Does this patch fix your issue?
diff --git i/lib/ioctl.c w/lib/ioctl.c
index 72f9f37..3ed4327 100644
--- i/lib/ioctl.c
+++ w/lib/ioctl.c
@@ -37,7 +37,11 @@ rpl_ioctl (int fd, int request, ... /* {void *,char
*} arg */)
buf = va_arg (args, void *);
va_end (args);
- return ioctl (fd, request, buf);
+ /* Generally, this replacement function is in effect when the system
+ ioctl expects unsigned long int. If request has the most
+ significant bit set, then we need to make sure that
+ sign-extension does not come into play. */
+ return ioctl (fd, (unsigned long) request, buf);
}
#else /* mingw */
--
Eric Blake [email protected] +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
