Skip to content

Commit

Permalink
ipa s2n: Remove check for SYSDB_UPN
Browse files Browse the repository at this point in the history
After b3d7a4f we no longer use
the 'upn' variable. During certain codepaths to ipa_s2n_save_objects()
SYSDB_UPN is expected to be missing, so no need to check for it.
  • Loading branch information
justin-stephenson committed May 30, 2024
1 parent d032318 commit 1356f05
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/providers/ipa/ipa_s2n_exop.c
Original file line number Diff line number Diff line change
Expand Up @@ -2468,7 +2468,6 @@ static errno_t ipa_s2n_save_objects(struct sss_domain_info *dom,
time_t now;
struct sss_nss_homedir_ctx homedir_ctx;
char *name = NULL;
char *upn = NULL;
gid_t gid;
gid_t orig_gid = 0;
TALLOC_CTX *tmp_ctx;
Expand Down Expand Up @@ -2543,22 +2542,6 @@ static errno_t ipa_s2n_save_objects(struct sss_domain_info *dom,
DEBUG(SSSDBG_OP_FAILURE, "sysdb_attrs_get_string failed.\n");
goto done;
}

ret = sysdb_attrs_get_string(attrs->sysdb_attrs, SYSDB_UPN, &tmp_str);
if (ret == EOK) {
upn = talloc_strdup(tmp_ctx, tmp_str);
if (upn == NULL) {
DEBUG(SSSDBG_OP_FAILURE, "talloc_strdup failed.\n");
ret = ENOMEM;
goto done;
}
DEBUG(SSSDBG_TRACE_ALL, "Found original AD upn [%s].\n", upn);
} else if (ret == ENOENT) {
upn = NULL;
} else {
DEBUG(SSSDBG_OP_FAILURE, "sysdb_attrs_get_string failed.\n");
goto done;
}
}

if (strcmp(dom->name, attrs->domain_name) != 0) {
Expand Down

0 comments on commit 1356f05

Please sign in to comment.