diff options
author | Thorsten Kukuk <kukuk@thkukuk.de> | 2004-09-24 09:18:21 +0000 |
---|---|---|
committer | Thorsten Kukuk <kukuk@thkukuk.de> | 2004-09-24 09:18:21 +0000 |
commit | 128ded83a0d1d3b5a85b4c20a6c35d9481e23ce5 (patch) | |
tree | fdd298658b3808d85fe99fab062b911c9f2aeee6 /modules/pam_limits | |
parent | c485b54636a6d93bdc9c9d82051db97d7dd53c71 (diff) | |
download | pam-128ded83a0d1d3b5a85b4c20a6c35d9481e23ce5.tar.gz pam-128ded83a0d1d3b5a85b4c20a6c35d9481e23ce5.tar.bz2 pam-128ded83a0d1d3b5a85b4c20a6c35d9481e23ce5.zip |
Relevant BUGIDs:
Purpose of commit:
Commit summary:
---------------
bugfix: Fix lot of compiler warnings
new feature: add broken_shadow option to pam_unix (patch from Linux
distributions)
Diffstat (limited to 'modules/pam_limits')
-rw-r--r-- | modules/pam_limits/pam_limits.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/modules/pam_limits/pam_limits.c b/modules/pam_limits/pam_limits.c index 0d7f2185..536446bd 100644 --- a/modules/pam_limits/pam_limits.c +++ b/modules/pam_limits/pam_limits.c @@ -311,7 +311,7 @@ static void process_limit(int source, const char *lim_type, int limit_item; int limit_type = 0; long limit_value; - const char **endptr = &lim_value; + char *endptr; const char *value_orig = lim_value; if (ctrl & PAM_DEBUG_ARG) @@ -367,14 +367,10 @@ static void process_limit(int source, const char *lim_type, return; } - /* - * there is a warning here because the library prototype for this - * function is incorrect. - */ - limit_value = strtol(lim_value, endptr, 10); + limit_value = strtol (lim_value, &endptr, 10); /* special case value when limiting logins */ - if (limit_value == 0 && value_orig == *endptr) { /* no chars read */ + if (limit_value == 0 && value_orig == endptr) { /* no chars read */ if (strcmp(lim_value,"-") != 0) { _pam_log(LOG_DEBUG,"wrong limit value '%s'", lim_value); return; |