summaryrefslogtreecommitdiffstats
path: root/contrib/cvs/src
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2003-01-21 21:53:03 +0000
committerpeter <peter@FreeBSD.org>2003-01-21 21:53:03 +0000
commit245f20f1d1e6f326cc3647b68f0b0cbc23747545 (patch)
tree194b9c1230a1c8a354b24024b876105447dfa5ef /contrib/cvs/src
parentae16fa6bfbfaf715077a5d782daf4132d071619d (diff)
parent821118cc49e4fb917b543aff27dfeeb48f9959cb (diff)
downloadFreeBSD-src-245f20f1d1e6f326cc3647b68f0b0cbc23747545.zip
FreeBSD-src-245f20f1d1e6f326cc3647b68f0b0cbc23747545.tar.gz
This commit was generated by cvs2svn to compensate for changes in r109655,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/cvs/src')
-rw-r--r--contrib/cvs/src/ChangeLog89
-rw-r--r--contrib/cvs/src/Makefile.am1
-rw-r--r--contrib/cvs/src/Makefile.in1
-rw-r--r--contrib/cvs/src/admin.c20
-rw-r--r--contrib/cvs/src/annotate.c2
-rw-r--r--contrib/cvs/src/edit.c2
-rw-r--r--contrib/cvs/src/log.c2
-rw-r--r--contrib/cvs/src/myndbm.c3
-rw-r--r--contrib/cvs/src/parseinfo.c4
-rw-r--r--contrib/cvs/src/patch.c2
-rw-r--r--contrib/cvs/src/remove.c4
-rw-r--r--contrib/cvs/src/root.c6
-rwxr-xr-xcontrib/cvs/src/sanity.sh3
-rw-r--r--contrib/cvs/src/scramble.c6
-rw-r--r--contrib/cvs/src/status.c2
-rw-r--r--contrib/cvs/src/tag.c6
-rw-r--r--contrib/cvs/src/watch.c4
-rw-r--r--contrib/cvs/src/zlib.c10
18 files changed, 132 insertions, 35 deletions
diff --git a/contrib/cvs/src/ChangeLog b/contrib/cvs/src/ChangeLog
index ed1188b..656ca2f 100644
--- a/contrib/cvs/src/ChangeLog
+++ b/contrib/cvs/src/ChangeLog
@@ -1,3 +1,92 @@
+2003-01-15 Karl Fogel <kfogel@collab.net>
+
+ * server.c (dirswitch): Don't free dir_name until right before
+ allocating it again. This removes a potential double-free
+ problem, whereby this function could free dir_name and then
+ immediately return due to invalid directory syntax (without ever
+ reassigning dir_name), then reenter and free dir_name again.
+
+ Thanks to Stefan Esser <s.esser@e-matters.de> for the fix.
+
+2003-01-08 Larry Jones <lawrence.jones@eds.com>
+
+ * client.c (update_entries): Only "0" is a special version number;
+ other numbers starting with 0 (like 0.1) are normal version numbers.
+ * commit.c (find_fileproc): Ditto. Also reorganize the code to
+ simplify the conditions.
+ (Reported by Michele Zamparelli <michele.zamparelli@eso.org>.)
+
+2003-01-02 Larry Jones <lawrence.jones@eds.com>
+
+ * rcs.c (getdelta): Use RCSDEAD rather than literal "dead".
+
+2002-12-27 Derek Price <derek@ximbiot.com>
+
+ * admin.c: s/LOCK_(NONE|WRITE|READ)/CVS_$&/g; since the definition of
+ LOCK_WRITE clashes with a definition in objidl.h on Windoze platforms.
+ * annotate.c: Ditto.
+ * client.c: Ditto.
+ * commit.c: Ditto.
+ * cvs.h: Ditto.
+ * diff.c: Ditto.
+ * edit.c: Ditto.
+ * lock.c: Ditto.
+ * log.c: Ditto.
+ * patch.c: Ditto.
+ * recurse.c: Ditto.
+ * remove.c: Ditto.
+ * status.c: Ditto.
+ * tag.c: Ditto.
+ * update.c: Ditto.
+ * watch.c: Ditto.
+ * myndbm.c: Ditto & define O_ACCMODE when it isn't defined, as under
+ Windoze.
+ (Thanks to Stephane Rouleau <s.rouleau@videotron.ca>,
+ Cristopher Seawood <cls@seawood.org>, and
+ Frederico Costa <frederico.costa@tiscali.no> for all their hints,
+ tips, and patches for this problem.)
+
+2002-12-20 Derek Price <derek@ximbiot.com>
+
+ * client.c (send_a_repository): Suppress a warning under Windoze.
+
+2002-12-19 Derek Price <derek@ximbiot.com>
+
+ * Makefile.am: Remove reference to options.h.
+ * cvs.h: Ditto.
+ * options.h: Remove this obsolete file.
+ * sanity.sh: Remove comment about external diffs causing tests to fail
+ since CVS hasn't used external diffs in years.
+
+ * Makefile.in: Regenerated.
+
+2002-12-16 Derek Price <derek@ximbiot.com>
+
+ * admin.c: Disable cvsadmin group checking on the client.
+ (Reported by Dan Peterson <dbpete@aol.com>.)
+
+2002-12-06 Derek Price <derek@ximbiot.com>
+
+ * buffer.c: Replace calls to malloc with calls to xmalloc and calls to
+ realloc with calls to xrealloc.
+ * parseinfo.c: Ditto.
+ * root.c: Ditto.
+ * server.c: Ditto.
+ * zlib.c: Ditto.
+ * scramble.c: Change some comments to refer to xmalloc rather than
+ malloc.
+ (Reported by Dan Peterson <dbpete@aol.com>.)
+
+2002-12-04 Derek Price <derek@ximbiot.com>
+
+ * options.h: Remove CVS_ADMIN_GROUP.
+
+2002-12-02 Larry Jones <lawrence.jones@eds.com>
+
+ * commit.c (commit): Strip leading zeros from numeric revision
+ in addition to trailing dots.
+ (Reported by Peter Meszaros <pme@prolan.hu>.)
+
2002-11-22 Larry Jones <lawrence.jones@eds.com>
* sanity.sh: Note that the tests run for a long time.
diff --git a/contrib/cvs/src/Makefile.am b/contrib/cvs/src/Makefile.am
index 3338eec..0195f56 100644
--- a/contrib/cvs/src/Makefile.am
+++ b/contrib/cvs/src/Makefile.am
@@ -89,7 +89,6 @@ cvs_SOURCES = \
hardlink.h \
hash.h \
myndbm.h \
- options.h \
rcs.h \
root.h \
server.h \
diff --git a/contrib/cvs/src/Makefile.in b/contrib/cvs/src/Makefile.in
index 3a56e0c..189cd28 100644
--- a/contrib/cvs/src/Makefile.in
+++ b/contrib/cvs/src/Makefile.in
@@ -175,7 +175,6 @@ cvs_SOURCES = \
hardlink.h \
hash.h \
myndbm.h \
- options.h \
rcs.h \
root.h \
server.h \
diff --git a/contrib/cvs/src/admin.c b/contrib/cvs/src/admin.c
index 8c4fce3..6a5649a 100644
--- a/contrib/cvs/src/admin.c
+++ b/contrib/cvs/src/admin.c
@@ -377,9 +377,19 @@ admin (argc, argv)
#ifdef CVS_ADMIN_GROUP
/* The use of `cvs admin -k' is unrestricted. However, any other
- option is restricted if the group CVS_ADMIN_GROUP exists. */
- if (!only_k_option &&
- (grp = getgrnam(CVS_ADMIN_GROUP)) != NULL)
+ option is restricted if the group CVS_ADMIN_GROUP exists on the
+ server. */
+ if (
+# ifdef CLIENT_SUPPORT
+ /* This is only "secure" on the server, since the user could edit the
+ * RCS file on a local host, but some people like this kind of
+ * check anyhow. The alternative would be to check only when
+ * (server_active) rather than when not on the client.
+ */
+ !current_parsed_root->isremote &&
+# endif /* CLIENT_SUPPORT */
+ !only_k_option
+ && (grp = getgrnam(CVS_ADMIN_GROUP)) != NULL)
{
#ifdef HAVE_GETGROUPS
gid_t *grps;
@@ -411,7 +421,7 @@ admin (argc, argv)
CVS_ADMIN_GROUP);
#endif
}
-#endif
+#endif /* defined CVS_ADMIN_GROUP */
for (i = 0; i < admin_data.ac; ++i)
{
@@ -510,7 +520,7 @@ admin (argc, argv)
err = start_recursion (admin_fileproc, (FILESDONEPROC) NULL, admin_dirproc,
(DIRLEAVEPROC) NULL, (void *)&admin_data,
argc, argv, 0,
- W_LOCAL, 0, LOCK_NONE, (char *) NULL, 1);
+ W_LOCAL, 0, CVS_LOCK_NONE, (char *) NULL, 1);
Lock_Cleanup ();
return_it:
diff --git a/contrib/cvs/src/annotate.c b/contrib/cvs/src/annotate.c
index 8c72962..2e3cb89 100644
--- a/contrib/cvs/src/annotate.c
+++ b/contrib/cvs/src/annotate.c
@@ -248,7 +248,7 @@ rannotate_proc (argc, argv, xwhere, mwhere, mfile, shorten, local, mname, msg)
err = start_recursion (annotate_fileproc, (FILESDONEPROC) NULL,
(DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL,
- argc - 1, argv + 1, local, which, 0, LOCK_READ,
+ argc - 1, argv + 1, local, which, 0, CVS_LOCK_READ,
where, 1);
return err;
}
diff --git a/contrib/cvs/src/edit.c b/contrib/cvs/src/edit.c
index e0995e5..cde03f9 100644
--- a/contrib/cvs/src/edit.c
+++ b/contrib/cvs/src/edit.c
@@ -103,7 +103,7 @@ watch_onoff (argc, argv)
err = start_recursion (onoff_fileproc, onoff_filesdoneproc,
(DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL,
- argc, argv, local, W_LOCAL, 0, LOCK_NONE,
+ argc, argv, local, W_LOCAL, 0, CVS_LOCK_NONE,
(char *)NULL, 0);
Lock_Cleanup ();
diff --git a/contrib/cvs/src/log.c b/contrib/cvs/src/log.c
index c7e5600..ce9ba5c0 100644
--- a/contrib/cvs/src/log.c
+++ b/contrib/cvs/src/log.c
@@ -550,7 +550,7 @@ rlog_proc (argc, argv, xwhere, mwhere, mfile, shorten, local, mname, msg)
err = start_recursion (log_fileproc, (FILESDONEPROC) NULL, log_dirproc,
(DIRLEAVEPROC) NULL, (void *) &log_data,
- argc - 1, argv + 1, local, which, 0, LOCK_READ,
+ argc - 1, argv + 1, local, which, 0, CVS_LOCK_READ,
where, 1);
return err;
}
diff --git a/contrib/cvs/src/myndbm.c b/contrib/cvs/src/myndbm.c
index 69c0836..aa71ca8 100644
--- a/contrib/cvs/src/myndbm.c
+++ b/contrib/cvs/src/myndbm.c
@@ -18,6 +18,9 @@
#include "getline.h"
#ifdef MY_NDBM
+# ifndef O_ACCMODE
+# define O_ACCMODE O_RDONLY|O_WRONLY|O_RDWR
+# endif /* defined O_ACCMODE */
static void mydbm_load_file PROTO ((FILE *, List *, char *));
diff --git a/contrib/cvs/src/parseinfo.c b/contrib/cvs/src/parseinfo.c
index e0eb3a5..9771692 100644
--- a/contrib/cvs/src/parseinfo.c
+++ b/contrib/cvs/src/parseinfo.c
@@ -234,7 +234,7 @@ parse_config (cvsroot)
return 0;
parsed = 1;
- infopath = malloc (strlen (cvsroot)
+ infopath = xmalloc (strlen (cvsroot)
+ sizeof (CVSROOTADM_CONFIG)
+ sizeof (CVSROOTADM)
+ 10);
@@ -385,7 +385,7 @@ warning: this CVS does not support PreservePermissions");
{
if (strcmp (p, "all") != 0)
{
- logHistory=malloc(strlen (p) + 1);
+ logHistory=xmalloc(strlen (p) + 1);
strcpy (logHistory, p);
}
}
diff --git a/contrib/cvs/src/patch.c b/contrib/cvs/src/patch.c
index 4a027a1..e6a25f5 100644
--- a/contrib/cvs/src/patch.c
+++ b/contrib/cvs/src/patch.c
@@ -356,7 +356,7 @@ patch_proc (argc, argv, xwhere, mwhere, mfile, shorten, local_specified,
err = start_recursion (patch_fileproc, (FILESDONEPROC) NULL, patch_dirproc,
(DIRLEAVEPROC) NULL, NULL,
argc - 1, argv + 1, local_specified,
- which, 0, LOCK_READ, where, 1);
+ which, 0, CVS_LOCK_READ, where, 1);
free (where);
return (err);
diff --git a/contrib/cvs/src/remove.c b/contrib/cvs/src/remove.c
index c9224bd..01cdfb4 100644
--- a/contrib/cvs/src/remove.c
+++ b/contrib/cvs/src/remove.c
@@ -90,7 +90,7 @@ cvsremove (argc, argv)
start_recursion (remove_force_fileproc, (FILESDONEPROC) NULL,
(DIRENTPROC) NULL, (DIRLEAVEPROC) NULL,
(void *) NULL, argc, argv, local, W_LOCAL,
- 0, LOCK_NONE, (char *) NULL, 0);
+ 0, CVS_LOCK_NONE, (char *) NULL, 0);
}
/* else FIXME should probably act as if the file doesn't exist
in doing the following checks. */
@@ -114,7 +114,7 @@ cvsremove (argc, argv)
err = start_recursion (remove_fileproc, (FILESDONEPROC) NULL,
remove_dirproc, (DIRLEAVEPROC) NULL, NULL,
argc, argv,
- local, W_LOCAL, 0, LOCK_READ, (char *) NULL, 1);
+ local, W_LOCAL, 0, CVS_LOCK_READ, (char *) NULL, 1);
if (removed_files && !really_quiet)
error (0, 0, "use '%s commit' to remove %s permanently", program_name,
diff --git a/contrib/cvs/src/root.c b/contrib/cvs/src/root.c
index 9bbbe47..8308e97 100644
--- a/contrib/cvs/src/root.c
+++ b/contrib/cvs/src/root.c
@@ -191,13 +191,13 @@ root_allow_add (arg)
{
root_allow_size = 1;
root_allow_vector =
- (char **) malloc (root_allow_size * sizeof (char *));
+ (char **) xmalloc (root_allow_size * sizeof (char *));
}
else
{
root_allow_size *= 2;
root_allow_vector =
- (char **) realloc (root_allow_vector,
+ (char **) xrealloc (root_allow_vector,
root_allow_size * sizeof (char *));
}
@@ -212,7 +212,7 @@ error ENOMEM Virtual memory exhausted.\n");
error_exit ();
}
}
- p = malloc (strlen (arg) + 1);
+ p = xmalloc (strlen (arg) + 1);
if (p == NULL)
goto no_memory;
strcpy (p, arg);
diff --git a/contrib/cvs/src/sanity.sh b/contrib/cvs/src/sanity.sh
index 935b78c..c6e504e 100755
--- a/contrib/cvs/src/sanity.sh
+++ b/contrib/cvs/src/sanity.sh
@@ -4336,9 +4336,6 @@ ${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
dotest_fail death2-diff-1 "${testcvs} -q diff file1" \
"${PROG} [a-z]*: file1 was removed, no comparison available"
- # If the DIFF that CVS is using (options.h) is Sun diff, this
- # test is said to fail (I think the /dev/null is the part
- # that differs), along with a number of the other similar tests.
dotest_fail death2-diff-2 "${testcvs} -q diff -N -c file1" \
"Index: file1
===================================================================
diff --git a/contrib/cvs/src/scramble.c b/contrib/cvs/src/scramble.c
index 77376fa..487cbf4 100644
--- a/contrib/cvs/src/scramble.c
+++ b/contrib/cvs/src/scramble.c
@@ -75,14 +75,14 @@ shifts[] = {
* single letter indicating the scrambling method. As of this
* writing, the only legal method is 'A', but check the code for more
* up-to-date information. The copy will have been allocated with
- * malloc().
+ * xmalloc().
*
- * descramble(SCRM) returns STR, again in its own malloc'd space.
+ * descramble(SCRM) returns STR, again in its own xmalloc'd space.
* descramble() uses SCRM[0] to determine which method of unscrambling
* to use. If it does not recognize the method, it dies with error.
*/
-/* Return a malloc'd, scrambled version of STR. */
+/* Return a xmalloc'd, scrambled version of STR. */
char *
scramble (str)
char *str;
diff --git a/contrib/cvs/src/status.c b/contrib/cvs/src/status.c
index 6057ec2..b7853e5 100644
--- a/contrib/cvs/src/status.c
+++ b/contrib/cvs/src/status.c
@@ -107,7 +107,7 @@ cvsstatus (argc, argv)
err = start_recursion (status_fileproc, (FILESDONEPROC) NULL,
status_dirproc, (DIRLEAVEPROC) NULL, NULL,
argc, argv, local,
- W_LOCAL, 0, LOCK_READ, (char *) NULL, 1);
+ W_LOCAL, 0, CVS_LOCK_READ, (char *) NULL, 1);
return (err);
}
diff --git a/contrib/cvs/src/tag.c b/contrib/cvs/src/tag.c
index 467ba9d..73c241e 100644
--- a/contrib/cvs/src/tag.c
+++ b/contrib/cvs/src/tag.c
@@ -382,7 +382,7 @@ rtag_proc (argc, argv, xwhere, mwhere, mfile, shorten, local_specified,
err = start_recursion (check_fileproc, check_filesdoneproc,
(DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL,
argc - 1, argv + 1, local_specified, which, 0,
- LOCK_READ, where, 1);
+ CVS_LOCK_READ, where, 1);
if (err)
{
@@ -397,7 +397,7 @@ rtag_proc (argc, argv, xwhere, mwhere, mfile, shorten, local_specified,
err = start_recursion (is_rtag ? rtag_fileproc : tag_fileproc,
(FILESDONEPROC) NULL, tag_dirproc,
(DIRLEAVEPROC) NULL, NULL, argc - 1, argv + 1,
- local_specified, which, 0, LOCK_WRITE, where, 1);
+ local_specified, which, 0, CVS_LOCK_WRITE, where, 1);
dellist (&mtlist);
if (where != NULL)
free (where);
@@ -1285,7 +1285,7 @@ Numeric tag %s contains characters other than digits and '.'", name);
val_direntproc, (DIRLEAVEPROC) NULL,
(void *)&the_val_args,
argc, argv, local, which, aflag,
- LOCK_READ, NULL, 1);
+ CVS_LOCK_READ, NULL, 1);
if (repository != NULL && repository[0] != '\0')
{
if (restore_cwd (&cwd, NULL))
diff --git a/contrib/cvs/src/watch.c b/contrib/cvs/src/watch.c
index 96d6b04..8c57ebe 100644
--- a/contrib/cvs/src/watch.c
+++ b/contrib/cvs/src/watch.c
@@ -341,7 +341,7 @@ watch_addremove (argc, argv)
err = start_recursion (addremove_fileproc, addremove_filesdoneproc,
(DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL,
- argc, argv, local, W_LOCAL, 0, LOCK_NONE,
+ argc, argv, local, W_LOCAL, 0, CVS_LOCK_NONE,
(char *)NULL, 1);
Lock_Cleanup ();
@@ -515,6 +515,6 @@ watchers (argc, argv)
return start_recursion (watchers_fileproc, (FILESDONEPROC) NULL,
(DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, NULL,
- argc, argv, local, W_LOCAL, 0, LOCK_READ,
+ argc, argv, local, W_LOCAL, 0, CVS_LOCK_READ,
(char *)NULL, 1);
}
diff --git a/contrib/cvs/src/zlib.c b/contrib/cvs/src/zlib.c
index 1fc7a72..00b3682 100644
--- a/contrib/cvs/src/zlib.c
+++ b/contrib/cvs/src/zlib.c
@@ -153,10 +153,10 @@ compress_buffer_input (closure, data, need, size, got)
bd = cb->buf->data;
if (bd == NULL)
{
- bd = ((struct buffer_data *) malloc (sizeof (struct buffer_data)));
+ bd = ((struct buffer_data *) xmalloc (sizeof (struct buffer_data)));
if (bd == NULL)
return -2;
- bd->text = (char *) malloc (BUFFER_DATA_SIZE);
+ bd->text = (char *) xmalloc (BUFFER_DATA_SIZE);
if (bd->text == NULL)
{
free (bd);
@@ -535,7 +535,7 @@ gunzip_and_write (fd, fullname, buf, size)
}
/* Read all of FD and put the gzipped data (RFC1952/RFC1951) into *BUF,
- replacing previous contents of *BUF. *BUF is malloc'd and *SIZE is
+ replacing previous contents of *BUF. *BUF is xmalloc'd and *SIZE is
its allocated size. Put the actual number of bytes of data in
*LEN. If something goes wrong, give a nonfatal error mentioning
FULLNAME as the name of the file for FD, and return 1 if we can't
@@ -561,7 +561,7 @@ read_and_gzip (fd, fullname, buf, size, len, level)
unsigned char *newbuf;
*size = 1024;
- newbuf = realloc (*buf, *size);
+ newbuf = xrealloc (*buf, *size);
if (newbuf == NULL)
{
error (0, 0, "out of memory");
@@ -622,7 +622,7 @@ read_and_gzip (fd, fullname, buf, size, len, level)
offset = zstr.next_out - *buf;
*size *= 2;
- newbuf = realloc (*buf, *size);
+ newbuf = xrealloc (*buf, *size);
if (newbuf == NULL)
{
error (0, 0, "out of memory");
OpenPOWER on IntegriCloud