From 6d66c2c465861ff2558f2574eddf8315628ccc6d Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 29 Jun 2016 16:30:39 +0200 Subject: 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 --- src/monitor/monitor.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/monitor') 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); -- cgit