/*
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 "config.h"
#include <stdlib.h>
#include <limits.h>
#include <talloc.h>
#include <dirent.h>
#include <ctype.h>
#include <signal.h>
#include <utime.h>
#include <ldb.h>
#include <popt.h>
#include <stdio.h>
#include <signal.h>
#include "tools/common/sss_process.h"
#include "tools/tools_util.h"
if (expr) { \
goto done; \
} \
} while(0)
struct debuglevel_tool_ctx {
char **sections;
};
struct sssctl_logs_opts {
int delete;
int archived;
};
int debug_to_set, const char *config_file)
{
int ret;
int err;
return ENOMEM;
}
/* convert debug_to_set to string */
goto done;
}
/* write to confdb */
goto done;
}
}
/*
* Change atime and mtime of sssd.conf,
* so the configuration can be restored on next start.
*/
errno = 0;
}
done:
return ret;
}
{
int ret;
if (confdb_path == NULL) {
"Could not allocate memory for confdb path\n");
return ENOMEM;
}
"Could not initialize connection to the confdb\n");
}
return ret;
}
char ***output_sections)
{
int ret;
int domain_count = 0;
int i = 0;
char **sections;
const char *known_services[] = {
};
/ sizeof(*known_services);
return ENOMEM;
}
/* get domains */
for (domain = domain_list;
domain_count++;
}
/* allocate output space */
"Could not allocate memory for sections\n");
goto fail;
}
for (i = 0; i < known_services_count; i++) {
goto fail;
}
}
for (domain = domain_list;
goto fail;
}
}
/* add NULL to the end */
return EOK;
fail:
return ret;
}
{
long value;
char *endptr;
errno = 0;
return SSSDBG_INVALID;
}
return debug_convert_old_level(value);
}
struct sss_tool_ctx *tool_ctx,
void *pvt)
{
/* Parse command line. */
{"delete", 'd', POPT_ARG_NONE, &opts.delete, 0, _("Delete log files instead of truncating"), NULL },
};
return ret;
}
printf(_("Deleting log files...\n"));
return ret;
}
} else {
printf(_("Truncating log files...\n"));
return ret;
}
}
return EOK;
}
struct sss_tool_ctx *tool_ctx,
void *pvt)
{
const char *file;
const char *cmd;
/* Parse command line. */
return ret;
}
}
return ret;
}
return EOK;
}
struct sss_tool_ctx *tool_ctx,
void *pvt)
{
int ret;
0, _("Specify a non-default config file"), NULL},
};
NULL, "DEBUG_LEVEL_TO_SET",
_("Specify debug level you want to set"),
&debug_as_string, NULL);
return ret;
}
/* get config file */
if (pc_config_file) {
} else {
}
if (config_file == NULL) {
goto fini;
}
/* free pc_config_file? */
/* free debug_as_string? */
/* allocate context */
"Could not allocate memory for tools context\n");
goto fini;
}
"Could not force sssd processes to reload configuration. "
"Is sssd running?");
fini:
return ret;
}