diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2011-05-20 03:48:05 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2011-08-15 09:16:39 -0400 |
commit | e79d23932ef9d52cf4eb32ddec2d0a9b3af9a9eb (patch) | |
tree | 4dc9339ee81eb20437e7091b77c7cc7ea19782c1 /src/providers/proxy | |
parent | 8a1738f9379a1b8fb5c95c3df649e014ff5a1434 (diff) | |
download | sssd-e79d23932ef9d52cf4eb32ddec2d0a9b3af9a9eb.tar.gz sssd-e79d23932ef9d52cf4eb32ddec2d0a9b3af9a9eb.tar.bz2 sssd-e79d23932ef9d52cf4eb32ddec2d0a9b3af9a9eb.zip |
sysdb refactoring: memory context deleted
This patch deletes memory context parameter in those places in sysdb
where it is not necessary. The code using modified functions has been
updated. Tests updated as well.
Diffstat (limited to 'src/providers/proxy')
-rw-r--r-- | src/providers/proxy/proxy_auth.c | 3 | ||||
-rw-r--r-- | src/providers/proxy/proxy_id.c | 18 |
2 files changed, 10 insertions, 11 deletions
diff --git a/src/providers/proxy/proxy_auth.c b/src/providers/proxy/proxy_auth.c index 57eb483c..f92c6471 100644 --- a/src/providers/proxy/proxy_auth.c +++ b/src/providers/proxy/proxy_auth.c @@ -759,8 +759,7 @@ static void proxy_child_done(struct tevent_req *req) } talloc_set_destructor((TALLOC_CTX *)password, password_destructor); - ret = sysdb_cache_password(client_ctx, - client_ctx->be_req->be_ctx->sysdb, + ret = sysdb_cache_password(client_ctx->be_req->be_ctx->sysdb, pd->user, password); /* password caching failures are not fatal errors */ diff --git a/src/providers/proxy/proxy_id.c b/src/providers/proxy/proxy_id.c index b4dcac7c..041e25f2 100644 --- a/src/providers/proxy/proxy_id.c +++ b/src/providers/proxy/proxy_id.c @@ -97,7 +97,7 @@ static int get_pw_name(TALLOC_CTX *mem_ctx, break; } - ret = sysdb_store_user(tmpctx, sysdb, + ret = sysdb_store_user(sysdb, pwd->pw_name, pwd->pw_passwd, pwd->pw_uid, @@ -212,7 +212,7 @@ static int get_pw_uid(TALLOC_CTX *mem_ctx, break; } - ret = sysdb_store_user(tmpctx, sysdb, + ret = sysdb_store_user(sysdb, pwd->pw_name, pwd->pw_passwd, pwd->pw_uid, @@ -241,7 +241,7 @@ static int get_pw_uid(TALLOC_CTX *mem_ctx, DEBUG(7, ("User %d does not exist (or is invalid) on remote server," " deleting!\n", uid)); - ret = sysdb_delete_user(tmpctx, sysdb, NULL, uid); + ret = sysdb_delete_user(sysdb, NULL, uid); if (ret) { goto done; } @@ -352,7 +352,7 @@ again: goto again; /* skip */ } - ret = sysdb_store_user(tmpctx, sysdb, + ret = sysdb_store_user(sysdb, pwd->pw_name, pwd->pw_passwd, pwd->pw_uid, @@ -515,7 +515,7 @@ again: members = NULL; } - ret = sysdb_store_group(tmpctx, sysdb, + ret = sysdb_store_group(sysdb, grp->gr_name, grp->gr_gid, members, @@ -666,7 +666,7 @@ again: members = NULL; } - ret = sysdb_store_group(tmpctx, sysdb, + ret = sysdb_store_group(sysdb, grp->gr_name, grp->gr_gid, members, @@ -691,7 +691,7 @@ again: DEBUG(7, ("Group %d does not exist (or is invalid) on remote server," " deleting!\n", gid)); - ret = sysdb_delete_group(tmpctx, sysdb, NULL, gid); + ret = sysdb_delete_group(sysdb, NULL, gid); if (ret) { goto done; } @@ -821,7 +821,7 @@ again: members = NULL; } - ret = sysdb_store_group(tmpctx, sysdb, + ret = sysdb_store_group(sysdb, grp->gr_name, grp->gr_gid, members, @@ -928,7 +928,7 @@ static int get_initgr(TALLOC_CTX *mem_ctx, break; } - ret = sysdb_store_user(tmpctx, sysdb, + ret = sysdb_store_user(sysdb, pwd->pw_name, pwd->pw_passwd, pwd->pw_uid, |