diff options
author | jlam <jlam@pkgsrc.org> | 2008-02-18 18:22:18 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2008-02-18 18:22:18 +0000 |
commit | 308358567572ca70e5c5463e9a893c316ed27faa (patch) | |
tree | 9025a0ec1675f3f22b3c956f4aa013690a1ed126 /security | |
parent | 0afe1c6f11ee5b9a1d1ad2348ea6459911f17621 (diff) | |
download | pkgsrc-308358567572ca70e5c5463e9a893c316ed27faa.tar.gz |
Add changes from NetBSD src that add casts to fix warnings on platforms
where size_t is unsigned long.
Diffstat (limited to 'security')
-rw-r--r-- | security/openpam/distinfo | 11 | ||||
-rw-r--r-- | security/openpam/patches/patch-ab | 29 | ||||
-rw-r--r-- | security/openpam/patches/patch-ad | 13 | ||||
-rw-r--r-- | security/openpam/patches/patch-ae | 13 | ||||
-rw-r--r-- | security/openpam/patches/patch-af | 22 | ||||
-rw-r--r-- | security/openpam/patches/patch-ag | 31 | ||||
-rw-r--r-- | security/openpam/patches/patch-ah | 13 | ||||
-rw-r--r-- | security/openpam/patches/patch-ai | 13 | ||||
-rw-r--r-- | security/openpam/patches/patch-aj | 13 |
9 files changed, 155 insertions, 3 deletions
diff --git a/security/openpam/distinfo b/security/openpam/distinfo index 8ab3271aaa7..8c3475797ca 100644 --- a/security/openpam/distinfo +++ b/security/openpam/distinfo @@ -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 --git a/security/openpam/patches/patch-ab b/security/openpam/patches/patch-ab index 023ae22ce0b..08b053bf302 100644 --- a/security/openpam/patches/patch-ab +++ b/security/openpam/patches/patch-ab @@ -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 --git a/security/openpam/patches/patch-ad b/security/openpam/patches/patch-ad new file mode 100644 index 00000000000..57b4e58de2f --- /dev/null +++ b/security/openpam/patches/patch-ad @@ -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 --git a/security/openpam/patches/patch-ae b/security/openpam/patches/patch-ae new file mode 100644 index 00000000000..04b165a74c7 --- /dev/null +++ b/security/openpam/patches/patch-ae @@ -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 --git a/security/openpam/patches/patch-af b/security/openpam/patches/patch-af new file mode 100644 index 00000000000..360b67cf227 --- /dev/null +++ b/security/openpam/patches/patch-af @@ -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 --git a/security/openpam/patches/patch-ag b/security/openpam/patches/patch-ag new file mode 100644 index 00000000000..d3fb0ea14e0 --- /dev/null +++ b/security/openpam/patches/patch-ag @@ -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 --git a/security/openpam/patches/patch-ah b/security/openpam/patches/patch-ah new file mode 100644 index 00000000000..b75a5e740a2 --- /dev/null +++ b/security/openpam/patches/patch-ah @@ -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 --git a/security/openpam/patches/patch-ai b/security/openpam/patches/patch-ai new file mode 100644 index 00000000000..b43d91e3ec6 --- /dev/null +++ b/security/openpam/patches/patch-ai @@ -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 --git a/security/openpam/patches/patch-aj b/security/openpam/patches/patch-aj new file mode 100644 index 00000000000..7d0e8a2bfb1 --- /dev/null +++ b/security/openpam/patches/patch-aj @@ -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; |