summaryrefslogtreecommitdiffstats
path: root/server/providers/data_provider_be.c
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2010-02-12 15:44:21 -0500
committerStephen Gallagher <sgallagh@redhat.com>2010-02-15 08:20:05 -0500
commit8f206092adc07f5f09e14d5dac53759bee33bcc6 (patch)
tree0e5b4846356b794c3e86b3ddfc90222dbc60cc53 /server/providers/data_provider_be.c
parent824c1e4d7e0ab9da7ad3f16f9c2e37bce7858132 (diff)
downloadsssd-8f206092adc07f5f09e14d5dac53759bee33bcc6.tar.gz
sssd-8f206092adc07f5f09e14d5dac53759bee33bcc6.tar.xz
sssd-8f206092adc07f5f09e14d5dac53759bee33bcc6.zip
Make PAM responses more compatible with D-BUS spec
Previously, the PAM responses could contain an arbitrary number of arguments. This is not acceptable by the D-BUS protocol, as there is no way to introspect it. This patch converts the response objects to be an array of D-BUS structs. It also fixes two potential memory leaks by not unref'ing the reply object if we get an error.
Diffstat (limited to 'server/providers/data_provider_be.c')
-rw-r--r--server/providers/data_provider_be.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/server/providers/data_provider_be.c b/server/providers/data_provider_be.c
index 15afa55ae..93cae0702 100644
--- a/server/providers/data_provider_be.c
+++ b/server/providers/data_provider_be.c
@@ -487,6 +487,7 @@ static void be_pam_handler_callback(struct be_req *req,
dbret = dp_pack_pam_response(reply, pd);
if (!dbret) {
DEBUG(1, ("Failed to generate dbus reply\n"));
+ dbus_message_unref(reply);
return;
}
@@ -614,6 +615,7 @@ done:
if (!ret) {
DEBUG(1, ("Failed to generate dbus reply\n"));
talloc_free(be_req);
+ dbus_message_unref(reply);
return EIO;
}