summaryrefslogtreecommitdiffstats
path: root/src/providers/proxy
diff options
context:
space:
mode:
authorMichal Zidek <mzidek@redhat.com>2013-10-11 15:20:40 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-11-15 20:20:18 +0100
commit4fcc50e133f90cd4c5931a3ac48c84cb628b16fc (patch)
treeeaeb5331b3e54df8f9cafe9db65293d7b9ec04cc /src/providers/proxy
parentb3292840ebaa747a9fd596ff47cc5d18198361d0 (diff)
downloadsssd-4fcc50e133f90cd4c5931a3ac48c84cb628b16fc.tar.gz
sssd-4fcc50e133f90cd4c5931a3ac48c84cb628b16fc.tar.xz
sssd-4fcc50e133f90cd4c5931a3ac48c84cb628b16fc.zip
SYSDB: Drop the sysdb_ctx parameter from the sysdb_services module
Diffstat (limited to 'src/providers/proxy')
-rw-r--r--src/providers/proxy/proxy.h2
-rw-r--r--src/providers/proxy/proxy_id.c4
-rw-r--r--src/providers/proxy/proxy_services.c31
3 files changed, 16 insertions, 21 deletions
diff --git a/src/providers/proxy/proxy.h b/src/providers/proxy/proxy.h
index 29dad6d51..179245fed 100644
--- a/src/providers/proxy/proxy.h
+++ b/src/providers/proxy/proxy.h
@@ -154,14 +154,12 @@ errno_t get_netgroup(struct proxy_id_ctx *ctx,
const char *name);
errno_t get_serv_byname(struct proxy_id_ctx *ctx,
- struct sysdb_ctx *sysdb,
struct sss_domain_info *dom,
const char *name,
const char *protocol);
errno_t
get_serv_byport(struct proxy_id_ctx *ctx,
- struct sysdb_ctx *sysdb,
struct sss_domain_info *dom,
const char *be_filter,
const char *protocol);
diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c
index a0db2e56d..625d72bc7 100644
--- a/src/providers/proxy/proxy_id.c
+++ b/src/providers/proxy/proxy_id.c
@@ -1477,7 +1477,7 @@ void proxy_get_account_info(struct be_req *breq)
return be_req_terminate(breq, DP_ERR_FATAL,
ENODEV, "Services are not supported");
}
- ret = get_serv_byname(ctx, sysdb, domain,
+ ret = get_serv_byname(ctx, domain,
ar->filter_value,
ar->extra_value);
break;
@@ -1486,7 +1486,7 @@ void proxy_get_account_info(struct be_req *breq)
return be_req_terminate(breq, DP_ERR_FATAL,
ENODEV, "Services are not supported");
}
- ret = get_serv_byport(ctx, sysdb, domain,
+ ret = get_serv_byport(ctx, domain,
ar->filter_value,
ar->extra_value);
break;
diff --git a/src/providers/proxy/proxy_services.c b/src/providers/proxy/proxy_services.c
index 474959039..a32537236 100644
--- a/src/providers/proxy/proxy_services.c
+++ b/src/providers/proxy/proxy_services.c
@@ -28,8 +28,7 @@
#define BUFLEN 1024
errno_t
-proxy_save_service(struct sysdb_ctx *sysdb,
- struct sss_domain_info *domain,
+proxy_save_service(struct sss_domain_info *domain,
struct servent *svc,
bool lowercase,
uint64_t cache_timeout)
@@ -72,7 +71,7 @@ proxy_save_service(struct sysdb_ctx *sysdb,
goto done;
}
- ret = sysdb_store_service(sysdb, domain,
+ ret = sysdb_store_service(domain,
cased_name,
ntohs(svc->s_port),
cased_aliases,
@@ -87,7 +86,6 @@ done:
errno_t
get_serv_byname(struct proxy_id_ctx *ctx,
- struct sysdb_ctx *sysdb,
struct sss_domain_info *dom,
const char *name,
const char *protocol)
@@ -117,11 +115,11 @@ get_serv_byname(struct proxy_id_ctx *ctx,
if (status == NSS_STATUS_NOTFOUND) {
/* Make sure we remove it from the cache */
- ret = sysdb_svc_delete(sysdb, dom, name, 0, protocol);
+ ret = sysdb_svc_delete(dom, name, 0, protocol);
} else {
/* Results found. Save them into the cache */
- ret = proxy_save_service(sysdb, dom, result,
+ ret = proxy_save_service(dom, result,
!dom->case_sensitive,
dom->service_timeout);
}
@@ -133,7 +131,6 @@ done:
errno_t
get_serv_byport(struct proxy_id_ctx *ctx,
- struct sysdb_ctx *sysdb,
struct sss_domain_info *dom,
const char *be_filter,
const char *protocol)
@@ -171,10 +168,10 @@ get_serv_byport(struct proxy_id_ctx *ctx,
if (status == NSS_STATUS_NOTFOUND) {
/* Make sure we remove it from the cache */
- ret = sysdb_svc_delete(sysdb, dom, NULL, port, protocol);
+ ret = sysdb_svc_delete(dom, NULL, port, protocol);
} else {
/* Results found. Save them into the cache */
- ret = proxy_save_service(sysdb, dom, result,
+ ret = proxy_save_service(dom, result,
!dom->case_sensitive,
dom->service_timeout);
}
@@ -309,14 +306,14 @@ enum_services(struct proxy_id_ctx *ctx,
break;
}
- ret = sysdb_store_service(sysdb, dom,
- svc->s_name,
- svc->s_port,
- cased_aliases,
- protocols,
- NULL, NULL,
- dom->service_timeout,
- now);
+ ret = sysdb_store_service(dom,
+ svc->s_name,
+ svc->s_port,
+ cased_aliases,
+ protocols,
+ NULL, NULL,
+ dom->service_timeout,
+ now);
if (ret) {
/* Do not fail completely on errors.
* Just report the failure to save and go on */