pkgsrc/devel/cvs/patches/patch-ar
wiz fee7c30388 Update to 1.11.21:
Changes since 1.11.20:
**********************

BUG FIXES

* Thanks to Serguei E. Leontiev, CVS with Kerberos 5 GSSAPI
  should automatically link on FreeBSD 5.x. (bug #14639).

* Thanks to Rahul Bhargava, heavily loaded systems
  suffering from a disk crash or power failure will not lose data they claimed
  to have committed.

* CVS server now handles conflict markers in Entry requests as documented.

* CVS now remembers that binary file merge conflicts occurred until the
  timestamp of the updated binary file changes.

* CVS client now saves some bandwidth by not sending the contents of files
  with conflicts to the server when it isn't needed.

* CVS now does correct locking during import.

* A problem where the server could block indefinitely waiting for an EOF from
  the client when compression was enabled has been fixed.

* `cvs diff' no longer splits its arguments on spaces.

* Thanks to an old report and patch from Stewart Brodie, a
  potential crash in response to a corrupt RCS file has been fixed.

* CVS now locks the history and val-tags files before writing to them.
  Especially with large repositories, users should no longer see new warnings
  about corrupt history records when using the `cvs history' command.  Existing
  corrupt history records will still need to be removed manually.  val-tags
  corruption should have had less obvious effects, but removing the
  CVSROOT/val-tags file and allowing a 1.11.21 or later version of CVS to
  regenerate it may eliminate a few odd behaviors and possibly cause a slight
  speed up of read transactions in large repositories over time.
2006-01-29 02:40:40 +00:00

58 lines
1.5 KiB
Text

$NetBSD: patch-ar,v 1.17 2006/01/29 02:40:40 wiz Exp $
--- src/server.c.orig 2005-09-22 17:57:34.000000000 +0200
+++ src/server.c
@@ -782,6 +782,7 @@ E Protocol error: Root says \"%s\" but p
nothing. But for rsh, we need to do it now. */
parse_config (current_parsed_root->directory);
+ if (!nolock) {
path = xmalloc (strlen (current_parsed_root->directory)
+ sizeof (CVSROOTADM)
+ 2);
@@ -799,6 +800,7 @@ E Protocol error: Root says \"%s\" but p
pending_error = save_errno;
}
free (path);
+ }
#ifdef HAVE_PUTENV
env = xmalloc (strlen (CVSROOT_ENV) + strlen (current_parsed_root->directory) + 2);
@@ -2283,8 +2285,12 @@ serve_global_option (arg)
break;
case 'n':
noexec = 1;
+ nolock = 1;
logoff = 1;
break;
+ case 'u':
+ nolock = 1;
+ break;
case 'q':
quiet = 1;
break;
@@ -5306,6 +5312,7 @@ switch_to_user (cvs_username, username)
const char *username;
{
struct passwd *pw;
+ int rc;
pw = getpwnam (username);
if (pw == NULL)
@@ -5384,7 +5391,15 @@ error 0 %s: no such system user\n", user
}
}
- if (setuid (pw->pw_uid) < 0)
+#ifdef SETXID_SUPPORT
+ /* Honor the setuid bit iff set. */
+ if (getuid() != geteuid())
+ rc = setuid (geteuid ());
+ else
+#else
+ rc = setuid (pw->pw_uid);
+#endif
+ if (rc < 0)
{
/* Note that this means that if run as a non-root user,
CVSROOT/passwd must contain the user we are running as