summaryrefslogtreecommitdiff
path: root/modules/pam_access/pam_access.c
diff options
context:
space:
mode:
Diffstat (limited to 'modules/pam_access/pam_access.c')
-rw-r--r--modules/pam_access/pam_access.c14
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