diff options
Diffstat (limited to 'src/ctl.c')
-rw-r--r-- | src/ctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -141,7 +141,7 @@ static struct ctlio_command cmdtab[] = { { "noop", "no operation", CTL_ALL_STATES, 1, 1, cmd_noop }, { "id", "identify the instance", - CTL_AUTHENTICATED_STATE, 1, 1, cmd_id }, + CTL_ADMIN_STATE, 1, 1, cmd_id }, { "quit", "quit the session", CTL_ALL_STATES, 1, 1, cmd_quit }, { "help", "display help", @@ -300,7 +300,7 @@ ctlio_do_command (struct ctlio *io) } if (!(cmd->states & io->state)) { - ctlio_reply (io, "510", "command not valid in state"); + ctlio_reply (io, "510", "permission denied"); return; } if (cmd->minargs && io->ws.ws_wordc < cmd->minargs) @@ -442,6 +442,7 @@ cmd_id (struct ctlio *io, size_t argc, char **argv) #if HAVE_DECL_PROGRAM_INVOCATION_NAME ctlio_printf (io, "Binary: %s%s", program_invocation_name, CRLF); #endif + ctlio_printf (io, "PID: %lu%s", (unsigned long) getpid (), CRLF); ctlio_printf (io, "Instance: %s%s", instance, CRLF); ctlio_eot (io); } |