diff options
author | Simo Sorce <ssorce@redhat.com> | 2009-04-11 00:18:23 -0400 |
---|---|---|
committer | Simo Sorce <ssorce@redhat.com> | 2009-04-13 09:07:04 -0400 |
commit | f16705ecade500f77b525d1a3df0109196c98ee0 (patch) | |
tree | 972b1dba612fa52dd5f9f98b098aa5ad31d2b6f6 /server/providers/proxy.c | |
parent | a89fce4904ecb1169026238a6952d4d6a1995c7f (diff) | |
download | sssd-f16705ecade500f77b525d1a3df0109196c98ee0.tar.gz sssd-f16705ecade500f77b525d1a3df0109196c98ee0.tar.xz sssd-f16705ecade500f77b525d1a3df0109196c98ee0.zip |
Always pass full domain info
Change sysdb to always passwd sss_domain_info, not just the domain name.
This way domain specific options can always be honored at the db level.
Diffstat (limited to 'server/providers/proxy.c')
-rw-r--r-- | server/providers/proxy.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/server/providers/proxy.c b/server/providers/proxy.c index 1b4a83002..907f044e3 100644 --- a/server/providers/proxy.c +++ b/server/providers/proxy.c @@ -308,7 +308,7 @@ static void get_pw_name(struct be_req *req, char *name) switch (status) { case NSS_STATUS_NOTFOUND: data->dn = sysdb_user_dn(req->be_ctx->sysdb, data, - req->be_ctx->domain, name); + req->be_ctx->domain->name, name); if (!data->dn) return proxy_reply(req, ENOMEM, "Out of memory"); @@ -376,8 +376,10 @@ static void get_pw_uid(struct be_req *req, uid_t uid) /* FIXME: verify user does not have gid=0 as these are invalid values */ if (data->pwd->pw_gid == 0) { data->dn = sysdb_user_dn(req->be_ctx->sysdb, data, - req->be_ctx->domain, data->pwd->pw_name); - ret = sysdb_transaction(data, req->be_ctx->sysdb, del_db_entry, data); + req->be_ctx->domain->name, + data->pwd->pw_name); + ret = sysdb_transaction(data, req->be_ctx->sysdb, + del_db_entry, data); break; } @@ -580,7 +582,7 @@ static void get_gr_name(struct be_req *req, char *name) switch (status) { case NSS_STATUS_NOTFOUND: data->dn = sysdb_group_dn(req->be_ctx->sysdb, data, - req->be_ctx->domain, name); + req->be_ctx->domain->name, name); if (!data->dn) return proxy_reply(req, ENOMEM, "Out of memory"); @@ -647,8 +649,10 @@ static void get_gr_gid(struct be_req *req, gid_t gid) /* FIXME: verify group does not have gid=0 as this is invalid */ if (data->grp->gr_gid == 0) { data->dn = sysdb_group_dn(req->be_ctx->sysdb, data, - req->be_ctx->domain, data->grp->gr_name); - ret = sysdb_transaction(data, req->be_ctx->sysdb, del_db_entry, data); + req->be_ctx->domain->name, + data->grp->gr_name); + ret = sysdb_transaction(data, req->be_ctx->sysdb, + del_db_entry, data); break; } @@ -952,7 +956,7 @@ static void get_initgr_user(struct be_req *req, char *name) switch (status) { case NSS_STATUS_NOTFOUND: data->dn = sysdb_user_dn(req->be_ctx->sysdb, data, - req->be_ctx->domain, name); + req->be_ctx->domain->name, name); if (!data->dn) return proxy_reply(req, ENOMEM, "Out of memory"); |