diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-python/pypam/files/PyPAM-0.5.0-nofree.patch | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-python/pypam/files/PyPAM-0.5.0-nofree.patch')
-rw-r--r-- | dev-python/pypam/files/PyPAM-0.5.0-nofree.patch | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/dev-python/pypam/files/PyPAM-0.5.0-nofree.patch b/dev-python/pypam/files/PyPAM-0.5.0-nofree.patch new file mode 100644 index 000000000000..f27e9d543d06 --- /dev/null +++ b/dev-python/pypam/files/PyPAM-0.5.0-nofree.patch @@ -0,0 +1,60 @@ +diff --git a/PAMmodule.c b/PAMmodule.c +index 03cb799..a7ff8a5 100644 +--- a/PAMmodule.c ++++ b/PAMmodule.c +@@ -24,8 +24,6 @@ typedef struct { + char *service; + char *user; + PyObject *callback; +- struct pam_response *response_data; +- int response_len; + PyObject *user_data; + void *dlh1, *dlh2; + } PyPAMObject; +@@ -54,15 +52,6 @@ static int PyPAM_conv(int num_msg, const struct pam_message **msg, + + Py_INCREF(self); + +- if (NULL != self->response_data) { +- for (int i = 0; i < self->response_len; i++) { +- free(self->response_data[0].resp); +- } +- free(self->response_data); +- self->response_data = NULL; +- self->response_len = 0; +- } +- + PyObject* msgList = PyList_New(num_msg); + + for (int i = 0; i < num_msg; i++) { +@@ -92,6 +81,10 @@ static int PyPAM_conv(int num_msg, const struct pam_message **msg, + char* resp_text; + int resp_retcode = 0; + if (!PyArg_ParseTuple(respTuple, "si", &resp_text, &resp_retcode)) { ++ while (i > 0) { ++ free((--spr)->resp); ++ --i; ++ } + free(*resp); + Py_DECREF(respList); + return PAM_CONV_ERR; +@@ -100,10 +93,6 @@ static int PyPAM_conv(int num_msg, const struct pam_message **msg, + spr->resp_retcode = resp_retcode; + Py_DECREF(respTuple); + } +- +- // Save this so we can free it later. +- self->response_data = *resp; +- self->response_len = PyList_Size(respList); + + Py_DECREF(respList); + +@@ -144,8 +133,6 @@ static PyObject * PyPAM_pam(PyObject *self, PyObject *args) + p->user = NULL; + Py_INCREF(Py_None); + p->callback = Py_None; +- p->response_data = NULL; +- p->response_len = 0; + Py_INCREF(Py_None); + p->user_data = Py_None; + |