[master] 7ff31e9 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.
Poul-Henning Kamp
phk at varnish-cache.org
Mon May 16 11:39:16 CEST 2011
commit 7ff31e985171e79f2971863b7fc9adf4b01dac3d
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon May 16 09:38:23 2011 +0000
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.
diff --git a/bin/varnishd/cache_cli.c b/bin/varnishd/cache_cli.c
index 9592b6e..0ea5ba7 100644
--- a/bin/varnishd/cache_cli.c
+++ b/bin/varnishd/cache_cli.c
@@ -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);
diff --git a/bin/varnishd/mgt_cli.c b/bin/varnishd/mgt_cli.c
index 4b380e2..4390866 100644
--- a/bin/varnishd/mgt_cli.c
+++ b/bin/varnishd/mgt_cli.c
@@ -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);
diff --git a/include/cli_serve.h b/include/cli_serve.h
index 0f5d047..d834b4d 100644
--- a/include/cli_serve.h
+++ b/include/cli_serve.h
@@ -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);
diff --git a/lib/libvarnish/cli_serve.c b/lib/libvarnish/cli_serve.c
index 36197b0..a666654 100644
--- a/lib/libvarnish/cli_serve.c
+++ b/lib/libvarnish/cli_serve.c
@@ -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);
More information about the varnish-commit
mailing list