sysdb_subdomains.c revision 09d7c105839bfc7447ea0f766413ed86675ca075
/*
SSSD
System Database - Sub-domain related calls
Copyright (C) 2012 Jan Zeleny <jzeleny@redhat.com>
Copyright (C) 2012 Sumit Bose <sbose@redhat.com>
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "db/sysdb_private.h"
{
int i;
struct ldb_result *res;
const char *attrs[] = {"cn",
NULL};
struct sss_domain_info *dom;
goto done;
}
goto done;
}
if (ret != LDB_SUCCESS) {
goto done;
}
/* disable all domains,
* let the search result refresh any that are still valid */
}
goto done;
}
const char *name;
const char *realm;
const char *flat;
const char *id;
("The object [%s] doesn't have a name\n",
goto done;
}
/* explicitly use dom->next as we need to check 'disabled' domains */
/* in theory these may change, but it should never happen */
("Realm name changed from [%s] to [%s]!\n",
goto done;
}
}
("Flat name changed from [%s] to [%s]!\n",
goto done;
}
}
("Domain changed from [%s] to [%s]!\n",
goto done;
}
}
break;
}
}
/* If not found in loop it is a new subdomain */
goto done;
}
}
}
done:
return ret;
}
{
const char *tmp_str;
struct ldb_result *res;
const char *attrs[] = {"cn",
NULL};
return ENOMEM;
}
goto done;
}
if (ret != LDB_SUCCESS) {
goto done;
}
goto done;
}
goto done;
}
NULL);
goto done;
}
}
NULL);
goto done;
}
}
NULL);
goto done;
}
}
done:
return ret;
}
const char *id)
{
struct ldb_message *msg;
int ret;
bool do_update = false;
return ENOMEM;
}
goto done;
}
goto done;
}
goto done;
}
if (ret != LDB_SUCCESS) {
goto done;
}
if (ret != LDB_SUCCESS) {
goto done;
}
do_update = true;
}
if (ret != LDB_SUCCESS) {
goto done;
}
if (ret != LDB_SUCCESS) {
goto done;
}
do_update = true;
}
if (ret != LDB_SUCCESS) {
goto done;
}
if (ret != LDB_SUCCESS) {
goto done;
}
do_update = true;
}
if (do_update == false) {
goto done;
}
if (ret != LDB_SUCCESS) {
goto done;
}
done:
return ret;
}
bool mpg)
{
struct ldb_message *msg;
struct ldb_result *res;
const char *attrs[] = {"cn",
NULL};
const char *tmp_str;
bool tmp_bool;
bool store = false;
int realm_flags = 0;
int flat_flags = 0;
int id_flags = 0;
int mpg_flags = 0;
int ret;
return ENOMEM;
}
goto done;
}
if (ret != LDB_SUCCESS) {
goto done;
}
if (ret) {
goto done;
}
store = true;
goto done;
} else { /* 1 found */
if (realm) {
}
}
if (flat_name) {
}
}
if (domain_id) {
}
}
!mpg);
}
}
&& mpg_flags == 0) {
goto done;
}
goto done;
}
if (store) {
if (ret != LDB_SUCCESS) {
goto done;
}
if (ret != LDB_SUCCESS) {
goto done;
}
}
if (realm_flags) {
if (ret != LDB_SUCCESS) {
goto done;
}
if (ret != LDB_SUCCESS) {
goto done;
}
}
if (flat_flags) {
if (ret != LDB_SUCCESS) {
goto done;
}
if (ret != LDB_SUCCESS) {
goto done;
}
}
if (id_flags) {
if (ret != LDB_SUCCESS) {
goto done;
}
if (ret != LDB_SUCCESS) {
goto done;
}
}
if (mpg_flags) {
if (ret != LDB_SUCCESS) {
goto done;
}
if (ret != LDB_SUCCESS) {
goto done;
}
}
if (ret != LDB_SUCCESS) {
goto done;
}
done:
return ret;
}
{
int ret;
goto done;
}
goto done;
}
goto done;
}
done:
return ret;
}