sysdb_autofs.c revision eb29ae58117ca88868491fe2240e27393c7a9068
/*
Authors:
Jakub Hrozek <jhrozek@redhat.com>
Copyright (C) 2012 Red Hat
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 <talloc.h>
#include "db/sysdb_private.h"
#include "db/sysdb_autofs.h"
struct ldb_dn *
const char *map_name)
{
}
struct ldb_dn *
const char *entry_name)
{
}
static char *
const char *map_name)
{
char *strdn;
return strdn;
}
const char *name,
const char *autofsmapname,
struct sysdb_attrs *attrs,
int cache_timeout,
{
if (!tmp_ctx) {
return ENOMEM;
}
if (!attrs) {
if (!attrs) {
goto done;
}
}
goto done;
}
goto done;
}
goto done;
}
if (ret) {
goto done;
}
((cache_timeout) ?
(now + cache_timeout) : 0));
if (ret) {
goto done;
}
goto done;
}
done:
return ret;
}
const char *name)
{
}
const char *map_name,
struct ldb_message **_map)
{
const char *filter;
char *safe_map_name;
struct ldb_message **msgs;
const char *attrs[] = { SYSDB_OBJECTCLASS,
NULL };
("Cannot sanitize map [%s] error [%d]: %s\n",
goto done;
}
if (!filter) {
goto done;
}
("Error looking up autofs map [%s]", safe_map_name));
goto done;
goto done;
}
if (count != 1) {
("More than one map named %s\n", safe_map_name));
goto done;
}
done:
return ret;
}
const char *key,
const char *value,
struct sysdb_attrs *attrs)
{
if (!tmp_ctx) {
return ENOMEM;
}
if (!attrs) {
if (!attrs) {
goto done;
}
}
goto done;
}
goto done;
}
goto done;
}
goto done;
}
goto done;
}
done:
return ret;
}
const char *mapname,
struct ldb_message ***_entries)
{
char *filter;
const char *attrs[] = { SYSDB_AUTOFS_ENTRY_KEY,
NULL };
struct ldb_message **msgs;
char *mapdn;
if (!tmp_ctx) {
return ENOMEM;
}
if (!mapdn) {
goto done;
}
if (!filter) {
goto done;
}
goto done;
*_count = 0;
goto done;
}
done:
return ret;
}
{
}
const char *mapname,
const char *const *add_entries,
const char *const *del_entries)
{
int i;
if(!tmp_ctx) {
return ENOMEM;
}
("Failed to start update transaction\n"));
goto done;
}
if (add_entries) {
/* Add the all te add_entries to the map */
for (i = 0; add_entries[i]; i++) {
("Could not add entry [%s] to map [%s]. "
/* Continue on, we should try to finish the rest */
}
}
}
if (del_entries) {
/* Add the all te del_entries to the map */
for (i = 0; del_entries[i]; i++) {
("Could not del entry [%s] to map [%s]. "
/* Continue on, we should try to finish the rest */
}
}
}
done:
}
return ret;
}
const char *name,
struct sysdb_attrs *attrs,
int mod_op)
{
if (!tmp_ctx) {
return ENOMEM;
}
if (!dn) {
goto done;
}
done:
return ret;
}