sssctl_data.c revision b6cc93b259b96408a827a4349a98600c0b2f6660
/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2016 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 <popt.h>
#include <stdio.h>
#include "tools/common/sss_tools.h"
struct sssctl_data_opts {
int override;
int restore;
int start;
int stop;
int restart;
};
{
return ret;
}
return EOK;
}
static bool sssctl_backup_file_exists(const char *file)
{
}
static bool sssctl_backup_exist(const char **files)
{
int i;
if (sssctl_backup_file_exists(files[i])) {
return true;
}
}
return false;
}
{
const char *files[] = {SSS_BACKUP_USER_OVERRIDES,
NULL};
enum sssctl_prompt_result prompt;
return ret;
}
"override?"), SSSCTL_PROMPT_NO);
switch (prompt) {
case SSSCTL_PROMPT_YES:
/* continue */
break;
case SSSCTL_PROMPT_NO:
return EEXIST;
case SSSCTL_PROMPT_ERROR:
return EIO;
}
}
return ret;
}
return ret;
}
return ret;
}
struct sss_tool_ctx *tool_ctx,
void *pvt)
{
struct sssctl_data_opts opts = {0};
/* Parse command line. */
struct poptOption options[] = {
};
return ret;
}
return EOK;
}
return ret;
}
{
if (!sssctl_start_sssd(force_start)) {
return ERR_SSSD_NOT_RUNNING;
}
return ret;
}
}
return ret;
}
}
return ret;
}
struct sss_tool_ctx *tool_ctx,
void *pvt)
{
struct sssctl_data_opts opts = {0};
/* Parse command line. */
struct poptOption options[] = {
};
return ret;
}
}
struct sss_tool_ctx *tool_ctx,
void *pvt)
{
struct sssctl_data_opts opts = {0};
/* Parse command line. */
struct poptOption options[] = {
{"restore", 'r', POPT_ARG_NONE, &opts.restore, 0, _("Create clean cache files and import local data"), NULL },
};
return ret;
}
return ERR_SSSD_RUNNING;
}
printf(_("Creating backup of local data...\n"));
" can not remove the cache.\n"));
return ret;
}
printf(_("Removing cache files...\n"));
return ret;
}
printf(_("Restoring local data...\n"));
} else {
}
return EOK;
}