nsssrv_services.c revision 129310e872a0a70e721ba59363e518176ef406d6
52N/A along with this program. If not, see <http://www.gnu.org/licenses/>.
52N/A#include <collection.h>
52N/A#include "responder/nss/nsssrv_private.h"
52N/A#include "responder/nss/nsssrv_services.h"
52N/A#include "responder/common/negcache.h"
52N/A#include "db/sysdb_services.h"
52N/Astruct getserv_ctx {
5N/A char *cased_name;
5N/A char *cased_proto;
5N/Astatic struct tevent_req *
5N/A const char *service_name,
5N/A const char *service_protocol,
5N/A struct sss_domain_info *,
goto immediate;
if (service_protocol) {
goto immediate;
goto immediate;
if (service_name) {
goto immediate;
goto immediate;
while(dom) {
if (!dom) break;
goto immediate;
if (service_name) {
dom,
port,
port,
dom_idx++;
dom,
dom,
goto immediate;
SYSDB_LAST_UPDATE, 0);
SYSDB_CACHE_EXPIRE, 0);
midpoint_refresh = 0;
dom, true,
if (!subreq) {
goto immediate;
dom_idx++;
goto immediate;
return req;
return req;
dom,
return EOK;
char *err_msg;
&err_msg);
goto done;
dom,
dom,
goto done;
done:
static errno_t
return EOK;
static errno_t
unsigned int *count)
unsigned int num, i, j;
const char *orig_name;
char *orig_proto;
char *tmpstr;
rsize = 0;
num = 0;
for (i = 0; i < msg_count; i++) {
SYSDB_SVC_CLASS)) {
rsize = 0;
if (!port) {
num = 0;
goto done;
+ sizeof(uint32_t)
num = 0;
goto done;
if (!el) {
num_aliases = 0;
&rsize);
&rsize);
for (j = 0; j < num_aliases; j++) {
num = 0;
goto done;
&rsize);
num++;
done:
return ENOENT;
return ret;
char **domain_name,
char **service_name,
char **service_protocol);
char *domname;
char *service_name;
char *service_protocol;
if (!dctx) {
goto done;
goto done;
&domname,
goto done;
if (domname) {
goto done;
dctx);
if (!req) {
goto done;
done:
char **domain_name,
char **service_name,
char **service_protocol)
char *rawname;
char *domname;
char *svc_name;
char *protocol;
if (!rawname) {
goto done;
goto done;
namelen = i;
if (!protocol) {
goto done;
goto done;
goto done;
rawname));
goto done;
done:
return ret;
char **service_protocol)
size_t i, j;
char *protocol;
i = port_and_padding_len;
if (!protocol) {
goto done;
goto done;
goto done;
done:
return ret;
char *service_protocol;
if (!dctx) {
goto done;
goto done;
&port,
goto done;
if (!req) {
goto done;
done:
struct setservent_ctx {
static errno_t
static struct tevent_req *
static struct tevent_req *
unsigned int num_domains;
goto immediate;
goto immediate;
return req;
goto immediate;
num_domains = 0;
while (dom) {
num_domains++;
struct dom_ctx,
goto immediate;
goto immediate;
if (!step_ctx) {
goto immediate;
return req;
return req;
static errno_t
if (!req) {
return ENOMEM;
return EOK;
struct lookup_servent_ctx {
static struct tevent_req *
goto immediate;
goto immediate;
goto immediate;
true, SSS_DP_SERVICES,
if (!subreq) {
goto immediate;
return req;
return req;
char *err_msg;
goto done;
done:
static errno_t
return EOK;
void *pvt);
if (!te) {
void *pvt)
static errno_t
return EOK;
if (!cmdctx) {
return ENOMEM;
if (!req) {
goto done;
done:
static errno_t
static errno_t
if (!cmdctx) {
return ENOMEM;
if (!req) {
return EIO;
cmdctx);
return EOK;
static errno_t
int ret;
return EINVAL;
return ret;
return EOK;
static errno_t
none:
return ret;
int ret;
return ret;
done:
return EOK;