Compare commits

..
1 Commits
Author SHA1 Message Date
cvs2svn d8b36d2191 This commit was manufactured by cvs2svn to create tag
'release-1_5_1rc3'.
2002-06-27 16:30:54 +00:00
6 changed files with 49 additions and 73 deletions

No files matched your search

-29
View File
@@ -1,32 +1,3 @@
2002-08-09 Robert James Kaes <rjkaes@flarenet.com>
Released tinyproxy 1.5.1 (2002-08-09)
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> 2002-06-27 Robert James Kaes <rjkaes@flarenet.com>
* src/child.c (child_make): * src/child.c (child_make):
+4 -3
View File
@@ -65,10 +65,11 @@
SUPPORT SUPPORT
------- -------
If you are having problems with tinyproxy, please submit a bug to the If you are having problems with tinyproxy, please report the problem
tinyproxy Bug Tracking system hosted by SourceForge and located at: 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 You may also wish to subscribe to the tinyproxy-user mailing list. To
do so please visit: do so please visit:
+5 -2
View File
@@ -1,4 +1,4 @@
dnl $Id: configure.ac,v 2.44 2002-08-09 20:28:16 rjkaes Exp $ dnl $Id: configure.ac,v 2.41 2002-06-27 16:30:38 rjkaes Exp $
dnl Devlopers, please strive to achieve this order: dnl Devlopers, please strive to achieve this order:
dnl dnl
@@ -14,7 +14,7 @@ dnl 8. System services
dnl dnl
dnl Read the Autoconf manual for details. dnl Read the Autoconf manual for details.
AC_INIT([tinyproxy], [1.5.1], [rjkaes@users.sourceforge.net]) AC_INIT([tinyproxy], [1.5.1rc3], [rjkaes@users.sourceforge.net])
AC_CONFIG_SRCDIR([src/tinyproxy.c]) AC_CONFIG_SRCDIR([src/tinyproxy.c])
AC_PREREQ(2.52) AC_PREREQ(2.52)
@@ -27,6 +27,9 @@ AC_DEFINE_UNQUOTED(TARGET_SYSTEM, ["$target"])
AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION) AM_INIT_AUTOMAKE($PACKAGE_NAME, $PACKAGE_VERSION)
AM_CONFIG_HEADER(config.h) AM_CONFIG_HEADER(config.h)
dnl Set the default CFLAGS
CFLAGS="-D_REENTRANT"
dnl Check if we're compiling on a weird platform :) dnl Check if we're compiling on a weird platform :)
AC_AIX AC_AIX
AC_ISC_POSIX AC_ISC_POSIX
+5 -4
View File
@@ -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 * Debugging versions of various heap related functions are combined
* here. The debugging versions include assertions and also print * here. The debugging versions include assertions and also print
@@ -105,13 +105,14 @@ malloc_shared_memory(size_t size)
{ {
int fd; int fd;
void* ptr; 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); 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) if ((fd = mkstemp(buffer)) == -1)
return (void *)MAP_FAILED; return (void *)MAP_FAILED;
+6 -6
View File
@@ -1,4 +1,4 @@
/* $Id: tinyproxy.c,v 1.38 2002-07-12 17:02:02 rjkaes Exp $ /* $Id: tinyproxy.c,v 1.37 2002-06-15 17:35:03 rjkaes Exp $
* *
* The initialize routine. Basically sets up all the initial stuff (logfile, * The initialize routine. Basically sets up all the initial stuff (logfile,
* listening socket, config options, etc.) and then sits there and loops * listening socket, config options, etc.) and then sits there and loops
@@ -170,8 +170,6 @@ main(int argc, char **argv)
} }
#endif /* HAVE_SETRLIMIT */ #endif /* HAVE_SETRLIMIT */
log_message(LOG_INFO, "Initializing " PACKAGE " ...");
/* /*
* Process the various options * Process the various options
*/ */
@@ -238,6 +236,11 @@ main(int argc, char **argv)
openlog("tinyproxy", LOG_PID, LOG_USER); openlog("tinyproxy", LOG_PID, LOG_USER);
} }
processed_config_file = TRUE;
log_message(LOG_INFO, PACKAGE " " VERSION " starting...");
send_stored_logs();
/* /*
* Set the default values if they were not set in the config file. * Set the default values if they were not set in the config file.
*/ */
@@ -352,9 +355,6 @@ main(int argc, char **argv)
exit(EX_SOFTWARE); exit(EX_SOFTWARE);
} }
processed_config_file = TRUE;
send_stored_logs();
/* /*
* These signals are only for the parent process. * These signals are only for the parent process.
*/ */
+29 -29
View File
@@ -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 * 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, * 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. * existing", exit.
*/ */
if (errno != ENOENT) { if (errno != ENOENT) {
fprintf(stderr, log_message(LOG_ERR,
"%s: Error checking file %s: %s\n", "create_file_safely: Error checking file %s: %s.",
PACKAGE, filename, strerror(errno)); filename, strerror(errno));
exit(EX_IOERR); return -1;
} }
/* /*
@@ -167,10 +167,10 @@ create_file_safely(const char *filename, bool_t truncate_file)
*/ */
if ((fildes = if ((fildes =
open(filename, O_RDWR | O_CREAT | O_EXCL, 0600)) < 0) { open(filename, O_RDWR | O_CREAT | O_EXCL, 0600)) < 0) {
fprintf(stderr, log_message(LOG_ERR,
"%s: Could not create file %s: %s\n", "create_file_safely: Could not create file %s: %s.",
PACKAGE, filename, strerror(errno)); filename, strerror(errno));
exit(EX_CANTCREAT); return -1;
} }
} else { } else {
struct stat fstatinfo; struct stat fstatinfo;
@@ -184,10 +184,10 @@ create_file_safely(const char *filename, bool_t truncate_file)
* Open an existing file. * Open an existing file.
*/ */
if ((fildes = open(filename, flags)) < 0) { if ((fildes = open(filename, flags)) < 0) {
fprintf(stderr, log_message(LOG_ERR,
"%s: Could not open file %s: %s\n", "create_file_safely: Could not open file %s: %s.",
PACKAGE, filename, strerror(errno)); filename, strerror(errno));
exit(EX_IOERR); return -1;
} }
/* /*
@@ -198,11 +198,11 @@ create_file_safely(const char *filename, bool_t truncate_file)
|| lstatinfo.st_mode != fstatinfo.st_mode || lstatinfo.st_mode != fstatinfo.st_mode
|| lstatinfo.st_ino != fstatinfo.st_ino || lstatinfo.st_ino != fstatinfo.st_ino
|| lstatinfo.st_dev != fstatinfo.st_dev) { || lstatinfo.st_dev != fstatinfo.st_dev) {
fprintf(stderr, log_message(LOG_ERR,
"%s: The file %s has been changed before it could be opened\n", "create_file_safely: The file %s has been changed before it could be opened.",
PACKAGE, filename); filename);
close(fildes); 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) * st_mode check would also find this)
*/ */
if (fstatinfo.st_nlink > 1 || !S_ISREG(lstatinfo.st_mode)) { if (fstatinfo.st_nlink > 1 || !S_ISREG(lstatinfo.st_mode)) {
fprintf(stderr, log_message(LOG_ERR,
"%s: The file %s has too many links, or is not a regular file: %s\n", "create_file_safely: The file %s has too many links, or is not a regular file: %s.",
PACKAGE, filename, strerror(errno)); filename, strerror(errno));
close(fildes); close(fildes);
exit(EX_IOERR); return -1;
} }
/* /*
@@ -241,10 +241,10 @@ create_file_safely(const char *filename, bool_t truncate_file)
close(fildes); close(fildes);
if ((fildes = if ((fildes =
open(filename, O_RDWR | O_CREAT | O_TRUNC, 0600)) < 0) { open(filename, O_RDWR | O_CREAT | O_TRUNC, 0600)) < 0) {
fprintf(stderr, log_message(LOG_ERR,
"%s: Could not open file %s: %s.", "create_file_safely: Could not open file %s: %s.",
PACKAGE, filename, strerror(errno)); filename, strerror(errno));
exit(EX_IOERR); return -1;
} }
#endif /* HAVE_FTRUNCATE */ #endif /* HAVE_FTRUNCATE */
} }
@@ -271,12 +271,12 @@ pidfile_create(const char *filename)
* Open a stdio file over the low-level one. * Open a stdio file over the low-level one.
*/ */
if ((fd = fdopen(fildes, "w")) == NULL) { if ((fd = fdopen(fildes, "w")) == NULL) {
fprintf(stderr, log_message(LOG_ERR,
"%s: Could not write PID file %s: %s.", "pidfile_create: fdopen() error on PID file %s: %s.",
PACKAGE, filename, strerror(errno)); filename, strerror(errno));
close(fildes); close(fildes);
unlink(filename); unlink(filename);
exit(EX_IOERR); exit(1);
} }
fprintf(fd, "%ld\n", (long) getpid()); fprintf(fd, "%ld\n", (long) getpid());