Compare commits

...
7 Commits
Author SHA1 Message Date
cvs2svn 3775924ded This commit was manufactured by cvs2svn to create tag
'release_1_5_1rc4'.
2002-07-11 18:47:01 +00:00
Robert James Kaes 632f689209 # Bumped up the version number (rc4) 2002-07-11 18:47:00 +00:00
Robert James Kaes 8a95d10be2 # Updated the ChangeLog 2002-07-11 18:46:34 +00:00
Robert James Kaes ab574cbec0 (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.
2002-07-09 19:02:57 +00:00
Robert James Kaes 4932b87fc9 (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-09 18:52:32 +00:00
Robert James Kaes 01d2966cb8 Updated the "Support" section to include a link to the tinyproxy Bug Tracker system hosted by SourceForge. 2002-07-08 20:10:42 +00:00
Robert James Kaes bf0709cd98 Removed the -D_REENTRANT C flag since tinyproxy is no longer a multi-threaded program. 2002-07-05 03:55:27 +00:00
5 changed files with 63 additions and 43 deletions

No files matched your search

+25
View File
@@ -1,3 +1,28 @@
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):
+3 -4
View File
@@ -65,11 +65,10 @@
SUPPORT
-------
If you are having problems with tinyproxy, please report the problem
to either:
If you are having problems with tinyproxy, please submit a bug to the
tinyproxy Bug Tracking system hosted by SourceForge and located at:
Robert James Kaes <rjkaes@users.sourceforge.net>
Steven Young <sdyoung@users.sourceforge.net>
http://sourceforge.net/tracker/?group_id=2632
You may also wish to subscribe to the tinyproxy-user mailing list. To
do so please visit:
+2 -5
View File
@@ -1,4 +1,4 @@
dnl $Id: configure.ac,v 2.41 2002-06-27 16:30:38 rjkaes Exp $
dnl $Id: configure.ac,v 2.43 2002-07-11 18:47:00 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.1rc3], [rjkaes@users.sourceforge.net])
AC_INIT([tinyproxy], [1.5.1rc4], [rjkaes@users.sourceforge.net])
AC_CONFIG_SRCDIR([src/tinyproxy.c])
AC_PREREQ(2.52)
@@ -27,9 +27,6 @@ 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
+4 -5
View File
@@ -1,4 +1,4 @@
/* $Id: heap.c,v 1.4 2002-06-05 17:01:09 rjkaes Exp $
/* $Id: heap.c,v 1.5 2002-07-09 18:52:32 rjkaes Exp $
*
* Debugging versions of various heap related functions are combined
* here. The debugging versions include assertions and also print
@@ -105,14 +105,13 @@ malloc_shared_memory(size_t size)
{
int fd;
void* ptr;
char buffer[128];
char buffer[32];
static char* shared_file = "/tmp/tinyproxy.shared";
static char* shared_file = "/tmp/tinyproxy.shared.XXXXXX";
assert(size > 0);
strlcpy(buffer, shared_file, sizeof(buffer) - 8);
strlcat(buffer, ".XXXXXX", sizeof(buffer));
strlcpy(buffer, shared_file, sizeof(buffer));
if ((fd = mkstemp(buffer)) == -1)
return (void *)MAP_FAILED;
+29 -29
View File
@@ -1,4 +1,4 @@
/* $Id: utils.c,v 1.33 2002-06-15 17:28:19 rjkaes Exp $
/* $Id: utils.c,v 1.34 2002-07-09 19:02:57 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) {
log_message(LOG_ERR,
"create_file_safely: Error checking file %s: %s.",
filename, strerror(errno));
return -1;
fprintf(stderr,
"%s: Error checking file %s: %s\n",
PACKAGE, filename, strerror(errno));
exit(EX_IOERR);
}
/*
@@ -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) {
log_message(LOG_ERR,
"create_file_safely: Could not create file %s: %s.",
filename, strerror(errno));
return -1;
fprintf(stderr,
"%s: Could not create file %s: %s\n",
PACKAGE, filename, strerror(errno));
exit(EX_CANTCREAT);
}
} 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) {
log_message(LOG_ERR,
"create_file_safely: Could not open file %s: %s.",
filename, strerror(errno));
return -1;
fprintf(stderr,
"%s: Could not open file %s: %s\n",
PACKAGE, filename, strerror(errno));
exit(EX_IOERR);
}
/*
@@ -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) {
log_message(LOG_ERR,
"create_file_safely: The file %s has been changed before it could be opened.",
filename);
fprintf(stderr,
"%s: The file %s has been changed before it could be opened\n",
PACKAGE, filename);
close(fildes);
return -1;
exit(EX_IOERR);
}
/*
@@ -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)) {
log_message(LOG_ERR,
"create_file_safely: The file %s has too many links, or is not a regular file: %s.",
filename, strerror(errno));
fprintf(stderr,
"%s: The file %s has too many links, or is not a regular file: %s\n",
PACKAGE, filename, strerror(errno));
close(fildes);
return -1;
exit(EX_IOERR);
}
/*
@@ -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) {
log_message(LOG_ERR,
"create_file_safely: Could not open file %s: %s.",
filename, strerror(errno));
return -1;
fprintf(stderr,
"%s: Could not open file %s: %s.",
PACKAGE, filename, strerror(errno));
exit(EX_IOERR);
}
#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) {
log_message(LOG_ERR,
"pidfile_create: fdopen() error on PID file %s: %s.",
filename, strerror(errno));
fprintf(stderr,
"%s: Could not write PID file %s: %s.",
PACKAGE, filename, strerror(errno));
close(fildes);
unlink(filename);
exit(1);
exit(EX_IOERR);
}
fprintf(fd, "%ld\n", (long) getpid());