/*
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_process.h"
#include "tools/tools_util.h"
struct sssctl_data_opts {
int override;
int restore;
int start;
int stop;
int restart;
};
{
return ret;
}
return EOK;
}
{
}
{
int i;
if (sssctl_backup_file_exists(files[i])) {
return true;
}
}
return false;
}
{
NULL};
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)
{
/* Parse command line. */
};
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)
{
/* Parse command line. */
};
return ret;
}
}
struct sss_tool_ctx *tool_ctx,
void *pvt)
{
/* Parse command line. */
{"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;
}
struct sss_tool_ctx *tool_ctx,
void *pvt)
{
return ret;
}
if (sss_daemon_running()) {
return ERR_SSSD_RUNNING;
}
return ret;
}
true, 0, 0);
return ret;
}
return EOK;
}
struct sss_tool_ctx *tool_ctx,
void *pvt)
{
int i;
goto done;
}
goto done;
}
}
}
goto done;
}
done:
return ret;
}