sysdb_subdomains.c revision c03b28a38b14fdb59f74864ae4dc56affe256508
842ae4bd224140319ae7feec1872b93dfd491143fielding System Database - Sub-domain related calls
842ae4bd224140319ae7feec1872b93dfd491143fielding Copyright (C) 2012 Jan Zeleny <jzeleny@redhat.com>
cc003103e52ff9d5fe9bed567ef9438613ab4fbfrse Copyright (C) 2012 Sumit Bose <sbose@redhat.com>
cc003103e52ff9d5fe9bed567ef9438613ab4fbfrse This program is free software; you can redistribute it and/or modify
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd it under the terms of the GNU General Public License as published by
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd the Free Software Foundation; either version 3 of the License, or
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd (at your option) any later version.
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd This program is distributed in the hope that it will be useful,
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd but WITHOUT ANY WARRANTY; without even the implied warranty of
ce9621257ef9e54c1bbe5ad8a5f445a1f211c2dcnd MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh GNU General Public License for more details.
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh You should have received a copy of the GNU General Public License
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianh along with this program. If not, see <http://www.gnu.org/licenses/>.
9d129b55f5a43abf43865c6b0eb6dd19bc22aba8ianherrno_t sysdb_get_subdomains(TALLOC_CTX *mem_ctx, struct sysdb_ctx *sysdb,
e5106092b7fae78cec4898042a78a10acccb4cacwrowe const char *tmp_str;
cc003103e52ff9d5fe9bed567ef9438613ab4fbfrse list = talloc_zero_array(tmp_ctx, struct sysdb_subdom *, res->count);
9d0d2ad2438f2e8c9ff1dd64b243605170d739aedougm tmp_str = ldb_msg_find_attr_as_string(res->msgs[i], "cn", NULL);
cc003103e52ff9d5fe9bed567ef9438613ab4fbfrse ("The object [%s] doesn't have a name\n",
goto done;
goto done;
goto done;
done:
return ret;
const char *tmp_str;
NULL};
return ENOMEM;
goto done;
goto done;
NULL);
goto done;
goto done;
NULL);
goto done;
NULL);
goto done;
done:
return ret;
int ret;
bool do_update = false;
return ENOMEM;
goto done;
goto done;
goto done;
goto done;
goto done;
do_update = true;
NULL);
goto done;
goto done;
do_update = true;
if (do_update == false) {
goto done;
goto done;
done:
return ret;
int ret;
return ENOMEM;
goto done;
goto done;
goto done;
goto done;
NULL);
goto done;
goto done;
NULL);
goto done;
goto done;
goto done;
done:
return ret;
int ret;
int sret;
size_t c;
size_t d;
bool in_transaction = false;
bool *keep_subdomain;
goto done;
goto done;
goto done;
goto done;
in_transaction = true;
for (d = 0; d < cur_subdomains_count; d++) {
keep_subdomain[d] = true;
if (d == cur_subdomains_count) {
goto done;
goto done;
for (d = 0; d < cur_subdomains_count; d++) {
if (!keep_subdomain[d]) {
goto done;
goto done;
in_transaction = false;
done:
if (in_transaction) {
return ret;
return ENOMEM;
return EOK;
return EINVAL; \
const char *name,
const char **attrs,
const char **attrs,
const char *name,
const char *pwd,
const char *gecos,
const char *homedir,
const char *shell,
char **remove_attrs,
const char *name,
const char **attrs,
const char **attrs,
const char *name,
now);