diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2016-06-29 16:30:39 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2016-07-07 10:29:52 +0200 |
commit | 6d66c2c465861ff2558f2574eddf8315628ccc6d (patch) | |
tree | 3fef24bc447043e6a75ec2612e5155baeda1f444 /src/monitor | |
parent | ebbeac5c6b8b87ab478ee5a04ec48fbbba0c9efc (diff) | |
download | sssd-6d66c2c465861ff2558f2574eddf8315628ccc6d.tar.gz sssd-6d66c2c465861ff2558f2574eddf8315628ccc6d.tar.xz sssd-6d66c2c465861ff2558f2574eddf8315628ccc6d.zip |
SYSDB: Allow passing a context to sysdb upgrade functions
We decide on whether to upgrade or not based on a pointer value, not a
boolean. This pointer points to a structure that the upgrade invoker
(typically the monitor) can use to fill auxilary data the sysdb upgrade
has no means of instantiating.
Reviewed-by: Sumit Bose <sbose@redhat.com>
Diffstat (limited to 'src/monitor')
-rw-r--r-- | src/monitor/monitor.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/monitor/monitor.c b/src/monitor/monitor.c index 38ac44e4b..e515f0f59 100644 --- a/src/monitor/monitor.c +++ b/src/monitor/monitor.c @@ -2352,6 +2352,7 @@ static int monitor_process_init(struct mt_ctx *ctx, int num_providers; int ret; int error; + struct sysdb_upgrade_ctx db_up_ctx; /* Set up the environment variable for the Kerberos Replay Cache */ ret = confdb_get_string(ctx->cdb, ctx, @@ -2453,7 +2454,8 @@ static int monitor_process_init(struct mt_ctx *ctx, if (!tmp_ctx) { return ENOMEM; } - ret = sysdb_init_ext(tmp_ctx, ctx->domains, true, + + ret = sysdb_init_ext(tmp_ctx, ctx->domains, &db_up_ctx, true, ctx->uid, ctx->gid); if (ret != EOK) { SYSDB_VERSION_ERROR_DAEMON(ret); |