/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2016 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 "db/sysdb_services.h"
#include "responder/nss/nss_protocol.h"
static errno_t
struct sss_domain_info *domain,
struct ldb_message *msg,
const char *requested_protocol,
struct sized_string *_name,
struct sized_string *_protocol,
{
const char *protocol;
const char *name;
return ENOMEM;
}
/* Get name. */
ret = ERR_INTERNAL;
goto done;
}
goto done;
}
/* Get port. */
if (port == 0) {
goto done;
}
/* Get protocol.
*
* Use the requested protocol if present, otherwise take the
* first protocol returned by the sysdb. */
if (requested_protocol != NULL) {
} else {
if (el->num_values == 0) {
goto done;
}
ret = ERR_INTERNAL;
goto done;
}
}
goto done;
}
/* Set output variables. */
done:
return ret;
}
static errno_t
struct sss_domain_info *domain,
struct ldb_message *msg,
const char *name,
struct sized_string **_aliases,
{
const char *alias;
int i;
*_num_aliases = 0;
goto done;
}
goto done;
}
num_aliases = 0;
for (i = 0; i < el->num_values; i++) {
continue;
}
/* Element value remains in the message, we don't need to strdup it. */
num_aliases++;
}
done:
}
return ret;
}
struct nss_cmd_ctx *cmd_ctx,
struct sss_packet *packet,
struct cache_req_result *result)
{
int i;
int j;
return ENOMEM;
}
/* First two fields (length and reserved), filled up later. */
return ret;
}
num_results = 0;
"Unable to get service information, skipping... [%d]: %s\n",
continue;
}
&aliases, &num_aliases);
"Unable to get service aliases, skipping... [%d]: %s\n",
continue;
}
/* Adjust packet size. */
goto done;
}
/* Fill packet. */
/* Store aliases. */
for (j = 0; j < num_aliases; j++) {
goto done;
}
&rp);
}
num_results++;
}
done:
return ret;
}
return EOK;
}