ports/security/sssd/files/patch-src__providers__ldap__ldap_child.c
Rene Ladan 195affec9d security/sssd: update to 1.16.5
This fixes several security vulnerabilities and unexpires
the port because it moves to Python 3.

PR:		241347
Submitted by:	lukas.slebodnik@intrak.sk (initial patch)
MFH:		2020Q4
Security:	CVE-2018-16838
Security:	CVE-2019-3811
2020-11-17 20:42:16 +00:00

22 lines
833 B
C

diff --git src/providers/ldap/ldap_child.c src/providers/ldap/ldap_child.c
index 368bb91e1..1bc86ecb5 100644
--- src/providers/ldap/ldap_child.c
+++ src/providers/ldap/ldap_child.c
@@ -324,14 +324,14 @@ static krb5_error_code ldap_child_get_tgt_sync(TALLOC_CTX *memctx,
full_princ = talloc_strdup(tmp_ctx, princ_str);
}
} else {
- char hostname[HOST_NAME_MAX + 1];
+ char hostname[_POSIX_HOST_NAME_MAX + 1];
- ret = gethostname(hostname, sizeof(hostname));
+ ret = gethostname(hostname, _POSIX_HOST_NAME_MAX);
if (ret == -1) {
krberr = KRB5KRB_ERR_GENERIC;
goto done;
}
- hostname[HOST_NAME_MAX] = '\0';
+ hostname[_POSIX_HOST_NAME_MAX] = '\0';
DEBUG(SSSDBG_TRACE_LIBS, "got hostname: [%s]\n", hostname);