From ad4e495fa434f72de37846704cb08bacac3c52da Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Mon, 15 Jun 2009 10:54:09 -0400 Subject: Create gettext framework for SSSD daemon --- server/tools/tools_util.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'server/tools/tools_util.c') diff --git a/server/tools/tools_util.c b/server/tools/tools_util.c index 0f093cb..15665d3 100644 --- a/server/tools/tools_util.c +++ b/server/tools/tools_util.c @@ -228,3 +228,23 @@ int parse_groups(TALLOC_CTX *mem_ctx, const char *optstr, char ***_out) return EOK; } +int init_sss_tools(struct tools_ctx **ctx) +{ + int ret; + /* Set up LOCALE */ + setlocale (LC_ALL, ""); + bindtextdomain (PACKAGE, LOCALEDIR); + textdomain (PACKAGE); + + /* Connect to the database */ + ret = setup_db(ctx); + if (ret != EOK) { + DEBUG(0, ("Could not set up database\n")); + ret = EXIT_FAILURE; + goto fini; + } + + ret = EOK; +fini: + return ret; +} -- cgit