summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/monitor/monitor.c2
-rw-r--r--src/responder/autofs/autofs_private.h3
-rw-r--r--src/responder/common/responder_sbus.h43
-rw-r--r--src/responder/nss/nsssrv.c1
-rw-r--r--src/responder/nss/nsssrv.h3
-rw-r--r--src/responder/pac/pacsrv.h4
-rw-r--r--src/responder/pam/pamsrv.c4
-rw-r--r--src/responder/ssh/sshsrv.c1
-rw-r--r--src/responder/ssh/sshsrv_private.h3
-rw-r--r--src/responder/sudo/sudosrv.c1
-rw-r--r--src/responder/sudo/sudosrv_private.h2
11 files changed, 50 insertions, 17 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c
index 69180cd8..cc6f6d55 100644
--- a/src/monitor/monitor.c
+++ b/src/monitor/monitor.c
@@ -51,7 +51,7 @@
#include "dbus/dbus.h"
#include "sbus/sssd_dbus.h"
#include "monitor/monitor_interfaces.h"
-#include "responder/nss/nsssrv.h"
+#include "responder/common/responder_sbus.h"
#ifdef USE_KEYRING
#include <keyutils.h>
diff --git a/src/responder/autofs/autofs_private.h b/src/responder/autofs/autofs_private.h
index 58445f35..efe1d623 100644
--- a/src/responder/autofs/autofs_private.h
+++ b/src/responder/autofs/autofs_private.h
@@ -21,8 +21,7 @@
#ifndef _AUTOFSSRV_PRIVATE_H_
#define _AUTOFSSRV_PRIVATE_H_
-#define SSS_AUTOFS_SBUS_SERVICE_VERSION 0x0001
-#define SSS_AUTOFS_SBUS_SERVICE_NAME "autofs"
+#include "responder/common/responder_sbus.h"
#define SSS_AUTOFS_PROTO_VERSION 0x001
diff --git a/src/responder/common/responder_sbus.h b/src/responder/common/responder_sbus.h
new file mode 100644
index 00000000..4927d72a
--- /dev/null
+++ b/src/responder/common/responder_sbus.h
@@ -0,0 +1,43 @@
+/*
+ SSSD
+
+ SSS Client Responder, common header file
+
+ Copyright (C) Red Hat, 2012
+
+ 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 __SSS_RESPONDER_SBUS_H__
+#define __SSS_RESPONDER_SBUS_H__
+
+#define NSS_SBUS_SERVICE_NAME "nss"
+#define NSS_SBUS_SERVICE_VERSION 0x0001
+
+#define SSS_PAM_SBUS_SERVICE_NAME "pam"
+#define SSS_PAM_SBUS_SERVICE_VERSION 0x0001
+
+#define SSS_SUDO_SBUS_SERVICE_NAME "sudo"
+#define SSS_SUDO_SBUS_SERVICE_VERSION 0x0001
+
+#define SSS_AUTOFS_SBUS_SERVICE_NAME "autofs"
+#define SSS_AUTOFS_SBUS_SERVICE_VERSION 0x0001
+
+#define SSS_SSH_SBUS_SERVICE_NAME "ssh"
+#define SSS_SSH_SBUS_SERVICE_VERSION 0x0001
+
+#define PAC_SBUS_SERVICE_NAME "pac"
+#define PAC_SBUS_SERVICE_VERSION 0x0001
+
+#endif /* __SSS_RESPONDER_SBUS_H__ */
diff --git a/src/responder/nss/nsssrv.c b/src/responder/nss/nsssrv.c
index f5cfc85b..083e91d7 100644
--- a/src/responder/nss/nsssrv.c
+++ b/src/responder/nss/nsssrv.c
@@ -42,6 +42,7 @@
#include "sbus/sssd_dbus.h"
#include "responder/common/responder_packet.h"
#include "responder/common/responder.h"
+#include "responder/common/responder_sbus.h"
#include "providers/data_provider.h"
#include "monitor/monitor_interfaces.h"
#include "sbus/sbus_client.h"
diff --git a/src/responder/nss/nsssrv.h b/src/responder/nss/nsssrv.h
index a8b2c3c9..de15f53e 100644
--- a/src/responder/nss/nsssrv.h
+++ b/src/responder/nss/nsssrv.h
@@ -33,9 +33,6 @@
#include "responder/common/responder_packet.h"
#include "responder/common/responder.h"
-#define NSS_SBUS_SERVICE_VERSION 0x0001
-#define NSS_SBUS_SERVICE_NAME "nss"
-
#define NSS_PACKET_MAX_RECV_SIZE 1024
struct getent_ctx;
diff --git a/src/responder/pac/pacsrv.h b/src/responder/pac/pacsrv.h
index c0a13a33..8b73d995 100644
--- a/src/responder/pac/pacsrv.h
+++ b/src/responder/pac/pacsrv.h
@@ -37,13 +37,11 @@
#include "sbus/sssd_dbus.h"
#include "responder/common/responder_packet.h"
#include "responder/common/responder.h"
+#include "responder/common/responder_sbus.h"
#include "lib/idmap/sss_idmap.h"
#include "util/sss_nss.h"
#include "db/sysdb.h"
-#define PAC_SBUS_SERVICE_VERSION 0x0001
-#define PAC_SBUS_SERVICE_NAME "pac"
-
#define PAC_PACKET_MAX_RECV_SIZE 1024
struct getent_ctx;
diff --git a/src/responder/pam/pamsrv.c b/src/responder/pam/pamsrv.c
index f877c4f0..f0c89a96 100644
--- a/src/responder/pam/pamsrv.c
+++ b/src/responder/pam/pamsrv.c
@@ -43,12 +43,10 @@
#include "sbus/sbus_client.h"
#include "responder/pam/pamsrv.h"
#include "responder/common/negcache.h"
+#include "responder/common/responder_sbus.h"
#define DEFAULT_PAM_FD_LIMIT 8192
-#define SSS_PAM_SBUS_SERVICE_VERSION 0x0001
-#define SSS_PAM_SBUS_SERVICE_NAME "pam"
-
struct sbus_method monitor_pam_methods[] = {
{ MON_CLI_METHOD_PING, monitor_common_pong },
{ MON_CLI_METHOD_RES_INIT, monitor_common_res_init },
diff --git a/src/responder/ssh/sshsrv.c b/src/responder/ssh/sshsrv.c
index 32c0f308..80a558b5 100644
--- a/src/responder/ssh/sshsrv.c
+++ b/src/responder/ssh/sshsrv.c
@@ -24,6 +24,7 @@
#include "confdb/confdb.h"
#include "monitor/monitor_interfaces.h"
#include "responder/common/responder.h"
+#include "responder/common/responder_sbus.h"
#include "responder/ssh/sshsrv_private.h"
#include "providers/data_provider.h"
diff --git a/src/responder/ssh/sshsrv_private.h b/src/responder/ssh/sshsrv_private.h
index 4b13ca1d..296bd94a 100644
--- a/src/responder/ssh/sshsrv_private.h
+++ b/src/responder/ssh/sshsrv_private.h
@@ -23,9 +23,6 @@
#include "responder/common/responder.h"
-#define SSS_SSH_SBUS_SERVICE_VERSION 0x0001
-#define SSS_SSH_SBUS_SERVICE_NAME "ssh"
-
#define SSS_SSH_KNOWN_HOSTS_PATH PUBCONF_PATH"/known_hosts"
#define SSS_SSH_KNOWN_HOSTS_TEMP_TMPL PUBCONF_PATH"/.known_hosts.XXXXXX"
diff --git a/src/responder/sudo/sudosrv.c b/src/responder/sudo/sudosrv.c
index cb89e1f7..cbcbe213 100644
--- a/src/responder/sudo/sudosrv.c
+++ b/src/responder/sudo/sudosrv.c
@@ -24,6 +24,7 @@
#include "confdb/confdb.h"
#include "monitor/monitor_interfaces.h"
#include "responder/common/responder.h"
+#include "responder/common/responder_sbus.h"
#include "responder/sudo/sudosrv_private.h"
#include "providers/data_provider.h"
diff --git a/src/responder/sudo/sudosrv_private.h b/src/responder/sudo/sudosrv_private.h
index c9eae57b..9d3156ca 100644
--- a/src/responder/sudo/sudosrv_private.h
+++ b/src/responder/sudo/sudosrv_private.h
@@ -29,8 +29,6 @@
#include "responder/common/responder.h"
#define SSS_SUDO_ERROR_OK 0
-#define SSS_SUDO_SBUS_SERVICE_VERSION 0x0001
-#define SSS_SUDO_SBUS_SERVICE_NAME "sudo"
enum sss_dp_sudo_type {
SSS_DP_SUDO_REFRESH_RULES,