13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg Pavel Březina <pbrezina@redhat.com>
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg Copyright (C) 2016 Red Hat
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg This program is free software; you can redistribute it and/or modify
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg it under the terms of the GNU General Public License as published by
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg the Free Software Foundation; either version 3 of the License, or
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg (at your option) any later version.
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg This program is distributed in the hope that it will be useful,
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg but WITHOUT ANY WARRANTY; without even the implied warranty of
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg GNU General Public License for more details.
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg You should have received a copy of the GNU General Public License
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg along with this program. If not, see <http://www.gnu.org/licenses/>.
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg#define ERR_SSSD _("Check that SSSD is running and " \
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg "the InfoPipe responder is enabled. " \
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg "Make sure 'ifp' is listed in the " \
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg "'services' option in sssd.conf.\n")
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankgstatic int sssctl_sifp_data_destructor(struct sssctl_sifp_data *ctx)
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankgstatic void *sssctl_sifp_talloc(size_t size, void *pvt)
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankgstatic void sssctl_sifp_talloc_free(void *ptr, void *pvt)
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankgsss_sifp_error sssctl_sifp_init(struct sss_tool_ctx *tool_ctx,
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg sifp_data = talloc_zero(tool_ctx, struct sssctl_sifp_data);
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg error = sss_sifp_init_ex(sifp_data, sssctl_sifp_talloc,
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg talloc_set_destructor(sifp_data, sssctl_sifp_data_destructor);
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg const char *message)
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg fprintf(stderr, "%s [%d]: %s\n", message, error, sifp_msg);
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg if (strcmp(dbus_code, DBUS_ERROR_SERVICE_UNKNOWN) == 0) {
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg if (strcmp(dbus_code, DBUS_ERROR_SPAWN_CHILD_EXITED) == 0) {
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg fprintf(stderr, "%s [%d]: %s\n", message, error, sifp_msg);
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg const char *path,
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg const char *iface,
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg const char *method,
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg DEBUG(SSSDBG_CRIT_FAILURE, "Unable to create D-Bus message\n");
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg bret = dbus_message_append_args_valist(msg, first_arg_type, va);
13b501825bce68e7e49b4bc775da93e38d9bd9f3fuankg DEBUG(SSSDBG_CRIT_FAILURE, "Failed to build message\n");