From 6a16292fe61e6ee01895d1d9e99bf5fc92b869bb Mon Sep 17 00:00:00 2001 From: Michal Zidek Date: Wed, 9 Jan 2013 20:30:58 +0100 Subject: tools: Respect use_fully_qualified_names Tools for LOCAL domain should require FQDN if option 'use_fuly_quallified_names = TRUE' was configured. https://fedorahosted.org/sssd/ticket/1746 --- src/tools/tools_util.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/tools') diff --git a/src/tools/tools_util.c b/src/tools/tools_util.c index c27b88a1..0151400d 100644 --- a/src/tools/tools_util.c +++ b/src/tools/tools_util.c @@ -180,6 +180,15 @@ int parse_name_domain(struct tools_ctx *tctx, DEBUG(1, ("Invalid domain %s specified in FQDN\n", domain)); return EINVAL; } + } else { + if (tctx->local->fqnames) { + DEBUG(SSSDBG_CRIT_FAILURE, + ("Name '%s' does not seem to be FQDN " + "('%s = TRUE' is set)\n", fullname, CONFDB_DOMAIN_FQ)); + ERROR("Name '%1$s' does not seem to be FQDN " + "('%2$s = TRUE' is set)\n", fullname, CONFDB_DOMAIN_FQ); + return EINVAL; + } } return EOK; -- cgit