Message92473
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(). |
|
Date |
User |
Action |
Args |
2009-09-10 08:02:21 | vstinner | set | recipients:
+ vstinner, boya |
2009-09-10 08:02:21 | vstinner | set | messageid: <1252569741.81.0.470078901075.issue6873@psf.upfronthosting.co.za> |
2009-09-10 08:02:20 | vstinner | link | issue6873 messages |
2009-09-10 08:02:19 | vstinner | create | |
|