/*
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 "providers/data_provider/dp_iface_generated.h"
#include "providers/data_provider/dp_private.h"
#include "providers/data_provider/dp_iface.h"
#include "providers/data_provider/dp.h"
#include "sbus/sssd_dbus.h"
#include "sbus/sssd_dbus_errors.h"
struct dp_client {
const char *name;
bool initialized;
};
{
switch (client) {
case DPC_NSS:
return "NSS";
case DPC_PAM:
return "PAM";
case DPC_IFP:
return "InfoPipe";
case DPC_PAC:
return "PAC";
case DPC_SUDO:
return "SUDO";
case DPC_HOST:
return "SSH";
case DPC_AUTOFS:
return "autofs";
case DP_CLIENT_SENTINEL:
return "Invalid";
}
return "Invalid";
}
{
return 0;
}
break;
}
}
if (client == DP_CLIENT_SENTINEL) {
}
return 0;
}
static int
void *data,
const char *client_name)
{
/* Do not send D-Bus error here. */
return EINVAL;
}
return ENOMEM;
}
break;
}
}
if (client == DP_CLIENT_SENTINEL) {
"Unknown client [%s]", client_name);
/* Kill this client. */
}
"disconnecting...\n", client_name);
return ret;
}
dp_cli->initialized = true;
return EOK;
}
static void
struct tevent_timer *te,
struct timeval t,
void *ptr)
{
"Client timed out before identification [%p]!\n", te);
}
{
{ &iface_dp_client_meta, 0 },
};
/* When connection is lost we also free the client. */
return ENOMEM;
}
dp_cli->initialized = false;
/* Allow access from the SSSD user. */
/* Setup timeout in case client fails to register himself in time. */
/* Connection is closed in the caller. */
return ENOMEM;
}
/* Setup D-Bus interfaces and methods. */
/* Connection is closed in the caller. */
return ret;
}
/* Connection is closed in the caller. */
return ret;
}
return ret;
}
struct data_provider *
{
return NULL;
}
}
struct be_ctx *
{
return NULL;
}
}
struct sbus_connection *
{
return NULL;
}
}