diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2016-07-01 13:26:38 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2016-07-07 10:30:18 +0200 |
commit | a0b824ac01c6b58fe6055d48aa6e29e94219646d (patch) | |
tree | b9154d25cc54ef10e8ce46c58ab5e97dd368d497 /src/tools/sss_override.c | |
parent | 1ea5a9c1930f531b21f8bc67c9c071d8ce533786 (diff) | |
download | sssd-a0b824ac01c6b58fe6055d48aa6e29e94219646d.tar.gz sssd-a0b824ac01c6b58fe6055d48aa6e29e94219646d.tar.xz sssd-a0b824ac01c6b58fe6055d48aa6e29e94219646d.zip |
TOOLS: Some tools command might not need initialization to succeed
Since we want to use the sssctl tool during upgrade, we need to amend
the tools initialization code to not error out if sysdb can't be
instantiated, but rather return errno and let the tool handle the error.
Each tool command now has a 'allowed errno' the command is able to
handle. In this patch iteration, only a single errno can be handled and
only the upgrade command is able to do so.
Reviewed-by: Sumit Bose <sbose@redhat.com>
Diffstat (limited to 'src/tools/sss_override.c')
-rw-r--r-- | src/tools/sss_override.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/tools/sss_override.c b/src/tools/sss_override.c index e497d12b9..45a28fd7f 100644 --- a/src/tools/sss_override.c +++ b/src/tools/sss_override.c @@ -1913,19 +1913,19 @@ static int override_group_export(struct sss_cmdline *cmdline, int main(int argc, const char **argv) { struct sss_route_cmd commands[] = { - {"user-add", NULL, override_user_add}, - {"user-del", NULL, override_user_del}, - {"user-find", NULL, override_user_find}, - {"user-show", NULL, override_user_show}, - {"user-import", NULL, override_user_import}, - {"user-export", NULL, override_user_export}, - {"group-add", NULL, override_group_add}, - {"group-del", NULL, override_group_del}, - {"group-find", NULL, override_group_find}, - {"group-show", NULL, override_group_show}, - {"group-import", NULL, override_group_import}, - {"group-export", NULL, override_group_export}, - {NULL, NULL, NULL} + {"user-add", NULL, 0, override_user_add}, + {"user-del", NULL, 0, override_user_del}, + {"user-find", NULL, 0, override_user_find}, + {"user-show", NULL, 0, override_user_show}, + {"user-import", NULL, 0, override_user_import}, + {"user-export", NULL, 0, override_user_export}, + {"group-add", NULL, 0, override_group_add}, + {"group-del", NULL, 0, override_group_del}, + {"group-find", NULL, 0, override_group_find}, + {"group-show", NULL, 0, override_group_show}, + {"group-import", NULL, 0, override_group_import}, + {"group-export", NULL, 0, override_group_export}, + {NULL, NULL, 0, NULL} }; return sss_tool_main(argc, argv, commands, NULL); |