summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/db/sysdb.c4
-rw-r--r--src/db/sysdb_private.h6
-rw-r--r--src/db/sysdb_upgrade.c20
3 files changed, 17 insertions, 13 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index 7d6ef190..62c33f23 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -1102,14 +1102,14 @@ int sysdb_domain_init_internal(TALLOC_CTX *mem_ctx,
}
if (strcmp(version, SYSDB_VERSION_0_10) == 0) {
- ret = sysdb_upgrade_10(sysdb, &version);
+ ret = sysdb_upgrade_10(sysdb, domain, &version);
if (ret != EOK) {
goto done;
}
}
if (strcmp(version, SYSDB_VERSION_0_11) == 0) {
- ret = sysdb_upgrade_11(sysdb, &version);
+ ret = sysdb_upgrade_11(sysdb, domain, &version);
if (ret != EOK) {
goto done;
}
diff --git a/src/db/sysdb_private.h b/src/db/sysdb_private.h
index 1e361778..4eea0904 100644
--- a/src/db/sysdb_private.h
+++ b/src/db/sysdb_private.h
@@ -113,8 +113,10 @@ int sysdb_upgrade_06(struct sysdb_ctx *sysdb, const char **ver);
int sysdb_upgrade_07(struct sysdb_ctx *sysdb, const char **ver);
int sysdb_upgrade_08(struct sysdb_ctx *sysdb, const char **ver);
int sysdb_upgrade_09(struct sysdb_ctx *sysdb, const char **ver);
-int sysdb_upgrade_10(struct sysdb_ctx *sysdb, const char **ver);
-int sysdb_upgrade_11(struct sysdb_ctx *sysdb, const char **ver);
+int sysdb_upgrade_10(struct sysdb_ctx *sysdb, struct sss_domain_info *domain,
+ const char **ver);
+int sysdb_upgrade_11(struct sysdb_ctx *sysdb, struct sss_domain_info *domain,
+ const char **ver);
int sysdb_upgrade_12(struct sysdb_ctx *sysdb, const char **ver);
int sysdb_upgrade_13(struct sysdb_ctx *sysdb, const char **ver);
int sysdb_upgrade_14(struct sysdb_ctx *sysdb, const char **ver);
diff --git a/src/db/sysdb_upgrade.c b/src/db/sysdb_upgrade.c
index 205c5bd0..673c633e 100644
--- a/src/db/sysdb_upgrade.c
+++ b/src/db/sysdb_upgrade.c
@@ -424,7 +424,7 @@ int sysdb_check_upgrade_02(struct sss_domain_info *domains,
* then remove them from local */
domain_dn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb,
- SYSDB_DOM_BASE, sysdb->domain->name);
+ SYSDB_DOM_BASE, dom->name);
if (!domain_dn) {
ret = ENOMEM;
goto done;
@@ -439,13 +439,13 @@ int sysdb_check_upgrade_02(struct sss_domain_info *domains,
}
users_dn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb,
- SYSDB_TMPL_USER_BASE, sysdb->domain->name);
+ SYSDB_TMPL_USER_BASE, dom->name);
if (!users_dn) {
ret = ENOMEM;
goto done;
}
groups_dn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb,
- SYSDB_TMPL_GROUP_BASE, sysdb->domain->name);
+ SYSDB_TMPL_GROUP_BASE, dom->name);
if (!groups_dn) {
ret = ENOMEM;
goto done;
@@ -1010,7 +1010,8 @@ done:
return ret;
}
-int sysdb_upgrade_10(struct sysdb_ctx *sysdb, const char **ver)
+int sysdb_upgrade_10(struct sysdb_ctx *sysdb, struct sss_domain_info *domain,
+ const char **ver)
{
TALLOC_CTX *tmp_ctx;
@@ -1036,8 +1037,8 @@ int sysdb_upgrade_10(struct sysdb_ctx *sysdb, const char **ver)
return ret;
}
- basedn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb, SYSDB_TMPL_USER_BASE,
- sysdb->domain->name);
+ basedn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb,
+ SYSDB_TMPL_USER_BASE, domain->name);
if (basedn == NULL) {
ret = EIO;
goto done;
@@ -1124,7 +1125,8 @@ done:
return ret;
}
-int sysdb_upgrade_11(struct sysdb_ctx *sysdb, const char **ver)
+int sysdb_upgrade_11(struct sysdb_ctx *sysdb, struct sss_domain_info *domain,
+ const char **ver)
{
TALLOC_CTX *tmp_ctx;
errno_t ret;
@@ -1154,7 +1156,7 @@ int sysdb_upgrade_11(struct sysdb_ctx *sysdb, const char **ver)
}
basedn = ldb_dn_new_fmt(tmp_ctx, sysdb->ldb, SYSDB_TMPL_CUSTOM_SUBTREE,
- AUTOFS_ENTRY_SUBDIR, sysdb->domain->name);
+ AUTOFS_ENTRY_SUBDIR, domain->name);
if (basedn == NULL) {
ret = ENOMEM;
goto done;
@@ -1192,7 +1194,7 @@ int sysdb_upgrade_11(struct sysdb_ctx *sysdb, const char **ver)
continue;
}
- ret = sysdb_save_autofsentry(sysdb, sysdb->domain,
+ ret = sysdb_save_autofsentry(sysdb, domain,
(const char *) val->data,
key, value, NULL);
if (ret != EOK) {