sssd_dbus_request.c revision 8779b9ee101ed3e5a6836b5366c006dc21dd36c0
/*
Authors:
Stef Walter <stefw@redhat.com>
Copyright (C) 2014 Red Hat
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/>.
*/
#include "sbus/sssd_dbus.h"
#include "sbus/sssd_dbus_private.h"
#define INTERNAL_ERROR "Internal Error"
{
return 0;
}
struct sbus_request *
struct sbus_interface *intf,
{
struct sbus_request *dbus_req;
if (!dbus_req) {
return NULL;
}
return dbus_req;
}
void
void *handler_data,
{
int ret;
if (invoker_fn) {
} else {
}
switch(ret) {
case EOK:
return;
case ENOMEM:
break;
default:
break;
}
}
{
if (reply) {
}
return talloc_free(dbus_req);
}
int first_arg_type,
...)
{
int ret;
if (!reply) {
return ENOMEM;
}
if (dbret) {
} else {
}
return ret;
}
{
int ret;
if (!reply) {
return ENOMEM;
}
return ret;
}
struct array_arg {
char **dbus_array;
};
{
return 0;
}
static bool
{
int arg_type;
void **arg_ptr;
/*
* Here we iterate through the entire thing again and look for
* things we need to fix allocation for. Normally certain types
* returned from dbus_message_get_args() and friends require
* later freeing. We tie those to the talloc context here.
*
* The list of argument has already been validated by the previous
* dbus_message_get_args() call, so we can be cheap.
*/
while (arg_type != DBUS_TYPE_INVALID) {
if (arg_type == DBUS_TYPE_ARRAY) {
/* Arrays of these things need to be freed */
if (arg_type == DBUS_TYPE_STRING ||
arg_type == DBUS_TYPE_SIGNATURE) {
/* no kidding ... */
return false;
}
}
/* A non array argument */
} else {
}
/* The next type */
}
return true;
}
bool
int first_arg_type,
...)
{
bool ret = true;
first_arg_type, va)) {
} else {
/* Trying to send the error back to the caller in this case is a joke */
/* Log other errors and send them back, this include o.f.d.InvalidArgs */
} else {
}
ret = false;
}
return ret;
}