From 38e16e3b39c4651b5c1108fc63b8f6c820a0ee74 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sun, 23 Jan 2022 14:07:43 +0000 Subject: [PATCH] ITS#9787 init global_host earlier so tools see it too --- servers/slapd/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/servers/slapd/main.c b/servers/slapd/main.c index 10440a4894..a9e69b01a1 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -275,6 +275,9 @@ int main( int argc, char **argv ) (void) ldap_pvt_tls_set_option( slap_tls_ld, LDAP_OPT_X_TLS_REQUIRE_CERT, &rc ); #endif + global_host = ldap_pvt_get_fqdn( NULL ); + ber_str2bv( global_host, 0, 0, &global_host_bv ); + serverName = lutil_progname( "slapd", argc, argv ); if ( strcmp( serverName, "slapd" ) ) { @@ -614,9 +617,6 @@ unhandled_option:; Debug( LDAP_DEBUG_ANY, "%s", Versionstr ); - global_host = ldap_pvt_get_fqdn( NULL ); - ber_str2bv( global_host, 0, 0, &global_host_bv ); - if( check == CHECK_NONE && slapd_daemon_init( urls ) != 0 ) { rc = 1; SERVICE_EXIT( ERROR_SERVICE_SPECIFIC_ERROR, 16 ); -- 2.47.3