summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2011-12-23 18:59:52 +0100
committerStephen Gallagher <sgallagh@redhat.com>2012-04-24 09:19:43 -0400
commitd1cec5a8fc58293231c72c1f967ef5421a24a33b (patch)
tree9e0fa4a70ff35331ad625a8e998971ae432155a0 /src
parent81165faf5d951aca69f410713730c26ff048ec44 (diff)
downloadsssd-d1cec5a8fc58293231c72c1f967ef5421a24a33b.tar.gz
sssd-d1cec5a8fc58293231c72c1f967ef5421a24a33b.tar.bz2
sssd-d1cec5a8fc58293231c72c1f967ef5421a24a33b.zip
Add domain name to get_account_info request
Diffstat (limited to 'src')
-rw-r--r--src/providers/data_provider_be.c9
-rw-r--r--src/providers/dp_backend.h1
-rw-r--r--src/responder/common/responder_dp.c1
3 files changed, 11 insertions, 0 deletions
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c
index a3607236..101bd3b2 100644
--- a/src/providers/data_provider_be.c
+++ b/src/providers/data_provider_be.c
@@ -552,6 +552,7 @@ static int be_get_account_info(DBusMessage *message, struct sbus_connection *con
void *user_data;
uint32_t type;
char *filter;
+ char *domain;
uint32_t attr_type;
int ret;
dbus_uint16_t err_maj;
@@ -571,6 +572,7 @@ static int be_get_account_info(DBusMessage *message, struct sbus_connection *con
DBUS_TYPE_UINT32, &type,
DBUS_TYPE_UINT32, &attr_type,
DBUS_TYPE_STRING, &filter,
+ DBUS_TYPE_STRING, &domain,
DBUS_TYPE_INVALID);
if (!ret) {
DEBUG(1,("Failed, to parse message!\n"));
@@ -634,6 +636,13 @@ static int be_get_account_info(DBusMessage *message, struct sbus_connection *con
}
req->entry_type = type;
req->attr_type = (int)attr_type;
+ req->domain = talloc_strdup(req, domain);
+ if (!req->domain) {
+ err_maj = DP_ERR_FATAL;
+ err_min = ENOMEM;
+ err_msg = "Out of memory";
+ goto done;
+ }
be_req->req_data = req;
diff --git a/src/providers/dp_backend.h b/src/providers/dp_backend.h
index 76b0e43d..cdb37a89 100644
--- a/src/providers/dp_backend.h
+++ b/src/providers/dp_backend.h
@@ -150,6 +150,7 @@ struct be_acct_req {
int filter_type;
char *filter_value;
char *extra_value;
+ char *domain;
};
struct be_sudo_req {
diff --git a/src/responder/common/responder_dp.c b/src/responder/common/responder_dp.c
index 4399736d..7362bd74 100644
--- a/src/responder/common/responder_dp.c
+++ b/src/responder/common/responder_dp.c
@@ -566,6 +566,7 @@ sss_dp_get_account_msg(void *pvt)
DBUS_TYPE_UINT32, &be_type,
DBUS_TYPE_UINT32, &attrs,
DBUS_TYPE_STRING, &filter,
+ DBUS_TYPE_STRING, &info->dom->name,
DBUS_TYPE_INVALID);
talloc_free(filter);
if (!dbret) {