pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/security/openpam Add changes from NetBSD src that add ...
details: https://anonhg.NetBSD.org/pkgsrc/rev/7bd8d8a83d5e
branches: trunk
changeset: 538750:7bd8d8a83d5e
user: jlam <jlam%pkgsrc.org@localhost>
date: Mon Feb 18 18:22:18 2008 +0000
description:
Add changes from NetBSD src that add casts to fix warnings on platforms
where size_t is unsigned long.
diffstat:
security/openpam/distinfo | 11 +++++++++--
security/openpam/patches/patch-ab | 29 ++++++++++++++++++++++++++++-
security/openpam/patches/patch-ad | 13 +++++++++++++
security/openpam/patches/patch-ae | 13 +++++++++++++
security/openpam/patches/patch-af | 22 ++++++++++++++++++++++
security/openpam/patches/patch-ag | 31 +++++++++++++++++++++++++++++++
security/openpam/patches/patch-ah | 13 +++++++++++++
security/openpam/patches/patch-ai | 13 +++++++++++++
security/openpam/patches/patch-aj | 13 +++++++++++++
9 files changed, 155 insertions(+), 3 deletions(-)
diffs (205 lines):
diff -r 36a092df6e7f -r 7bd8d8a83d5e security/openpam/distinfo
--- a/security/openpam/distinfo Mon Feb 18 17:47:11 2008 +0000
+++ b/security/openpam/distinfo Mon Feb 18 18:22:18 2008 +0000
@@ -1,7 +1,14 @@
-$NetBSD: distinfo,v 1.6 2008/02/18 16:48:12 jlam Exp $
+$NetBSD: distinfo,v 1.7 2008/02/18 18:22:18 jlam Exp $
SHA1 (openpam-20071221.tar.gz) = 43d41fa4a86199077c4fe193c52c59365f4c317e
RMD160 (openpam-20071221.tar.gz) = cd8f7e94984693b0f892f226bfed6a3f9b24ec72
Size (openpam-20071221.tar.gz) = 396932 bytes
-SHA1 (patch-ab) = a3da5cc8629a3b0c99483f46ccc600c25a10a927
+SHA1 (patch-ab) = 8ade188799693e6d7c28f27faf060c645c5d97c5
SHA1 (patch-ac) = 72fb5ffb67edf9892e6c2db5485fdf51ea4b50ce
+SHA1 (patch-ad) = 08b0dbd2d84c4239ea898f137d2f0ed7f7476d74
+SHA1 (patch-ae) = 4f31bdde2cca94377c4e3ac8e4d42512764b3fac
+SHA1 (patch-af) = 1879c2450cd72152573248b60bdad056ad13a5e2
+SHA1 (patch-ag) = c46e5e2ce53765c5f593735bb0daf9cdf03eab13
+SHA1 (patch-ah) = 5cef165a6986e0146f75cc4aa4fe5c0adc2d5042
+SHA1 (patch-ai) = ebd22192a6b34161feac281ade41340493142e2b
+SHA1 (patch-aj) = f106a68e24fabae7353ea4480c75ba84097ec606
diff -r 36a092df6e7f -r 7bd8d8a83d5e security/openpam/patches/patch-ab
--- a/security/openpam/patches/patch-ab Mon Feb 18 17:47:11 2008 +0000
+++ b/security/openpam/patches/patch-ab Mon Feb 18 18:22:18 2008 +0000
@@ -1,7 +1,34 @@
-$NetBSD: patch-ab,v 1.2 2008/02/18 16:48:12 jlam Exp $
+$NetBSD: patch-ab,v 1.3 2008/02/18 18:22:18 jlam Exp $
--- lib/openpam_configure.c.orig 2007-12-21 06:36:24.000000000 -0500
+++ lib/openpam_configure.c
+@@ -70,7 +70,7 @@ static int
+ match_word(const char *str, const char *word)
+ {
+
+- while (*str && tolower(*str) == tolower(*word))
++ while (*str && tolower((unsigned char)*str) == tolower((unsigned char)*word))
+ ++str, ++word;
+ return (*str == ' ' && *word == '\0');
+ }
+@@ -194,7 +194,7 @@ openpam_read_chain(pam_handle_t *pamh,
+ }
+
+ /* allocate new entry */
+- if ((this = calloc(1, sizeof *this)) == NULL)
++ if ((this = calloc((size_t)1, sizeof *this)) == NULL)
+ goto syserr;
+
+ /* control flag */
+@@ -230,7 +230,7 @@ openpam_read_chain(pam_handle_t *pamh,
+ ++this->optc;
+ q = next_word(q);
+ }
+- this->optv = calloc(this->optc + 1, sizeof(char *));
++ this->optv = calloc((size_t)(this->optc + 1), sizeof(char *));
+ if (this->optv == NULL)
+ goto syserr;
+ for (i = 0; i < this->optc; ++i) {
@@ -263,11 +263,13 @@ openpam_read_chain(pam_handle_t *pamh,
return (-1);
}
diff -r 36a092df6e7f -r 7bd8d8a83d5e security/openpam/patches/patch-ad
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openpam/patches/patch-ad Mon Feb 18 18:22:18 2008 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ad,v 1.1 2008/02/18 18:22:18 jlam Exp $
+
+--- lib/Makefile.am.orig 2007-06-03 16:26:18.000000000 -0400
++++ lib/Makefile.am
+@@ -52,8 +52,6 @@ libpam_la_SOURCES = \
+ pam_vprompt.c \
+ $(NULL)
+
+-libpam_la_CFLAGS = -DOPENPAM_MODULES_DIR='"@OPENPAM_MODULES_DIR@/"'
+-
+ libpam_la_LDFLAGS = -no-undefined -version-info @LIB_MAJ@ @DL_LIBS@
+
+ EXTRA_DIST = \
diff -r 36a092df6e7f -r 7bd8d8a83d5e security/openpam/patches/patch-ae
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openpam/patches/patch-ae Mon Feb 18 18:22:18 2008 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ae,v 1.1 2008/02/18 18:22:18 jlam Exp $
+
+--- lib/openpam_borrow_cred.c.orig 2007-12-21 06:36:24.000000000 -0500
++++ lib/openpam_borrow_cred.c
+@@ -73,7 +73,7 @@ openpam_borrow_cred(pam_handle_t *pamh,
+ (int)geteuid());
+ RETURNC(PAM_PERM_DENIED);
+ }
+- scred = calloc(1, sizeof *scred);
++ scred = calloc((size_t)1, sizeof *scred);
+ if (scred == NULL)
+ RETURNC(PAM_BUF_ERR);
+ scred->euid = geteuid();
diff -r 36a092df6e7f -r 7bd8d8a83d5e security/openpam/patches/patch-af
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openpam/patches/patch-af Mon Feb 18 18:22:18 2008 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-af,v 1.1 2008/02/18 18:22:18 jlam Exp $
+
+--- lib/openpam_dynamic.c.orig 2007-12-21 06:36:24.000000000 -0500
++++ lib/openpam_dynamic.c
+@@ -64,7 +64,7 @@ openpam_dynamic(const char *path)
+ int i;
+
+ dlh = NULL;
+- if ((module = calloc(1, sizeof *module)) == NULL)
++ if ((module = calloc((size_t)1, sizeof *module)) == NULL)
+ goto buf_err;
+
+ /* Prepend the standard prefix if not an absolute pathname. */
+@@ -74,7 +74,7 @@ openpam_dynamic(const char *path)
+ prefix = "";
+
+ /* try versioned module first, then unversioned module */
+- if (asprintf(&vpath, "%s%s.%d", prefix, path, LIB_MAJ) < 0)
++ if (asprintf(&vpath, "%s/%s.%d", prefix, path, LIB_MAJ) < 0)
+ goto buf_err;
+ if ((dlh = dlopen(vpath, RTLD_NOW)) == NULL) {
+ openpam_log(PAM_LOG_DEBUG, "%s: %s", vpath, dlerror());
diff -r 36a092df6e7f -r 7bd8d8a83d5e security/openpam/patches/patch-ag
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openpam/patches/patch-ag Mon Feb 18 18:22:18 2008 +0000
@@ -0,0 +1,31 @@
+$NetBSD: patch-ag,v 1.1 2008/02/18 18:22:18 jlam Exp $
+
+--- lib/openpam_readline.c.orig 2007-12-21 06:36:24.000000000 -0500
++++ lib/openpam_readline.c
+@@ -57,7 +57,7 @@ openpam_readline(FILE *f, int *lineno, s
+ size_t len, size;
+ int ch;
+
+- if ((line = malloc(MIN_LINE_LENGTH)) == NULL)
++ if ((line = malloc((size_t)MIN_LINE_LENGTH)) == NULL)
+ return (NULL);
+ size = MIN_LINE_LENGTH;
+ len = 0;
+@@ -84,7 +84,7 @@ openpam_readline(FILE *f, int *lineno, s
+ /* eof */
+ if (ch == EOF) {
+ /* remove trailing whitespace */
+- while (len > 0 && isspace((int)line[len - 1]))
++ while (len > 0 && isspace((unsigned char)line[len - 1]))
+ --len;
+ line[len] = '\0';
+ if (len == 0)
+@@ -97,7 +97,7 @@ openpam_readline(FILE *f, int *lineno, s
+ ++*lineno;
+
+ /* remove trailing whitespace */
+- while (len > 0 && isspace((int)line[len - 1]))
++ while (len > 0 && isspace((unsigned char)line[len - 1]))
+ --len;
+ line[len] = '\0';
+ /* skip blank lines */
diff -r 36a092df6e7f -r 7bd8d8a83d5e security/openpam/patches/patch-ah
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openpam/patches/patch-ah Mon Feb 18 18:22:18 2008 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ah,v 1.1 2008/02/18 18:22:18 jlam Exp $
+
+--- lib/pam_putenv.c.orig 2007-12-21 06:36:24.000000000 -0500
++++ lib/pam_putenv.c
+@@ -65,7 +65,7 @@ pam_putenv(pam_handle_t *pamh,
+ RETURNC(PAM_SYSTEM_ERR);
+
+ /* see if the variable is already in the environment */
+- if ((i = openpam_findenv(pamh, namevalue, p - namevalue)) >= 0) {
++ if ((i = openpam_findenv(pamh, namevalue, (size_t)(p - namevalue))) >= 0) {
+ if ((p = strdup(namevalue)) == NULL)
+ RETURNC(PAM_BUF_ERR);
+ FREE(pamh->env[i]);
diff -r 36a092df6e7f -r 7bd8d8a83d5e security/openpam/patches/patch-ai
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openpam/patches/patch-ai Mon Feb 18 18:22:18 2008 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-ai,v 1.1 2008/02/18 18:22:18 jlam Exp $
+
+--- lib/pam_start.c.orig 2007-12-21 06:36:24.000000000 -0500
++++ lib/pam_start.c
+@@ -58,7 +58,7 @@ pam_start(const char *service,
+ int r;
+
+ ENTER();
+- if ((ph = calloc(1, sizeof *ph)) == NULL)
++ if ((ph = calloc((size_t)1, sizeof *ph)) == NULL)
+ RETURNC(PAM_BUF_ERR);
+ if ((r = pam_set_item(ph, PAM_SERVICE, service)) != PAM_SUCCESS)
+ goto fail;
diff -r 36a092df6e7f -r 7bd8d8a83d5e security/openpam/patches/patch-aj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/security/openpam/patches/patch-aj Mon Feb 18 18:22:18 2008 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-aj,v 1.1 2008/02/18 18:22:18 jlam Exp $
+
+--- lib/pam_vprompt.c.orig 2007-12-21 06:36:24.000000000 -0500
++++ lib/pam_vprompt.c
+@@ -73,7 +73,7 @@ pam_vprompt(const pam_handle_t *pamh,
+ openpam_log(PAM_LOG_ERROR, "no conversation function");
+ RETURNC(PAM_SYSTEM_ERR);
+ }
+- vsnprintf(msgbuf, PAM_MAX_MSG_SIZE, fmt, ap);
++ vsnprintf(msgbuf, (size_t)PAM_MAX_MSG_SIZE, fmt, ap);
+ msg.msg_style = style;
+ msg.msg = msgbuf;
+ msgp = &msg;
Home |
Main Index |
Thread Index |
Old Index