diff options
author | Steve Langasek <steve.langasek@ubuntu.com> | 2019-01-03 21:23:37 -0800 |
---|---|---|
committer | Steve Langasek <vorlon@debian.org> | 2019-01-08 22:11:51 -0800 |
commit | 7e6c4749370338c9af7e1b959f8ab96d089786d6 (patch) | |
tree | 2da5e702d7da7b222237ea5ac71e208dd70791a6 /modules/pam_access/pam_access.c | |
parent | fa4960114fc50965a9696f2db7406a9d792e3ff8 (diff) | |
parent | 795badba7f95e737f979917859cd32c9bd47bcad (diff) | |
download | pam-7e6c4749370338c9af7e1b959f8ab96d089786d6.tar.gz pam-7e6c4749370338c9af7e1b959f8ab96d089786d6.tar.bz2 pam-7e6c4749370338c9af7e1b959f8ab96d089786d6.zip |
Merge upstream version 1.1.8
Diffstat (limited to 'modules/pam_access/pam_access.c')
-rw-r--r-- | modules/pam_access/pam_access.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/pam_access/pam_access.c b/modules/pam_access/pam_access.c index 2669a5ec..a9cce510 100644 --- a/modules/pam_access/pam_access.c +++ b/modules/pam_access/pam_access.c @@ -100,7 +100,7 @@ struct login_info { const char *from; const char *config_file; const char *hostname; - int debug; /* Print debugging messages. */ + int debug; /* Print debugging messages. */ int only_new_group_syntax; /* Only allow group entries of the form "(xyz)" */ int noaudit; /* Do not audit denials */ const char *fs; /* field separator */ @@ -375,7 +375,7 @@ login_access (pam_handle_t *pamh, struct login_info *item) /* Allow field seperator in last field of froms */ if (!(perm = strtok_r(line, item->fs, &sptr)) || !(users = strtok_r(NULL, item->fs, &sptr)) - || !(froms = strtok_r(NULL, "\n", &sptr))) { + || !(froms = strtok_r(NULL, "\n", &sptr))) { pam_syslog(pamh, LOG_ERR, "%s: line %d: bad field count", item->config_file, lineno); continue; @@ -398,8 +398,8 @@ login_access (pam_handle_t *pamh, struct login_info *item) nonall_match = YES; } if (item->debug) - pam_syslog (pamh, LOG_DEBUG, - "from_match=%d, \"%s\"", match, item->from); + pam_syslog (pamh, LOG_DEBUG, + "from_match=%d, \"%s\"", match, item->from); } } (void) fclose(fp); @@ -471,9 +471,7 @@ netgroup_match (pam_handle_t *pamh, const char *netgroup, int retval; char *mydomain = NULL; -#ifdef HAVE_YP_GET_DEFAUTL_DOMAIN - yp_get_default_domain(&mydomain); -#elif defined(HAVE_GETDOMAINNAME) +#if defined(HAVE_GETDOMAINNAME) char domainname_res[256]; if (getdomainname (domainname_res, sizeof (domainname_res)) == 0) @@ -483,6 +481,8 @@ netgroup_match (pam_handle_t *pamh, const char *netgroup, mydomain = domainname_res; } } +#elif defined(HAVE_YP_GET_DEFAULT_DOMAIN) + yp_get_default_domain(&mydomain); #endif #ifdef HAVE_INNETGR |