[98955] trunk/dports/lang/python27
jmr at macports.org
jmr at macports.org
Mon Oct 22 06:10:15 PDT 2012
Revision: 98955
http://trac.macports.org//changeset/98955
Author: jmr at macports.org
Date: 2012-10-22 06:10:15 -0700 (Mon, 22 Oct 2012)
Log Message:
-----------
python27: update posixmodule.c.ed to fix crash in os.getgroups (#36085)
Modified Paths:
--------------
trunk/dports/lang/python27/Portfile
trunk/dports/lang/python27/files/posixmodule.c.ed
Modified: trunk/dports/lang/python27/Portfile
===================================================================
--- trunk/dports/lang/python27/Portfile 2012-10-22 10:59:00 UTC (rev 98954)
+++ trunk/dports/lang/python27/Portfile 2012-10-22 13:10:15 UTC (rev 98955)
@@ -8,6 +8,7 @@
epoch 2
# Remember to keep py27-tkinter and py27-gdbm's versions sync'd with this
version 2.7.3
+revision 1
set major [lindex [split $version .] 0]
set branch [join [lrange [split ${version} .] 0 1] .]
Modified: trunk/dports/lang/python27/files/posixmodule.c.ed
===================================================================
--- trunk/dports/lang/python27/files/posixmodule.c.ed 2012-10-22 10:59:00 UTC (rev 98954)
+++ trunk/dports/lang/python27/files/posixmodule.c.ed 2012-10-22 13:10:15 UTC (rev 98955)
@@ -1,3 +1,9 @@
+g/^posix_setuid *(//^[ ]*uid_t/s/uid_t/int/
+g/^posix_seteuid *(//^[ ]*uid_t/s/uid_t/int/
+g/^posix_setegid *(//^[ ]*gid_t/s/gid_t/int/
+g/^posix_setreuid *(//^[ ]*uid_t/s/uid_t/int/
+g/^posix_setregid *(//^[ ]*gid_t/s/gid_t/int/
+g/^posix_setgid *(//^[ ]*gid_t/s/gid_t/int/
/PyInt_FromLong((long)st->st_uid)/s//PyInt_FromLong((long)(int)st->st_uid)/
/PyInt_FromLong((long)st->st_gid)/s//PyInt_FromLong((long)(int)st->st_gid)/
/^posix_chown/a
@@ -7,30 +13,7 @@
/return PyInt_FromLong((long)getegid());/s//return PyInt_FromLong((long)(int)getegid());/
/return PyInt_FromLong((long)geteuid());/s//return PyInt_FromLong((long)(int)geteuid());/
/return PyInt_FromLong((long)getgid());/s//return PyInt_FromLong((long)(int)getgid());/
-/^posix_getgroups/-1i
-#include <pwd.h>
-int getgrouplist_2(const char *name, gid_t basegid, gid_t **groups);
-
-.
-/gid_t grouplist\[MAX_GROUPS\];/c
- gid_t *grouplist = NULL;
- struct passwd *pw;
-.
-/n = getgroups(MAX_GROUPS, grouplist);/c
- if ((pw = getpwuid(getuid())) == NULL) {
- errno = EINVAL;
- posix_error();
- return NULL;
- }
- n = getgrouplist_2(pw->pw_name, pw->pw_gid, &grouplist);
-.
-/if (n < 0)/c
- if (n < 0) {
- errno = EINVAL;
-.
-/return result;/i
- if (grouplist) free(grouplist);
-.
+/PyInt_FromLong((long)alt_grouplist\[i\]);/s//PyInt_FromLong((long)(int)alt_grouplist[i]);/
/return PyInt_FromLong((long)getuid());/s//return PyInt_FromLong((long)(int)getuid());/
/^posix_setgroups/a
.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20121022/6b57f0e2/attachment.html>
More information about the macports-changes
mailing list