/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <locale.h>
#include <unistd.h>
#include <string.h>
#include <time.h>
#include "nscd_common.h"
#include "nscd_config.h"
#include "nscd_log.h"
#include "nscd_switch.h"
#include "nscd_frontend.h"
void
{
(void) mutex_lock(&time_mutex);
(void) mutex_unlock(&time_mutex);
}
{
return (start_time);
}
char *cfgfile)
{
/*
* remember when main or forker nscd starts.
*/
/*
* allocate the space for tables
*/
return (rc);
/*
* allocate the space for local configuration
* and statistics
*/
return (rc);
/*
* Create and init the internal address database to keep
* track of the memory allocated by _nscd_alloc
*/
if (_nscd_create_int_addrDB() == NULL) {
(me, "_nscd_create_int_addrDB failed\n");
return (NSCD_NO_MEMORY);
}
/*
* Create and init the internal context database to keep
* track of the getent context currently being used
*/
if (_nscd_create_getent_ctxDB() == NULL) {
(me, "_nscd_create_getent_ctx_addrDB failed\n");
return (NSCD_NO_MEMORY);
}
/*
* Create the backend info database for each possible source
*/
(me, "_nscd_init_all_nsw_be_info_db failed (rc = %d)\n",
rc);
return (rc);
}
/*
* Create the nscd_nsw_config_t for each possible nss database
*/
return (rc);
}
/*
*/
if (rc != NSCD_SUCCESS) {
return (rc);
}
/*
* read in the nsswitch configuration
*/
if (rc != NSCD_SUCCESS) {
(void) printf(
gettext("reading config file %s failed with rc = %d, %s\n"),
return (rc);
}
/*
* remember which version of /etc/nsswitch.conf that was read
*/
/*
* read in the nscd configuration
*/
return (NSCD_CFG_FILE_ACCESS_ERROR);
}
}
if (rc != NSCD_SUCCESS) {
(void) printf(
gettext("reading config file %s failed with rc = %d, %s\n"),
(me, "unable to read configuration from %s (rc = %d)\n",
return (rc);
}
/*
* remember the name of the config file
* in case refresh is requested later
*/
if (cfgfile_save == NULL)
return (NSCD_NO_MEMORY);
}
return (NSCD_SUCCESS);
}
{
char *cfgfile;
/*
* re-read the nscd configuration
*/
if (cfgfile_save == NULL)
else
"unable to read the config file %s (rc = %d), %s\n",
goto error_exit;
}
if (rc != NSCD_SUCCESS) {
"unable to parse the config file %s (rc = %d), %s\n",
goto error_exit;
}
(me, "nscd configuration refreshed successfully\n");
return (NSCD_SUCCESS);
return (rc);
}