diff options
author | Jan Zeleny <jzeleny@redhat.com> | 2012-04-23 14:08:00 -0400 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-05-31 15:46:27 -0400 |
commit | c193cdcb43bffc1eac1bde6dfb0311e033e0c12f (patch) | |
tree | 78a6f8c529856da769c894d6bd20e9ef95667d07 /src/db/sysdb.c | |
parent | a475628466a532213669864de4d5ecead563464d (diff) | |
download | sssd-c193cdcb43bffc1eac1bde6dfb0311e033e0c12f.tar.gz sssd-c193cdcb43bffc1eac1bde6dfb0311e033e0c12f.tar.bz2 sssd-c193cdcb43bffc1eac1bde6dfb0311e033e0c12f.zip |
Ghost members - sysdb upgrade routine
It is remotely possible to have sysdb in an inconsistent state that
might need upgrade. Consider scenario when user asks for group
information. Some fake users are added as a part of this operation.
Before users can be fully resolved and stored properly, SSSD is shut
down and upgrade is performed.
In this case we need to go over all fake user records (uidNumber=0) and
replace each of them with ghost record in all group objects that are stated in
its memberof attribute.
Diffstat (limited to 'src/db/sysdb.c')
-rw-r--r-- | src/db/sysdb.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c index 41c677d7..fd76f73c 100644 --- a/src/db/sysdb.c +++ b/src/db/sysdb.c @@ -1061,6 +1061,13 @@ int sysdb_domain_init_internal(TALLOC_CTX *mem_ctx, } } + if (strcmp(version, SYSDB_VERSION_0_10) == 0) { + ret = sysdb_upgrade_10(sysdb, &version); + if (ret != EOK) { + goto done; + } + } + /* The version should now match SYSDB_VERSION. * If not, it means we didn't match any of the * known older versions. The DB might be |