Commit 7ff31e98 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Revert most of the last commit, we don't need to run the child

CLI in authorized mode, since mgt_ask_child() does not send
here CLI commands.
parent 8d15ec9f
......@@ -107,7 +107,7 @@ CLI_Run(void)
add_check = 1;
AN(CLS_AddFd(cls, heritage.cli_in, heritage.cli_out, NULL, NULL, 1));
AN(CLS_AddFd(cls, heritage.cli_in, heritage.cli_out, NULL, NULL));
do {
i = CLS_Poll(cls, -1);
......
......@@ -404,7 +404,7 @@ mgt_cli_setup(int fdi, int fdo, int verbose, const char *ident, mgt_cli_close_f
if (cls == NULL)
mgt_cli_init_cls();
cli = CLS_AddFd(cls, fdi, fdo, closefunc, priv, MCF_NOAUTH);
cli = CLS_AddFd(cls, fdi, fdo, closefunc, priv);
cli->ident = strdup(ident);
......
......@@ -32,7 +32,7 @@ typedef void cls_cb_f(void *priv);
typedef void cls_cbc_f(const struct cli*);
struct cls *CLS_New(cls_cbc_f *before, cls_cbc_f *after, unsigned maxlen);
struct cli *CLS_AddFd(struct cls *cs, int fdi, int fdo, cls_cb_f *closefunc,
void *priv, unsigned auth);
void *priv);
int CLS_AddFunc(struct cls *cs, unsigned auth, struct cli_proto *clp);
int CLS_Poll(struct cls *cs, int timeout);
int CLS_PollFd(struct cls *cs, int fd, int timeout);
......
......@@ -390,8 +390,7 @@ CLS_New(cls_cbc_f *before, cls_cbc_f *after, unsigned maxlen)
}
struct cli *
CLS_AddFd(struct cls *cs, int fdi, int fdo, cls_cb_f *closefunc, void *priv,
unsigned auth)
CLS_AddFd(struct cls *cs, int fdi, int fdo, cls_cb_f *closefunc, void *priv)
{
struct cls_fd *cfd;
......@@ -407,7 +406,6 @@ CLS_AddFd(struct cls *cs, int fdi, int fdo, cls_cb_f *closefunc, void *priv,
cfd->cli->magic = CLI_MAGIC;
cfd->cli->vlu = VLU_New(cfd, cls_vlu, cs->maxlen);
cfd->cli->sb = vsb_new_auto();
cfd->cli->auth = auth;
cfd->closefunc = closefunc;
cfd->priv = priv;
AN(cfd->cli->sb);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment