diff options
Diffstat (limited to 'security/sssd/files/patch-src__providers__ldap__sdap_access.c')
-rw-r--r-- | security/sssd/files/patch-src__providers__ldap__sdap_access.c | 42 |
1 files changed, 28 insertions, 14 deletions
diff --git a/security/sssd/files/patch-src__providers__ldap__sdap_access.c b/security/sssd/files/patch-src__providers__ldap__sdap_access.c index 07fa6a501e35..5b9e5efc1e1e 100644 --- a/security/sssd/files/patch-src__providers__ldap__sdap_access.c +++ b/security/sssd/files/patch-src__providers__ldap__sdap_access.c @@ -1,19 +1,9 @@ ---- src/providers/ldap/sdap_access.c.orig 2014-09-17 13:01:37 UTC +diff --git src/providers/ldap/sdap_access.c src/providers/ldap/sdap_access.c +index dd04ec512..58a3766fc 100644 +--- src/providers/ldap/sdap_access.c +++ src/providers/ldap/sdap_access.c -@@ -499,6 +499,7 @@ static bool nds_check_expired(const char *exp_time_str - return true; - } +@@ -562,9 +562,9 @@ bool nds_check_expired(const char *exp_time_str) -+ tzset(); - expire_time = mktime(&tm); - if (expire_time == -1) { - DEBUG(SSSDBG_CRIT_FAILURE, -@@ -506,13 +507,11 @@ static bool nds_check_expired(const char *exp_time_str - return true; - } - -- tzset(); -- expire_time -= timezone; now = time(NULL); DEBUG(SSSDBG_TRACE_ALL, - "Time info: tzname[0] [%s] tzname[1] [%s] timezone [%ld] " @@ -25,3 +15,27 @@ if (difftime(now, expire_time) > 0.0) { DEBUG(SSSDBG_CONF_SETTINGS, "NDS account expired.\n"); +@@ -1247,7 +1247,7 @@ static errno_t sdap_access_host(struct ldb_message *user_entry) + struct ldb_message_element *el; + unsigned int i; + char *host; +- char hostname[HOST_NAME_MAX + 1]; ++ char hostname[_POSIX_HOST_NAME_MAX + 1]; + + el = ldb_msg_find_element(user_entry, SYSDB_AUTHORIZED_HOST); + if (!el || el->num_values == 0) { +@@ -1255,12 +1255,12 @@ static errno_t sdap_access_host(struct ldb_message *user_entry) + return ERR_ACCESS_DENIED; + } + +- if (gethostname(hostname, sizeof(hostname)) == -1) { ++ if (gethostname(hostname, _POSIX_HOST_NAME_MAX) == -1) { + DEBUG(SSSDBG_CRIT_FAILURE, + "Unable to get system hostname. Access denied\n"); + return ERR_ACCESS_DENIED; + } +- hostname[HOST_NAME_MAX] = '\0'; ++ hostname[_POSIX_HOST_NAME_MAX] = '\0'; + + /* FIXME: PADL's pam_ldap also calls gethostbyname() on the hostname + * in some attempt to get aliases and/or FQDN for the machine. |