-const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.47 2007/01/12 15:07:10 fabiankeil Exp $";
+const char cgisimple_rcs[] = "$Id: cgisimple.c,v 1.48 2007/01/20 15:31:31 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/cgisimple.c,v $
*
* Revisions :
* $Log: cgisimple.c,v $
+ * Revision 1.48 2007/01/20 15:31:31 fabiankeil
+ * Display warning if show-url-info CGI page
+ * is used while Privoxy is toggled off.
+ *
* Revision 1.47 2007/01/12 15:07:10 fabiankeil
* Use zalloc in cgi_send_user_manual.
*
#include <string.h>
#include <assert.h>
+#ifdef HAVE_ACCESS
+#include <unistd.h>
+#endif /* def HAVE_ACCESS */
+
#ifdef _WIN32
#define snprintf _snprintf
#endif /* def _WIN32 */
#ifdef FEATURE_CGI_EDIT_ACTIONS
if (NULL == strstr(csp->actions_list[i]->filename, "standard.action") && NULL != csp->config->actions_file_short[i])
{
- snprintf(buf, 100, " <a href=\"/edit-actions-list?f=%s\">Edit</a>", csp->config->actions_file_short[i]);
- if (!err) err = string_append(&s, buf);
+#ifdef HAVE_ACCESS
+ if (access(csp->config->actions_file[i], W_OK) == 0)
+ {
+#endif /* def HAVE_ACCESS */
+ snprintf(buf, 100, " <a href=\"/edit-actions-list?f=%s\">Edit</a>",
+ csp->config->actions_file_short[i]);
+ if (!err) err = string_append(&s, buf);
+#ifdef HAVE_ACCESS
+ }
+ else
+ {
+ if (!err) err = string_append(&s, " <strong>No write access.</strong>");
+ }
+#endif /* def HAVE_ACCESS */
}
#endif
dnl Process this file with autoconf to produce a configure script.
dnl
-dnl $Id: configure.in,v 1.101 2007/01/12 15:20:17 fabiankeil Exp $
+dnl $Id: configure.in,v 1.102 2007/01/18 14:55:45 fabiankeil Exp $
dnl
dnl Written by and Copyright (C) 2001 - 2004 the SourceForge
dnl Privoxy team. http://www.privoxy.org/
dnl Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl
dnl $Log: configure.in,v $
+dnl Revision 1.102 2007/01/18 14:55:45 fabiankeil
+dnl Check for tzset() and putenv() to make sure the
+dnl replacement timegm() isn't included on systems
+dnl where it fails to compile.
+dnl
dnl Revision 1.101 2007/01/12 15:20:17 fabiankeil
dnl Temporarily ignore external libpcrs to prevent
dnl problems that are fixed in Privoxy's own version.
dnl AutoConf Initialization
dnl =================================================================
-AC_REVISION($Revision: 1.101 $)
+AC_REVISION($Revision: 1.102 $)
AC_INIT(jcc.c)
if test ! -f config.h.in; then
AC_TYPE_SIGNAL
dnl uncommenting does not work for swa. suse linux
dnl AC_FUNC_STAT
-AC_CHECK_FUNCS([atexit getcwd gethostbyaddr gethostbyaddr_r gethostbyname gethostbyname_r inet_ntoa localtime_r memchr memmove memset putenv random regcomp select setlocale socket strchr strdup strerror strftime strptime strstr strtoul timegm tzset])
+AC_CHECK_FUNCS([access atexit getcwd gethostbyaddr gethostbyaddr_r gethostbyname gethostbyname_r inet_ntoa localtime_r memchr memmove memset putenv random regcomp select setlocale socket strchr strdup strerror strftime strptime strstr strtoul timegm tzset])
dnl =================================================================