/*
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
const char **attrs,
struct ldb_result *res)
{
int ai;
/* Construct a reply */
if (!reply) {
}
&iter_dict);
if (!dbret) {
}
SYSDB_NAME, domain);
"Cannot convert SYSDB_NAME to output format [%d]: %s\n",
}
"Cannot convert SYSDB_NAME_ALIAS to output format [%d]: %s\n",
}
"Cannot add attribute domainname to message\n");
continue;
}
}
"Attribute %s not present or has no values\n",
continue;
}
"Cannot add attribute %s to message\n",
continue;
}
}
}
if (!dbret) {
}
}
struct ifp_user_get_groups_state {
};
struct ldb_result *res);
{
}
}
}
}
const char *, 2);
}
}
}
state);
return EOK;
}
{
"No such user\n"));
return;
"Failed to read attribute\n"));
return;
}
return;
}
state);
}
{
"Failed to resolve groupnames\n"));
return;
}
}
"Failed to build a reply\n"));
return;
}
}
static errno_t
struct ldb_result *res)
{
const char *name;
const char **groupnames;
/* one less, the first one is the user entry */
if (groupnames == NULL) {
}
gri = 0;
for (i = 0; i < num; i++) {
SYSDB_NAME, NULL);
continue;
}
"Unable to get sized name for %s [%d]: %s\n",
continue;
}
continue;
}
gri++;
}
}
struct ifp_user_get_attr_state {
const char *inp;
const char **attrs;
char *inp_name;
char *domname;
};
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;
}
/* IFP serves both POSIX and application domains. Requests that need
* to differentiate between the two must be qualified
*/
return;
}
}
{
char *fqdn;
return;
}
return;
}
/* throw away the result and perform attr search */
return;
return;
"returned more than one result!\n");
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;
}
{
"Invalid infopipe context!");
return ERR_SBUS_REQUEST_HANDLED;
}
}
"Ping() only accepts \"ping\" as a param\n");
return ERR_SBUS_REQUEST_HANDLED;
}
}