sysdb_services.c revision 3a59cbd0b7b9c5dd3c62ac1679876070c264d80f
022df7f893582e7e8efffce816ae27f6d1015766Eugen Kuksa Stephen Gallagher <sgallagh@redhat.com>
022df7f893582e7e8efffce816ae27f6d1015766Eugen Kuksa Copyright (C) 2012 Red Hat
022df7f893582e7e8efffce816ae27f6d1015766Eugen Kuksa This program is free software; you can redistribute it and/or modify
022df7f893582e7e8efffce816ae27f6d1015766Eugen Kuksa it under the terms of the GNU General Public License as published by
022df7f893582e7e8efffce816ae27f6d1015766Eugen Kuksa the Free Software Foundation; either version 3 of the License, or
022df7f893582e7e8efffce816ae27f6d1015766Eugen Kuksa (at your option) any later version.
022df7f893582e7e8efffce816ae27f6d1015766Eugen Kuksa This program is distributed in the hope that it will be useful,
022df7f893582e7e8efffce816ae27f6d1015766Eugen Kuksa but WITHOUT ANY WARRANTY; without even the implied warranty of
022df7f893582e7e8efffce816ae27f6d1015766Eugen Kuksa MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
022df7f893582e7e8efffce816ae27f6d1015766Eugen Kuksa GNU General Public License for more details.
022df7f893582e7e8efffce816ae27f6d1015766Eugen Kuksa You should have received a copy of the GNU General Public License
022df7f893582e7e8efffce816ae27f6d1015766Eugen Kuksa along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "db/sysdb_private.h"
#include "db/sysdb_services.h"
const char *primary_name,
int port,
const char **aliases,
const char **protocols,
static errno_t
int port,
const char **aliases,
const char **protocols);
const char *alias);
const char *name,
const char *proto,
int lret;
char *sanitized_name;
char *sanitized_proto;
if (!tmp_ctx) {
return ENOMEM;
if (!base_dn) {
goto done;
goto done;
if (proto) {
goto done;
goto done;
goto done;
done:
return ret;
int port,
const char *proto,
int lret;
if (port <= 0) {
return EINVAL;
if (!tmp_ctx) {
return ENOMEM;
if (!base_dn) {
goto done;
if (proto) {
goto done;
(unsigned int) port);
if (lret) {
goto done;
goto done;
done:
return ret;
const char *primary_name,
int port,
const char **aliases,
const char **protocols,
char **remove_attrs,
bool in_transaction = false;
const char *name;
goto done;
in_transaction = true;
goto done;
goto done;
NULL);
if (!name) {
goto done;
NULL);
if (!name) {
goto done;
if(update_dn) {
primary_name));
update_dn)));
goto done;
goto done;
if (update_dn) {
if (!extra_attrs) {
if (!attrs) {
goto done;
((cache_timeout) ?
if (remove_attrs) {
goto done;
goto done;
in_transaction = false;
done:
if (in_transaction) {
return ret;
struct ldb_dn *
char *clean_name;
return NULL;
return dn;
const char *primary_name,
int port,
const char **aliases,
const char **protocols,
int lret;
if (!msg) {
goto done;
goto done;
goto done;
for (i=0; aliases[i]; i++) {
goto done;
goto done;
for (i=0; protocols[i]; i++) {
goto done;
done:
if (ret) {
return ret;
static errno_t
int port,
const char **aliases,
const char **protocols)
int lret;
return EINVAL;
if (!msg) {
goto done;
goto done;
for (i = 0; aliases[i]; i++) {
goto done;
goto done;
for (i = 0; protocols[i]; i++) {
goto done;
done:
if (ret) {
return ret;
const char *alias)
int lret;
if (!msg) {
goto done;
done:
if (ret) {
return ret;
const char *name,
int port,
const char *proto)
bool in_transaction = false;
if (!tmp_ctx) {
return ENOMEM;
goto done;
in_transaction = true;
if (name) {
goto done;
goto done;
goto done;
in_transaction = false;
done:
if (in_transaction) {
return ret;
int lret;
if (!tmp_ctx) {
return ENOMEM;
if (!base_dn) {
goto done;
SYSDB_SC);
goto done;
goto done;
done:
return ret;
const char *name,
int mod_op)
if (!tmp_ctx) {
return ENOMEM;
if (!dn) {
goto done;
done:
return ret;