Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gpo: use correct base dn #4840

Closed
sssd-bot opened this issue May 2, 2020 · 1 comment
Closed

gpo: use correct base dn #4840

sssd-bot opened this issue May 2, 2020 · 1 comment
Assignees
Labels
Closed: Fixed Issue was closed as fixed.

Comments

@sssd-bot
Copy link

sssd-bot commented May 2, 2020

Cloned from Pagure issue: https://pagure.io/SSSD/sssd/issue/3847


GPO code in ad_gpo_connect_done converts domain name to base dn which may not be correct. For example if the domain name in sssd.conf is AD, computed base is then dc=AD, but the correct base dn is dc=ad,dc=vm. This makes gpo code to fail.

    /* Convert the domain name into domain DN */
    ret = domain_to_basedn(state, state->host_domain->name, &domain_dn);
    if (ret != EOK) {
        DEBUG(SSSDBG_OP_FAILURE,
              "Cannot convert domain name [%s] to base DN [%d]: %s\n",
               state->host_domain->name, ret, sss_strerror(ret));
        goto done;
    }

    /* SDAP_OC_USER objectclass covers both users and computers */
    filter = talloc_asprintf(state,
                             "(&(objectclass=%s)(%s=%s))",
                             state->opts->user_map[SDAP_OC_USER].name,
                             state->opts->user_map[SDAP_AT_USER_NAME].name,
                             sam_account_name);
    if (filter == NULL) {
        ret = ENOMEM;
        goto done;
    }

    subreq = sdap_get_generic_send(state, state->ev, state->opts,
                                   sdap_id_op_handle(state->sdap_op),
                                   domain_dn, LDAP_SCOPE_SUBTREE,
^^^ correct base dn should be used
                                   filter, attrs, NULL, 0,
                                   state->timeout,
                                   false);

    if (subreq == NULL) {
        DEBUG(SSSDBG_OP_FAILURE, "sdap_get_generic_send failed.\n");
        ret = EIO;
        goto done;
    }

    tevent_req_set_callback(subreq, ad_gpo_target_dn_retrieval_done, req);

Comments


Comment from jhrozek at 2018-10-11 15:34:11

Metadata Update from @jhrozek:

  • Issue assigned to mzidek

Comment from pbrezina at 2020-03-13 15:00:51

Metadata Update from @pbrezina:

  • Issue tagged with: Future milestone, New hire task

Comment from pbrezina at 2020-04-14 13:40:21

Metadata Update from @pbrezina:

  • Issue assigned to avisiedo (was: mzidek)
avisiedo added a commit to avisiedo/sssd that referenced this issue May 13, 2020
GPO code in ad_gpo_connect_done converts domain name to
base dn which may not be correct. For example if the
domain name in sssd.conf is AD, computed base is then
dc=AD, but the correct base dn is dc=ad,dc=vm. This makes
gpo code to fail.

Resolves: SSSD#4840

SSSD#4840
avisiedo added a commit to avisiedo/sssd that referenced this issue May 13, 2020
GPO code in ad_gpo_connect_done converts domain name to
base dn which may not be correct. For example if the
domain name in sssd.conf is AD, computed base is then
dc=AD, but the correct base dn is dc=ad,dc=vm. This makes
gpo code to fail.

Resolves: SSSD#4840

SSSD#4840
avisiedo added a commit to avisiedo/sssd that referenced this issue May 20, 2020
GPO code in ad_gpo_connect_done converts domain name to
base dn which may not be correct. For example if the
domain name in sssd.conf is AD, computed base is then
dc=AD, but the correct base dn is dc=ad,dc=vm. This makes
gpo code to fail.

Resolves: SSSD#4840

SSSD#4840
avisiedo added a commit to avisiedo/sssd that referenced this issue May 20, 2020
Append unit test for basedn_to_domain function

Resolves: SSSD#4840

SSSD#4840
avisiedo added a commit to avisiedo/sssd that referenced this issue May 21, 2020
GPO code in ad_gpo_connect_done converts domain name to
base dn which may not be correct. For example if the
domain name in sssd.conf is AD, computed base is then
dc=AD, but the correct base dn is dc=ad,dc=vm. This makes
gpo code to fail.

Resolves: SSSD#4840

SSSD#4840
avisiedo added a commit to avisiedo/sssd that referenced this issue May 25, 2020
Fixing some trailing characters that I forgot into the change.

Resolves:
SSSD#4840
avisiedo added a commit to avisiedo/sssd that referenced this issue May 26, 2020
Fix whitespaces that remains into the changes yet.

SSSD#4840
avisiedo added a commit to avisiedo/sssd that referenced this issue May 29, 2020
GPO code in ad_gpo_connect_done converts domain name to
base dn which may not be correct. For example if the
domain name in sssd.conf is AD, computed base is then
dc=AD, but the correct base dn is dc=ad,dc=vm. This makes
gpo code to fail.

Resolves:
SSSD#4840
@pbrezina pbrezina assigned pbrezina and unassigned avisiedo Jul 9, 2020
pbrezina added a commit to pbrezina/sssd that referenced this issue Jul 9, 2020
Domain name in SSSD configuration does not have to be the same
as the AD domain. GPO did not work in this case.

Resolves:
SSSD#4840
pbrezina added a commit to pbrezina/sssd that referenced this issue Jul 9, 2020
Domain name in SSSD configuration does not have to be the same
as the AD domain. GPO did not work in this case.

Steps to reproduce:
1. Join SSSD to an AD domain (ad.vm)
2. Create GPO that is applicable to the host/user
3. Name the SSSD domain differently ([domain/AD])
4. Try to authenticate as AD user

Resolves:
SSSD#4840
@alexey-tikhonov alexey-tikhonov linked a pull request Jul 9, 2020 that will close this issue
pbrezina added a commit to pbrezina/sssd that referenced this issue Jul 23, 2020
Domain name in SSSD configuration does not have to be the same
as the AD domain. GPO did not work in this case.

Steps to reproduce:
1. Join SSSD to an AD domain (ad.vm)
2. Create GPO that is applicable to the host/user
3. Name the SSSD domain differently ([domain/AD])
4. Try to authenticate as AD user

Resolves:
SSSD#4840
@pbrezina
Copy link
Member

pbrezina commented Sep 3, 2020

Pushed PR: #5239

  • master
    • a0792b3 - gpo: use correct base dn
    • d79f593 - gpo: remove unused variable domain_dn

@pbrezina pbrezina added the Closed: Fixed Issue was closed as fixed. label Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed: Fixed Issue was closed as fixed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants