From 7fcf0cda4797133807a67fab4c5b46c09f2f0452 Mon Sep 17 00:00:00 2001 From: Thorsten Kukuk Date: Wed, 29 Aug 2007 14:51:23 +0000 Subject: [PATCH] Relevant BUGIDs: Purpose of commit: bugfix Commit summary: --------------- 2007-08-29 Thorsten Kukuk * modules/pam_rhosts/pam_rhosts_auth.c: buflen needs to be size_t. (__icheckhost): Cast to int32_t to fix limited range error. * modules/pam_cracklib/pam_cracklib.c: Mark cracklib_dictpath as const. --- ChangeLog | 8 ++++++++ modules/pam_cracklib/pam_cracklib.c | 2 +- modules/pam_rhosts/pam_rhosts_auth.c | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index b3a00aed..91a17c13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-08-29 Thorsten Kukuk + + * modules/pam_rhosts/pam_rhosts_auth.c: buflen needs to be size_t. + (__icheckhost): Cast to int32_t to fix limited range error. + + * modules/pam_cracklib/pam_cracklib.c: Mark cracklib_dictpath + as const. + 2007-08-29 Steve Langasek * modules/pam_rhosts/pam_rhosts_auth.c: getline returns -1 at diff --git a/modules/pam_cracklib/pam_cracklib.c b/modules/pam_cracklib/pam_cracklib.c index 663c80dd..14fa24e0 100644 --- a/modules/pam_cracklib/pam_cracklib.c +++ b/modules/pam_cracklib/pam_cracklib.c @@ -99,7 +99,7 @@ struct cracklib_options { int min_class; int use_authtok; char prompt_type[BUFSIZ]; - char *cracklib_dictpath; + const char *cracklib_dictpath; }; #define CO_RETRY_TIMES 1 diff --git a/modules/pam_rhosts/pam_rhosts_auth.c b/modules/pam_rhosts/pam_rhosts_auth.c index a798c1f0..48fdeced 100644 --- a/modules/pam_rhosts/pam_rhosts_auth.c +++ b/modules/pam_rhosts/pam_rhosts_auth.c @@ -267,7 +267,7 @@ __icheckhost (pam_handle_t *pamh, struct _options *opts, u_int32_t raddr /* Try for raw ip address first. */ - if (isdigit(*lhost) && (long)(laddr = inet_addr(lhost)) != -1) + if (isdigit(*lhost) && (int32_t)(laddr = inet_addr(lhost) != -1)) return (negate*(! (raddr ^ laddr))); /* Better be a hostname. */ @@ -350,7 +350,7 @@ __ivaliduser (pam_handle_t *pamh, struct _options *opts, int retval = 1; #ifdef HAVE_GETLINE char *buf=NULL; - int buflen=0; + size_t buflen=0; while (getline(&buf,&buflen,hostf) > 0) { #else -- 2.40.0