freebsd-ports/security/sssd/files/patch-src__providers__ipa__ipa_common.c
Ryan Steinmetz 2e567b748d New port: security/sssd
sssd integrates the functionality of pam_krb5 and pam_ldap/nss_ldap
with caching and additional features.

This project provides a set of daemons to manage access to remote
directories and authentication mechanisms, it provides an NSS and
PAM interface toward the system and a pluggable backend system to
connect to multiple different account sources. It is also the
basis to provide client auditing and policy services for projects
like FreeIPA.  sssd also features caching, which can allow for
offline use to assist laptop users.

WWW: https://fedorahosted.org/sssd/

PR:		ports/161555
Submitted by:	Andrew Elble <aweits@rit.edu>
2011-10-15 02:13:20 +00:00

28 lines
1.1 KiB
C

--- ./src/providers/ipa/ipa_common.c.orig 2011-08-29 11:39:05.000000000 -0400
+++ ./src/providers/ipa/ipa_common.c 2011-10-13 12:15:03.000000000 -0400
@@ -191,7 +191,7 @@
char *ipa_hostname;
int ret;
int i;
- char hostname[HOST_NAME_MAX + 1];
+ char hostname[_POSIX_HOST_NAME_MAX + 1];
opts = talloc_zero(memctx, struct ipa_options);
if (!opts) return ENOMEM;
@@ -220,14 +220,14 @@
ipa_hostname = dp_opt_get_string(opts->basic, IPA_HOSTNAME);
if (ipa_hostname == NULL) {
- ret = gethostname(hostname, HOST_NAME_MAX);
+ ret = gethostname(hostname, _POSIX_HOST_NAME_MAX);
if (ret != EOK) {
DEBUG(1, ("gethostname failed [%d][%s].\n", errno,
strerror(errno)));
ret = errno;
goto done;
}
- hostname[HOST_NAME_MAX] = '\0';
+ hostname[_POSIX_HOST_NAME_MAX] = '\0';
DEBUG(9, ("Setting ipa_hostname to [%s].\n", hostname));
ret = dp_opt_set_string(opts->basic, IPA_HOSTNAME, hostname);
if (ret != EOK) {