Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
52f5c926a8 |
No files matched your search
@@ -1,34 +1,3 @@
|
||||
2002-07-09 Robert James Kaes <rjkaes@flarenet.com>
|
||||
|
||||
* src/utils.c: (create_file_safely):
|
||||
(pidfile_create): Changed all the error logging to write to
|
||||
standard error and then exit the program. This will prevent
|
||||
segmentation fault problems from occurring because the log file
|
||||
could not be created properly.
|
||||
|
||||
* src/heap.c (malloc_shared_memory):
|
||||
Changed the static character array to include the ".XXXXXX" string
|
||||
already. This saves one system call when creating a temporary
|
||||
file name.
|
||||
|
||||
2002-07-08 Robert James Kaes <rjkaes@flarenet.com>
|
||||
|
||||
* README:
|
||||
Updated the "Support" section to include a link to the tinyproxy
|
||||
Bug Tracker system hosted by SourceForge.
|
||||
|
||||
2002-07-05 Robert James Kaes <rjkaes@flarenet.com>
|
||||
|
||||
* configure.ac:
|
||||
Removed the -D_REENTRANT C flag since tinyproxy is no longer a
|
||||
multi-threaded program.
|
||||
|
||||
2002-06-27 Robert James Kaes <rjkaes@flarenet.com>
|
||||
|
||||
* src/child.c (child_make):
|
||||
Reset the various signals to the default signal handler so that
|
||||
the children can be properly destroyed.
|
||||
|
||||
2002-06-15 Robert James Kaes <rjkaes@flarenet.com>
|
||||
|
||||
* src/log.c (log_message):
|
||||
|
||||
@@ -65,10 +65,11 @@
|
||||
SUPPORT
|
||||
-------
|
||||
|
||||
If you are having problems with tinyproxy, please submit a bug to the
|
||||
tinyproxy Bug Tracking system hosted by SourceForge and located at:
|
||||
If you are having problems with tinyproxy, please report the problem
|
||||
to either:
|
||||
|
||||
http://sourceforge.net/tracker/?group_id=2632
|
||||
Robert James Kaes <rjkaes@users.sourceforge.net>
|
||||
Steven Young <sdyoung@users.sourceforge.net>
|
||||
|
||||
You may also wish to subscribe to the tinyproxy-user mailing list. To
|
||||
do so please visit:
|
||||
|
||||
+5
-2
@@ -1,4 +1,4 @@
|
||||
dnl $Id: configure.ac,v 2.43 2002-07-11 18:47:00 rjkaes Exp $
|
||||
dnl $Id: configure.ac,v 2.40 2002-06-18 20:08:36 rjkaes Exp $
|
||||
|
||||
dnl Devlopers, please strive to achieve this order:
|
||||
dnl
|
||||
@@ -14,7 +14,7 @@ dnl 8. System services
|
||||
dnl
|
||||
dnl Read the Autoconf manual for details.
|
||||
|
||||
AC_INIT([tinyproxy], [1.5.1rc4], [rjkaes@users.sourceforge.net])
|
||||
AC_INIT([tinyproxy], [1.5.1rc2], [rjkaes@users.sourceforge.net])
|
||||
AC_CONFIG_SRCDIR([src/tinyproxy.c])
|
||||
AC_PREREQ(2.52)
|
||||
|
||||
@@ -27,6 +27,9 @@ AC_DEFINE_UNQUOTED(TARGET_SYSTEM, ["$target"])
|
||||
AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION)
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
dnl Set the default CFLAGS
|
||||
CFLAGS="-D_REENTRANT"
|
||||
|
||||
dnl Check if we're compiling on a weird platform :)
|
||||
AC_AIX
|
||||
AC_ISC_POSIX
|
||||
|
||||
+1
-9
@@ -1,4 +1,4 @@
|
||||
/* $Id: child.c,v 1.5 2002-06-27 16:29:21 rjkaes Exp $
|
||||
/* $Id: child.c,v 1.4 2002-06-15 17:31:31 rjkaes Exp $
|
||||
*
|
||||
* Handles the creation/destruction of the various children required for
|
||||
* processing incoming connections.
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "tinyproxy.h"
|
||||
|
||||
#include "child.h"
|
||||
#include "daemon.h"
|
||||
#include "filter.h"
|
||||
#include "heap.h"
|
||||
#include "log.h"
|
||||
@@ -244,13 +243,6 @@ child_make(struct child_s* ptr)
|
||||
if ((pid = fork()) > 0)
|
||||
return pid; /* parent */
|
||||
|
||||
/*
|
||||
* Reset the SIGNALS so that the child can be reaped.
|
||||
*/
|
||||
set_signal_handler(SIGCHLD, SIG_DFL);
|
||||
set_signal_handler(SIGTERM, SIG_DFL);
|
||||
set_signal_handler(SIGHUP, SIG_DFL);
|
||||
|
||||
child_main(ptr); /* never returns */
|
||||
return -1;
|
||||
}
|
||||
|
||||
+5
-4
@@ -1,4 +1,4 @@
|
||||
/* $Id: heap.c,v 1.5 2002-07-09 18:52:32 rjkaes Exp $
|
||||
/* $Id: heap.c,v 1.4 2002-06-05 17:01:09 rjkaes Exp $
|
||||
*
|
||||
* Debugging versions of various heap related functions are combined
|
||||
* here. The debugging versions include assertions and also print
|
||||
@@ -105,13 +105,14 @@ malloc_shared_memory(size_t size)
|
||||
{
|
||||
int fd;
|
||||
void* ptr;
|
||||
char buffer[32];
|
||||
char buffer[128];
|
||||
|
||||
static char* shared_file = "/tmp/tinyproxy.shared.XXXXXX";
|
||||
static char* shared_file = "/tmp/tinyproxy.shared";
|
||||
|
||||
assert(size > 0);
|
||||
|
||||
strlcpy(buffer, shared_file, sizeof(buffer));
|
||||
strlcpy(buffer, shared_file, sizeof(buffer) - 8);
|
||||
strlcat(buffer, ".XXXXXX", sizeof(buffer));
|
||||
|
||||
if ((fd = mkstemp(buffer)) == -1)
|
||||
return (void *)MAP_FAILED;
|
||||
|
||||
+29
-29
@@ -1,4 +1,4 @@
|
||||
/* $Id: utils.c,v 1.34 2002-07-09 19:02:57 rjkaes Exp $
|
||||
/* $Id: utils.c,v 1.33 2002-06-15 17:28:19 rjkaes Exp $
|
||||
*
|
||||
* Misc. routines which are used by the various functions to handle strings
|
||||
* and memory allocation and pretty much anything else we can think of. Also,
|
||||
@@ -154,10 +154,10 @@ create_file_safely(const char *filename, bool_t truncate_file)
|
||||
* existing", exit.
|
||||
*/
|
||||
if (errno != ENOENT) {
|
||||
fprintf(stderr,
|
||||
"%s: Error checking file %s: %s\n",
|
||||
PACKAGE, filename, strerror(errno));
|
||||
exit(EX_IOERR);
|
||||
log_message(LOG_ERR,
|
||||
"create_file_safely: Error checking file %s: %s.",
|
||||
filename, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -167,10 +167,10 @@ create_file_safely(const char *filename, bool_t truncate_file)
|
||||
*/
|
||||
if ((fildes =
|
||||
open(filename, O_RDWR | O_CREAT | O_EXCL, 0600)) < 0) {
|
||||
fprintf(stderr,
|
||||
"%s: Could not create file %s: %s\n",
|
||||
PACKAGE, filename, strerror(errno));
|
||||
exit(EX_CANTCREAT);
|
||||
log_message(LOG_ERR,
|
||||
"create_file_safely: Could not create file %s: %s.",
|
||||
filename, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
struct stat fstatinfo;
|
||||
@@ -184,10 +184,10 @@ create_file_safely(const char *filename, bool_t truncate_file)
|
||||
* Open an existing file.
|
||||
*/
|
||||
if ((fildes = open(filename, flags)) < 0) {
|
||||
fprintf(stderr,
|
||||
"%s: Could not open file %s: %s\n",
|
||||
PACKAGE, filename, strerror(errno));
|
||||
exit(EX_IOERR);
|
||||
log_message(LOG_ERR,
|
||||
"create_file_safely: Could not open file %s: %s.",
|
||||
filename, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -198,11 +198,11 @@ create_file_safely(const char *filename, bool_t truncate_file)
|
||||
|| lstatinfo.st_mode != fstatinfo.st_mode
|
||||
|| lstatinfo.st_ino != fstatinfo.st_ino
|
||||
|| lstatinfo.st_dev != fstatinfo.st_dev) {
|
||||
fprintf(stderr,
|
||||
"%s: The file %s has been changed before it could be opened\n",
|
||||
PACKAGE, filename);
|
||||
log_message(LOG_ERR,
|
||||
"create_file_safely: The file %s has been changed before it could be opened.",
|
||||
filename);
|
||||
close(fildes);
|
||||
exit(EX_IOERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -213,11 +213,11 @@ create_file_safely(const char *filename, bool_t truncate_file)
|
||||
* st_mode check would also find this)
|
||||
*/
|
||||
if (fstatinfo.st_nlink > 1 || !S_ISREG(lstatinfo.st_mode)) {
|
||||
fprintf(stderr,
|
||||
"%s: The file %s has too many links, or is not a regular file: %s\n",
|
||||
PACKAGE, filename, strerror(errno));
|
||||
log_message(LOG_ERR,
|
||||
"create_file_safely: The file %s has too many links, or is not a regular file: %s.",
|
||||
filename, strerror(errno));
|
||||
close(fildes);
|
||||
exit(EX_IOERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -241,10 +241,10 @@ create_file_safely(const char *filename, bool_t truncate_file)
|
||||
close(fildes);
|
||||
if ((fildes =
|
||||
open(filename, O_RDWR | O_CREAT | O_TRUNC, 0600)) < 0) {
|
||||
fprintf(stderr,
|
||||
"%s: Could not open file %s: %s.",
|
||||
PACKAGE, filename, strerror(errno));
|
||||
exit(EX_IOERR);
|
||||
log_message(LOG_ERR,
|
||||
"create_file_safely: Could not open file %s: %s.",
|
||||
filename, strerror(errno));
|
||||
return -1;
|
||||
}
|
||||
#endif /* HAVE_FTRUNCATE */
|
||||
}
|
||||
@@ -271,12 +271,12 @@ pidfile_create(const char *filename)
|
||||
* Open a stdio file over the low-level one.
|
||||
*/
|
||||
if ((fd = fdopen(fildes, "w")) == NULL) {
|
||||
fprintf(stderr,
|
||||
"%s: Could not write PID file %s: %s.",
|
||||
PACKAGE, filename, strerror(errno));
|
||||
log_message(LOG_ERR,
|
||||
"pidfile_create: fdopen() error on PID file %s: %s.",
|
||||
filename, strerror(errno));
|
||||
close(fildes);
|
||||
unlink(filename);
|
||||
exit(EX_IOERR);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
fprintf(fd, "%ld\n", (long) getpid());
|
||||
|
||||
Reference in new issue
Block a user