From 928231f18f376df346b95e9b402fea4b20e95d98 Mon Sep 17 00:00:00 2001
From: Simo Sorce <idra@samba.org>
Date: Tue, 13 Jan 2009 17:12:08 -0500
Subject: Fix return, dbus would abort because we were passing values and not
 pointers to values. Check domain is never null (or dbus will abort).

---
 server/nss/nsssrv_dp.c           | 4 ++++
 server/providers/data_provider.c | 6 +++---
 2 files changed, 7 insertions(+), 3 deletions(-)

(limited to 'server')

diff --git a/server/nss/nsssrv_dp.c b/server/nss/nsssrv_dp.c
index a0f31d57..5b1092ac 100644
--- a/server/nss/nsssrv_dp.c
+++ b/server/nss/nsssrv_dp.c
@@ -99,6 +99,10 @@ int nss_dp_send_acct_req(struct nss_ctx *nctx, TALLOC_CTX *memctx,
         return EINVAL;
     }
 
+    if (!domain) {
+        return EINVAL;
+    }
+
     switch (type) {
     case NSS_DP_USER:
         be_type = BE_REQ_USER;
diff --git a/server/providers/data_provider.c b/server/providers/data_provider.c
index 393e03e7..fd64525e 100644
--- a/server/providers/data_provider.c
+++ b/server/providers/data_provider.c
@@ -686,9 +686,9 @@ static int dp_get_account_info(DBusMessage *message, void *data, DBusMessage **r
 
 respond:
     dbret = dbus_message_append_args(reply,
-                                     DBUS_TYPE_UINT16, dpret,
-                                     DBUS_TYPE_UINT32, ret,
-                                     DBUS_TYPE_STRING, errmsg,
+                                     DBUS_TYPE_UINT16, &dpret,
+                                     DBUS_TYPE_UINT32, &ret,
+                                     DBUS_TYPE_STRING, &errmsg,
                                      DBUS_TYPE_INVALID);
     if (!dbret) return EIO;
 
-- 
cgit