- Fix compiler warnings for Solaris
- Use of PAM_MODULE_UNKNOWN broke pam_opensc for Sun based PAM implementations, fixed. git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@376 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
7400bb9ee3
commit
e9ee0ff146
|
@ -67,7 +67,7 @@ PAM_EXTERN int pam_sm_authenticate(pam_handle_t * pamh, int flags, int argc, con
|
|||
case 'h':
|
||||
case '?':
|
||||
usage();
|
||||
return PAM_MODULE_UNKNOWN;
|
||||
return PAM_MAXTRIES;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ int main(int argc, char **argv)
|
|||
rv = pam_sm_authenticate(pamh, flags, argc, (const char **) argv);
|
||||
fprintf(stderr, "[%02i] pam_sm_authenticate: %d\n", count, rv);
|
||||
}
|
||||
if (rv == PAM_MODULE_UNKNOWN) {
|
||||
if (rv == PAM_MAXTRIES) {
|
||||
pam_end(pamh, rv);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -1108,7 +1108,6 @@ static char * my_readline(char *prompt)
|
|||
static char buf[256];
|
||||
static int initialized;
|
||||
static int interactive;
|
||||
char *line;
|
||||
|
||||
if (!initialized) {
|
||||
initialized = 1;
|
||||
|
@ -1120,7 +1119,7 @@ static char * my_readline(char *prompt)
|
|||
}
|
||||
#ifdef HAVE_READLINE
|
||||
if (interactive) {
|
||||
line = readline(prompt);
|
||||
char *line = readline(prompt);
|
||||
if (line && strlen(line) > 2 )
|
||||
add_history(line);
|
||||
return line;
|
||||
|
|
|
@ -1890,7 +1890,7 @@ read_options_file(const char *filename)
|
|||
if (o->has_arg != no_argument) {
|
||||
optarg = strtok(NULL, "");
|
||||
if (optarg) {
|
||||
while (isspace(*optarg))
|
||||
while (isspace((int) *optarg))
|
||||
optarg++;
|
||||
optarg = strdup(optarg);
|
||||
}
|
||||
|
|
|
@ -1447,7 +1447,7 @@ next_word(char **cp)
|
|||
{
|
||||
char *p = *cp, *ret;
|
||||
|
||||
while (isspace(*p))
|
||||
while (isspace((int) *p))
|
||||
p++;
|
||||
|
||||
if (*p == '\0' || *p == '#') {
|
||||
|
@ -1467,7 +1467,7 @@ next_word(char **cp)
|
|||
}
|
||||
} else {
|
||||
ret = p;
|
||||
while (*p && !isspace(*p) && *p != '#')
|
||||
while (*p && !isspace((int) *p) && *p != '#')
|
||||
p++;
|
||||
}
|
||||
out:
|
||||
|
@ -1486,7 +1486,7 @@ get_authid(const char *value, unsigned int *type, unsigned int *num)
|
|||
char temp[16];
|
||||
int n;
|
||||
|
||||
if (isdigit(*value)) {
|
||||
if (isdigit((int) *value)) {
|
||||
*num = 0;
|
||||
return get_uint(value, type);
|
||||
}
|
||||
|
@ -1520,7 +1520,7 @@ get_uint(const char *value, unsigned int *vp)
|
|||
static int
|
||||
map_str2int(const char *value, unsigned int *vp, struct map *map)
|
||||
{
|
||||
if (isdigit(*value))
|
||||
if (isdigit((int) *value))
|
||||
return get_uint(value, vp);
|
||||
for (; map->name; map++) {
|
||||
if (!strcasecmp(value, map->name)) {
|
||||
|
|
Loading…
Reference in New Issue