summaryrefslogtreecommitdiffstats
path: root/server/providers
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-08-17 04:29:47 -0400
committerStephen Gallagher <sgallagh@redhat.com>2009-08-17 09:39:01 -0400
commitc0f3393d4ab923e2eedab0fad88a864e2aae9fc9 (patch)
tree1a31b6e55879396897441545ac5d0278e7371c49 /server/providers
parent7385f34a3c8c68cf0f87d64e55e0ca44f46fdeaa (diff)
downloadsssd-c0f3393d4ab923e2eedab0fad88a864e2aae9fc9.tar.gz
sssd-c0f3393d4ab923e2eedab0fad88a864e2aae9fc9.tar.xz
sssd-c0f3393d4ab923e2eedab0fad88a864e2aae9fc9.zip
Fix reconnection code
Remove redundant reconnection code that was interfeering with the sbus reconnection code. Consolidate include files for sbus relates operations. Make pamsrv code similar to nsssrv code.
Diffstat (limited to 'server/providers')
-rw-r--r--server/providers/data_provider.c5
-rw-r--r--server/providers/data_provider.h16
-rw-r--r--server/providers/data_provider_be.c2
-rw-r--r--server/providers/dp_sbus.c1
-rw-r--r--server/providers/dp_sbus.h28
5 files changed, 15 insertions, 37 deletions
diff --git a/server/providers/data_provider.c b/server/providers/data_provider.c
index 278f33be3..4cb39bfb6 100644
--- a/server/providers/data_provider.c
+++ b/server/providers/data_provider.c
@@ -39,7 +39,6 @@
#include "util/btreemap.h"
#include "data_provider.h"
#include "dp_interfaces.h"
-#include "monitor/monitor_sbus.h"
#include "monitor/monitor_interfaces.h"
#define DP_CONF_ENTRY "config/services/dp"
@@ -183,7 +182,7 @@ static void init_timeout(struct tevent_context *ev,
{
struct dp_client *dpcli;
- DEBUG(2, ("Client timed out before Identification!\n"));
+ DEBUG(2, ("Client timed out before Identification [%p]!\n", te));
dpcli = talloc_get_type(ptr, struct dp_client);
@@ -222,6 +221,7 @@ static int dp_client_init(struct sbus_connection *conn, void *data)
talloc_zfree(conn);
return ENOMEM;
}
+ DEBUG(4, ("Set-up DP ID timeout [%p]\n", dpcli->timeout));
/* Attach the client context to the connection context, so that it is
* always available when we need to manage the connection. */
@@ -254,6 +254,7 @@ static int client_registration(DBusMessage *message,
}
/* First thing, cancel the timeout */
+ DEBUG(4, ("Cancel DP ID timeout [%p]\n", dpcli->timeout));
talloc_zfree(dpcli->timeout);
dbus_error_init(&dbus_error);
diff --git a/server/providers/data_provider.h b/server/providers/data_provider.h
index 9c93bfec5..91adecba7 100644
--- a/server/providers/data_provider.h
+++ b/server/providers/data_provider.h
@@ -121,19 +121,27 @@ struct pam_data {
gid_t gr_gid;
};
+/* from dp_auth_util.c */
void pam_print_data(int l, struct pam_data *pd);
-
-int pam_add_response(struct pam_data *pd, enum response_type type,
+int pam_add_response(struct pam_data *pd,
+ enum response_type type,
int len, const uint8_t *data);
bool dp_pack_pam_request(DBusMessage *msg, struct pam_data *pd);
-bool dp_unpack_pam_request(DBusMessage *msg, struct pam_data *pd, DBusError *dbus_error);
+bool dp_unpack_pam_request(DBusMessage *msg, struct pam_data *pd,
+ DBusError *dbus_error);
+
bool dp_pack_pam_response(DBusMessage *msg, struct pam_data *pd);
-bool dp_unpack_pam_response(DBusMessage *msg, struct pam_data *pd, DBusError *dbus_error);
+bool dp_unpack_pam_response(DBusMessage *msg, struct pam_data *pd,
+ DBusError *dbus_error);
int dp_common_send_id(struct sbus_connection *conn,
uint16_t cli_type, uint16_t version,
const char *name, const char *domain);
+/* from dp_sbus.c */
+int dp_get_sbus_address(TALLOC_CTX *mem_ctx, struct confdb_ctx *confdb,
+ char **address);
+
#endif /* __DATA_PROVIDER_ */
diff --git a/server/providers/data_provider_be.c b/server/providers/data_provider_be.c
index 24d9105ef..7df900201 100644
--- a/server/providers/data_provider_be.c
+++ b/server/providers/data_provider_be.c
@@ -42,8 +42,6 @@
#include "sbus/sssd_dbus.h"
#include "util/btreemap.h"
#include "providers/dp_backend.h"
-#include "providers/dp_sbus.h"
-#include "monitor/monitor_sbus.h"
#include "monitor/monitor_interfaces.h"
#define BE_CONF_ENTRY "config/domains/%s"
diff --git a/server/providers/dp_sbus.c b/server/providers/dp_sbus.c
index f34822d5a..c5ccdc9aa 100644
--- a/server/providers/dp_sbus.c
+++ b/server/providers/dp_sbus.c
@@ -25,7 +25,6 @@
#include "confdb/confdb.h"
#include "sbus/sssd_dbus.h"
#include "providers/data_provider.h"
-#include "providers/dp_sbus.h"
#include "providers/dp_interfaces.h"
int dp_get_sbus_address(TALLOC_CTX *mem_ctx, struct confdb_ctx *confdb, char **address)
diff --git a/server/providers/dp_sbus.h b/server/providers/dp_sbus.h
deleted file mode 100644
index f3f542239..000000000
--- a/server/providers/dp_sbus.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- SSSD
-
- Data Provider Helpers
-
- Copyright (C) Stephen Gallagher <sgallagh@redhat.com> 2009
-
- This program is free software; you can redistribute it and/or modify
- 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/>.
-*/
-
-#ifndef DP_SBUS_H_
-#define DP_SBUS_H_
-
-int dp_get_sbus_address(TALLOC_CTX *mem_ctx, struct confdb_ctx *confdb,
- char **address);
-
-#endif /* DP_SBUS_H_ */