summaryrefslogtreecommitdiffstats
path: root/src/responder/pam/pamsrv_cmd.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2012-11-16 20:25:42 +0000
committerJakub Hrozek <jhrozek@redhat.com>2012-11-19 15:30:57 +0100
commit9342c9bfb794bde7c54928d73cb41d33e3b4917f (patch)
tree0a693041fd96efdbb84c1dfb789c54d0fd6a4b6a /src/responder/pam/pamsrv_cmd.c
parent39d3e4a184fc64c252ea276e1319ed6377d245ff (diff)
downloadsssd-9342c9bfb794bde7c54928d73cb41d33e3b4917f.tar.gz
sssd-9342c9bfb794bde7c54928d73cb41d33e3b4917f.tar.xz
sssd-9342c9bfb794bde7c54928d73cb41d33e3b4917f.zip
Refactor the way subdomain accounts are saved
The original sysdb code had a strong assumption that only users from one domain are saved in the databse, with the subdomain feature, we have changed reality, but have not adjusted all the code arund the sysdb calls to not rely on the original assumption. One of the side effects of this incongrunece is that currently group memberships do not return fully qualified names for subdomain users as they should. In oreder to fix this and other potential issues surrounding the violation of the original assumption, we need to fully qualify subdomain user names. By savin them fully qualified we do not risk aliasing local users and have group memberhips or other name based matching code mistake a domain user with subdomain usr or vice versa.
Diffstat (limited to 'src/responder/pam/pamsrv_cmd.c')
-rw-r--r--src/responder/pam/pamsrv_cmd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/responder/pam/pamsrv_cmd.c b/src/responder/pam/pamsrv_cmd.c
index 1702a0e91..426964220 100644
--- a/src/responder/pam/pamsrv_cmd.c
+++ b/src/responder/pam/pamsrv_cmd.c
@@ -1217,7 +1217,10 @@ static int pam_check_user_search(struct pam_auth_req *preq)
preq->pd->pam_status = PAM_SYSTEM_ERR;
return EFAULT;
}
- ret = sysdb_getpwnam(preq, sysdb, name, &preq->res);
+
+ /* if this is a subdomain we need to search for the fully qualified
+ * name in the database */
+ ret = sysdb_subdom_getpwnam(preq, sysdb, name, &preq->res);
if (ret != EOK) {
DEBUG(1, ("Failed to make request to our cache!\n"));
return EIO;