diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/providers/data_provider.c | 22 | ||||
-rw-r--r-- | server/providers/data_provider.h | 8 | ||||
-rw-r--r-- | server/providers/proxy.c | 4 |
3 files changed, 34 insertions, 0 deletions
diff --git a/server/providers/data_provider.c b/server/providers/data_provider.c index e361dfc87..2eacf47e4 100644 --- a/server/providers/data_provider.c +++ b/server/providers/data_provider.c @@ -29,6 +29,7 @@ #include <string.h> #include <sys/time.h> #include <errno.h> +#include <time.h> #include "popt.h" #include "util/util.h" #include "confdb/confdb.h" @@ -88,12 +89,33 @@ struct sbus_method mon_sbus_methods[] = { }; static int dp_get_account_info(DBusMessage *message, void *data, DBusMessage **r); +static int get_policies(DBusMessage *message, void *data, DBusMessage **r); struct sbus_method dp_sbus_methods[] = { { DP_SRV_METHOD_GETACCTINFO, dp_get_account_info }, + {DP_PP_GET_POLICIES, get_policies}, { NULL, NULL } }; +static int get_policies(DBusMessage *message, void *data, DBusMessage **r) { + DBusMessage *reply; + dbus_bool_t ret; + int val; + + val = 1+(int) (4.0*rand()/(RAND_MAX+1.0)); + + reply = dbus_message_new_method_return(message); + ret = dbus_message_append_args(reply, DBUS_TYPE_UINT32, &val, + DBUS_TYPE_INVALID); + if (!ret) { + return EIO; + } + + *r = reply; + return EOK; +} + + struct dp_request { /* reply message to send when request is done */ DBusMessage *reply; diff --git a/server/providers/data_provider.h b/server/providers/data_provider.h index 382b1fb09..3f49cafaa 100644 --- a/server/providers/data_provider.h +++ b/server/providers/data_provider.h @@ -58,6 +58,14 @@ #define DP_SRV_METHOD_GETACCTINFO "getAccountInfo" +#define DP_PP_GET_POLICIES "getPolicies" +enum { + POL_ANS_OFFLINE=1, + POL_ANS_NOTHING_TO_DO, + POL_ANS_NEW_POL_AVAIL, + POL_ANS_ERROR +}; + #define DP_ERR_OK 0 #define DP_ERR_OFFLINE 1 #define DP_ERR_TIMEOUT 2 diff --git a/server/providers/proxy.c b/server/providers/proxy.c index 04d4a58a8..f44ad858a 100644 --- a/server/providers/proxy.c +++ b/server/providers/proxy.c @@ -235,6 +235,7 @@ int sssm_proxy_init(struct be_ctx *bectx, struct be_mod_ops **ops, void **pvt_da return ENOMEM; } +<<<<<<< HEAD:server/providers/proxy.c ret = confdb_get_string(bectx->cdb, ctx, bectx->conf_path, "libName", NULL, &libname); ret = confdb_get_string(bectx->cdb, ctx, bectx->conf_path, @@ -246,6 +247,9 @@ int sssm_proxy_init(struct be_ctx *bectx, struct be_mod_ops **ops, void **pvt_da } handle = dlopen(libpath, RTLD_NOW); +======= + handle = dlopen("/usr/lib/libnss_ldap.so.2", RTLD_NOW); +>>>>>>> 72efac5... get_policies:server/providers/ldap_provider.c if (!handle) { DEBUG(0, ("Unable to load %s module with path, error: %s\n", libpath, dlerror())); |