This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ximaera
Recipients neologix, pitrou, python-dev, ximaera
Date 2011-10-03.18:29:27
SpamBayes Score 7.180101e-08
Marked as misclassified No
Message-id <1317666568.73.0.957785734202.issue13045@psf.upfronthosting.co.za>
In-reply-to
Content
Hi Charles-François,

I've attached an update for the previous patch. Now there's no more overloading for the third argument and socket.getsockopt accepts one more optional argument -- a buffer to use as an input to kernel.

I can provide a manual sample script, with getsockopt being used this way, that depends on Linux ipset kernel module being installed and modprobe'd. However, automatic unit test is not that easy to implement. Generally ipset requires certain kernel modules to operate, and we either have to install ipset in order to run a unit test, or to implement some mock Linux kernel module purely for testing and support it against all possible kernel versions. Not to mention that such a test should be carried out by root user only.

By the way, I don't really think that any POSIX-compliant UNIX out there would treat the buffer given to getsockopt in any way different from what Linux does. It is very easy to copy the buffer from user to kernel and back, and it is so inconvenient to prevent kernel from reading it prior to modification, that I bet no one has ever bothered to do this.
History
Date User Action Args
2011-10-03 18:29:29ximaerasetrecipients: + ximaera, pitrou, neologix, python-dev
2011-10-03 18:29:28ximaerasetmessageid: <1317666568.73.0.957785734202.issue13045@psf.upfronthosting.co.za>
2011-10-03 18:29:28ximaeralinkissue13045 messages
2011-10-03 18:29:27ximaeracreate