*/
class HttpRequest;
+class CacheMgrPasswd;
/**
\ingroup CacheManagerAPI
* a CacheManager - the menu system for interacting with squid.
Mgr::CommandPointer ParseUrl(const char *url);
void ParseHeaders(const HttpRequest * request, Mgr::ActionParams ¶ms);
int CheckPassword(const Mgr::Command &cmd);
- char *PasswdGet(cachemgr_passwd *, const char *);
+ char *PasswdGet(CacheMgrPasswd *, const char *);
void registerProfile(const Mgr::ActionProfilePointer &profile);
--- /dev/null
+/*
+ * DEBUG: section
+ * AUTHOR:
+ *
+ * SQUID Web Proxy Cache http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ * Squid is the result of efforts by numerous individuals from
+ * the Internet community; see the CONTRIBUTORS file for full
+ * details. Many organizations have provided support for Squid's
+ * development; see the SPONSORS file for full details. Squid is
+ * Copyrighted (C) 2001 by the Regents of the University of
+ * California; see the COPYRIGHT file for full details. Squid
+ * incorporates software developed and/or copyrighted by other
+ * sources; see the CREDITS file for full details.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+#include "squid.h"
+#include "CacheMgrPasswd.h"
+
+
--- /dev/null
+#ifndef SQUID_CACHEMGRPASSWD_H_
+#define SQUID_CACHEMGRPASSWD_H_
+/*
+ * DEBUG: section
+ * AUTHOR:
+ *
+ * SQUID Web Proxy Cache http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ * Squid is the result of efforts by numerous individuals from
+ * the Internet community; see the CONTRIBUTORS file for full
+ * details. Many organizations have provided support for Squid's
+ * development; see the SPONSORS file for full details. Squid is
+ * Copyrighted (C) 2001 by the Regents of the University of
+ * California; see the COPYRIGHT file for full details. Squid
+ * incorporates software developed and/or copyrighted by other
+ * sources; see the CREDITS file for full details.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+class wordlist;
+
+//TODO: this class is misnamed and C-ish. Split into CacheMgrPasswd and
+// CacheMgrPasswdList (std::list-derived)
+class CacheMgrPasswd {
+public:
+ char *passwd;
+ wordlist *actions;
+ CacheMgrPasswd *next;
+};
+
+
+#endif /* SQUID_CACHEMGRPASSWD_H_ */
YesNoNone.h \
YesNoNone.cc \
RefreshPattern.h \
+ CacheMgrPasswd.h \
+ CacheMgrPasswd.cc \
cache_cf.cc \
CacheDigest.h \
CacheDigest.cc \
YesNoNone.h \
YesNoNone.cc \
RefreshPattern.h \
+ CacheMgrPasswd.h \
+ CacheMgrPasswd.cc \
cache_cf.cc \
CacheDigest.h \
CacheDigest.cc \
YesNoNone.h \
YesNoNone.cc \
RefreshPattern.h \
+ CacheMgrPasswd.h \
+ CacheMgrPasswd.cc \
cache_cf.cc \
cache_manager.cc \
carp.h \
YesNoNone.h \
YesNoNone.cc \
RefreshPattern.h \
+ CacheMgrPasswd.h \
+ CacheMgrPasswd.cc \
cache_cf.cc \
carp.h \
carp.cc \
YesNoNone.h \
YesNoNone.cc \
RefreshPattern.h \
+ CacheMgrPasswd.h \
+ CacheMgrPasswd.cc \
cache_cf.cc \
cache_manager.cc \
CacheDigest.h \
YesNoNone.h \
YesNoNone.cc \
RefreshPattern.h \
+ CacheMgrPasswd.h \
+ CacheMgrPasswd.cc \
cache_cf.cc \
debug.cc \
CacheDigest.h \
YesNoNone.h \
YesNoNone.cc \
RefreshPattern.h \
+ CacheMgrPasswd.h \
+ CacheMgrPasswd.cc \
cache_cf.cc \
cache_manager.cc \
CacheDigest.h \
#endif
class acl_access;
-class AclDenyInfoList;
class acl_size_t;
+class AclDenyInfoList;
+class CacheMgrPasswd;
class HeaderManglers;
class RefreshPattern;
-class SwapDir;
class RemovalPolicySettings;
+class SwapDir;
namespace AnyP {
class PortCfg;
} fqdncache;
int minDirectHops;
int minDirectRtt;
- cachemgr_passwd *passwd_list;
+ CacheMgrPasswd *passwd_list;
struct {
int objectsPerBucket;
#include "anyp/PortCfg.h"
#include "AuthReg.h"
#include "base/RunnersRegistry.h"
+#include "CacheMgrPasswd.h"
#include "CachePeer.h"
#include "cache_cf.h"
#include "ConfigParser.h"
}
static void
-dump_cachemgrpasswd(StoreEntry * entry, const char *name, cachemgr_passwd * list)
+dump_cachemgrpasswd(StoreEntry * entry, const char *name, CacheMgrPasswd * list)
{
wordlist *w;
}
static void
-parse_cachemgrpasswd(cachemgr_passwd ** head)
+parse_cachemgrpasswd(CacheMgrPasswd ** head)
{
char *passwd = NULL;
wordlist *actions = NULL;
- cachemgr_passwd *p;
- cachemgr_passwd **P;
+ CacheMgrPasswd *p;
+ CacheMgrPasswd **P;
parse_string(&passwd);
parse_wordlist(&actions);
- p = static_cast<cachemgr_passwd *>(xcalloc(1, sizeof(cachemgr_passwd)));
+ p = new CacheMgrPasswd;
p->passwd = passwd;
p->actions = actions;
* See if any of the actions from this line already have a
* password from previous lines. The password checking
* routines in cache_manager.c take the the password from
- * the first cachemgr_passwd struct that contains the
+ * the first CacheMgrPasswd struct that contains the
* requested action. Thus, we should warn users who might
* think they can have two passwords for the same action.
*/
}
static void
-free_cachemgrpasswd(cachemgr_passwd ** head)
+free_cachemgrpasswd(CacheMgrPasswd ** head)
{
- cachemgr_passwd *p;
+ CacheMgrPasswd *p;
while ((p = *head) != NULL) {
*head = p->next;
#include "squid.h"
#include "base/TextException.h"
+#include "CacheMgrPasswd.h"
#include "CacheManager.h"
#include "comm/Connection.h"
#include "Debug.h"
}
/*
- \ingroup CacheManagerInternal
+ * \ingroup CacheManagerInternal
* gets from the global Config the password the user would need to supply
* for the action she queried
*/
char *
-CacheManager::PasswdGet(cachemgr_passwd * a, const char *action)
+CacheManager::PasswdGet(CacheMgrPasswd * a, const char *action)
{
wordlist *w;
class external_acl;
class Store;
class CustomLog;
-class cachemgr_passwd;
+class CacheMgrPasswd;
namespace AnyP
{
struct PortCfg;
unsigned int destinationIPLookedUp_:1;
};
-
-class cachemgr_passwd {
-public:
- char *passwd;
- wordlist *actions;
- cachemgr_passwd *next;
-};
-
-
#if USE_SSL
struct _sslproxy_cert_sign {
int alg;