Intercept ioctls
Ángel González
keisial@gmail.com
Mon May 13 11:28:00 GMT 2013
On 13/05/13 13:07, Andreas Ames wrote:
> My questions are:
>
> 1. Is my above guesswork reasonable?
>
> 2. Are there other argument types that are more dangerous (like one-byte, two-byte etc. arguments)?
>
> 3. Do you know a better approach to shim ioctls?
>
>
> Thanks in advance,
>
> aa
Yes, it should work. You may be passing a garbage argument to the , but
in that case, due to the request code, the real ioctl won't be using it.
Given that sizeof(void*) >= sizeof(int), your choice seems appropiate:
> The arg argument represents additional information that is
> needed by this specific STREAMS device to perform
> the requested function. The type of arg depends upon the
> particular control request, but it shall be either an
> integer or a pointer to a device-specific data structure.
More information about the Libc-help
mailing list