kadm5/kadmin: Add read-only mode

Now we can have read-only kadmind instances.
This commit is contained in:
Nicolas Williams
2020-08-19 23:49:03 -05:00
parent 5447b81fb1
commit ea83f068e9
23 changed files with 274 additions and 68 deletions

View File

@@ -42,6 +42,7 @@ static char *keytab_str = sHDB;
static int help_flag;
static int version_flag;
static int debug_flag;
static int readonly_flag;
static char *port_str;
char *realm;
@@ -81,6 +82,8 @@ static struct getargs args[] = {
},
{ "ports", 'p', arg_string, &port_str,
"ports to listen to", "port" },
{ "read-only", 0, arg_flag, &readonly_flag,
"read-only operations", NULL },
{ "help", 'h', arg_flag, &help_flag, NULL, NULL },
{ "version", 'v', arg_flag, &version_flag, NULL, NULL }
};
@@ -211,7 +214,7 @@ main(int argc, char **argv)
if(realm)
krb5_set_default_realm(context, realm); /* XXX */
kadmind_loop(context, keytab, sfd);
kadmind_loop(context, keytab, sfd, readonly_flag);
return 0;
}