/*
Authors:
Jakub Hrozek <jhrozek@redhat.com>
Copyright (C) 2013 Red Hat
InfoPipe responder: the responder commands
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 "responder/ifp/ifp_private.h"
#include "responder/common/cache_req/cache_req.h"
struct ifp_attr_req {
const char *name;
const char **attrs;
int nattrs;
};
static struct tevent_req *
struct sss_nc_ctx *ncache,
enum sss_dp_acct_type search_type,
struct tevent_req *req,
struct ldb_result **_res,
struct sss_domain_info **_domain);
static errno_t
const char **attrs,
struct ldb_result *res);
static errno_t
{
"switching to org.freedesktop.sssd.infopipe.Users.User interface\n");
}
}
}
return ret; /* internal error */
}
}
return EOK;
}
static errno_t
{
bool parsed;
char **attrs;
int nattrs;
int i, ai;
if (parsed == false) {
return ERR_SBUS_REQUEST_HANDLED;
}
/* Copy the attributes to maintain memory hierarchy with talloc */
return ENOMEM;
}
ai = 0;
for (i = 0; i < nattrs; i++) {
"Attribute %s not present in the whitelist, skipping\n",
attrs[i]);
continue;
}
return ENOMEM;
}
ai++;
}
return EOK;
}
{
"No such user\n"));
return;
"Failed to read user attribute\n"));
return;
}
"Failed to build a reply\n"));
return;
}
}
static errno_t
struct ldb_message_element *el,
const char sub)
{
int i;
for (i = 0; i < el->num_values; i++) {
sub);
return ENOMEM;
}
}
return EOK;
}
static errno_t
const char **attrs,
struct ldb_result *res)
{
int ai;
/* Construct a reply */
if (!reply) {
}
&iter_dict);
if (!dbret) {
}
"Attribute %s not present or has no values\n",
continue;
}
/* Normalize white space in user names */
continue;
}
}
"Cannot add attribute %s to message\n",
continue;
}
}
}
if (!dbret) {
}
}
struct ldb_result *res);
{
}
}
}
}
}
}
return EOK;
}
{
"No such user\n"));
return;
"Failed to read attribute\n"));
return;
}
"Failed to build a reply\n"));
return;
}
}
static errno_t
struct ldb_result *res)
{
int i, num;
const char *name;
const char **groupnames;
char *out_name;
/* one less, the first one is the user entry */
if (groupnames == NULL) {
}
for (i = 0; i < num; i++) {
SYSDB_NAME, NULL);
continue;
}
continue;
}
continue;
}
} else {
}
}
}
struct ifp_user_get_attr_state {
const char *inp;
const char **attrs;
char *inp_name;
char *domname;
bool check_next;
bool check_provider;
};
static struct tevent_req *
struct sss_nc_ctx *ncache,
enum sss_dp_acct_type search_type,
{
return NULL;
}
goto done;
}
done:
}
return req;
}
static void
{
return;
}
switch (state->search_type) {
case SSS_DP_USER:
break;
case SSS_DP_INITGROUPS:
break;
default:
state->search_type);
return;
}
return;
}
return;
}
}
{
char *fqdn;
return;
}
return;
}
/* throw away the result and perform attr search */
return;
return;
"returned more than one result!\n");
return;
}
}
return;
}
return;
}
}
static errno_t
struct tevent_req *req,
struct ldb_result **_res,
struct sss_domain_info **_domain)
{
struct ifp_user_get_attr_state);
/* Did the request end with success but with no data? */
return ENOENT;
}
if (_res) {
}
if (_domain) {
}
return EOK;
}
{
};
return ssh_cli_protocol_version;
}
/* This is a throwaway method to ease the review of the patch.
* It will be removed later */
{
const char *request;
}
}
return EOK; /* handled */
}
"Ping() only accepts ping as a param\n");
}
}