sysdb_views.c revision 2ef62c64e7f07c8aced3f72850008ecb72860162
/*
SSSD
System Database - View and Override related calls
Copyright (C) 2014 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"
/* In general is should not be possible that there is a view container without
* a view name set. But to be on the safe side we return both information
* separately. */
char **_view_name,
bool *view_container_exists)
{
const char *tmp_str;
struct ldb_dn *view_base_dn;
struct ldb_result *res;
const char *attrs[] = {SYSDB_VIEW_NAME,
NULL};
return ENOMEM;
}
if (view_base_dn == NULL) {
goto done;
}
if (ret != LDB_SUCCESS) {
goto done;
}
goto done;
}
*view_container_exists = false;
goto done;
} else {
*view_container_exists = true;
NULL);
goto done;
}
}
done:
return ret;
}
char **view_name)
{
bool view_container_exists;
}
const char *view_name)
{
char *tmp_str;
bool view_container_exists = false;
bool add_view_name = false;
struct ldb_message *msg;
return ENOMEM;
}
goto done;
}
/* view name already known, nothing to do */
goto done;
} else {
/* view name changed */
/* not supported atm */
"View name changed from [%s] to [%s]. NOT SUPPORTED.\n",
goto done;
}
}
add_view_name = true;
goto done;
}
goto done;
}
NULL);
if (ret != LDB_SUCCESS) {
goto done;
}
if (ret != LDB_SUCCESS) {
goto done;
}
if (view_container_exists) {
} else {
}
if (ret != LDB_SUCCESS) {
goto done;
}
done:
return ret;
}