STINNER Victor <victor.stin...@haypocalc.com> added the comment: posix modules contains a lot of function parsing uid_t / gid_t types. I would be nice to factorize the code: create a function to get an uid_t, and another to get a gid_t. I don't know the name of such callback, but it's used with: PyArg_ParseTuple(args, "...O&...", ..., &uid, get_uid, ...)).
Such callbacks will be useful for: posix_chown(), posix_fchown(), posix_lchown(), posix_setuid(), posix_seteuid(), posix_setreuid(), posix_setegid(), posix_setregid(), posix_setgid(). And maybe also in: posix_setgroups(). In Python trunk, posix_set*id() function do check for uid_t/gid_d overflow, but not the posix_*chown() functions. The patch only fixes posix_lchown(). ---------- nosy: +haypo _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6873> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com