|
|
@@ -2033,7 +2033,7 @@ RCS file: /e/ossp/pkg/tool/cvs/cvs/cvs/src/main.c,v
|
|
|
retrieving revision 1.1.1.14
|
|
|
diff -u -d -r1.1.1.14 main.c
|
|
|
--- src/main.c 16 May 2004 00:39:26 -0000 1.1.1.14
|
|
|
-+++ src/main.c 19 May 2004 18:38:57 -0000
|
|
|
++++ src/main.c 4 Jun 2004 19:07:16 -0000
|
|
|
@@ -54,6 +54,11 @@
|
|
|
|
|
|
mode_t cvsumask = UMASK_DFLT;
|
|
|
@@ -2441,7 +2441,7 @@ diff -u -d -r1.1.1.14 main.c
|
|
|
if (help)
|
|
|
{
|
|
|
argc = -1; /* some functions only check for this */
|
|
|
-@@ -730,6 +976,71 @@
|
|
|
+@@ -730,6 +976,80 @@
|
|
|
CVSUMASK_ENV, cp);
|
|
|
}
|
|
|
|
|
|
@@ -2470,16 +2470,20 @@ diff -u -d -r1.1.1.14 main.c
|
|
|
+ egid = getegid();
|
|
|
+ if (gid != egid)
|
|
|
+ setgid(egid); /* upgrade real to effective gid */
|
|
|
++#if !defined(__hpux)
|
|
|
+ else
|
|
|
+ setegid(gid); /* downgrade effective to real gid */
|
|
|
++#endif
|
|
|
+
|
|
|
+ /* adjust user id */
|
|
|
+ uid = getuid();
|
|
|
+ euid = geteuid();
|
|
|
+ if (uid != euid)
|
|
|
+ setuid(euid); /* upgrade real to effective uid */
|
|
|
++#if !defined(__hpux)
|
|
|
+ else
|
|
|
+ seteuid(uid); /* downgrade effective to real uid */
|
|
|
++#endif
|
|
|
+
|
|
|
+ /* still do not adjust umask */
|
|
|
+ umask(0);
|
|
|
@@ -2505,15 +2509,20 @@ diff -u -d -r1.1.1.14 main.c
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ /* delete effective user and group id */
|
|
|
++#if defined(__hpux)
|
|
|
++ setuid(getuid());
|
|
|
++ setgid(getgid());
|
|
|
++#else
|
|
|
+ seteuid(getuid());
|
|
|
+ setegid(getgid());
|
|
|
++#endif
|
|
|
+ }
|
|
|
+#endif
|
|
|
+
|
|
|
#ifdef SERVER_SUPPORT
|
|
|
|
|
|
# ifdef HAVE_KERBEROS
|
|
|
-@@ -746,6 +1057,21 @@
|
|
|
+@@ -746,6 +1066,21 @@
|
|
|
}
|
|
|
# endif /* HAVE_KERBEROS */
|
|
|
|
|
|
@@ -2535,7 +2544,7 @@ diff -u -d -r1.1.1.14 main.c
|
|
|
|
|
|
# if defined (AUTH_SERVER_SUPPORT) || defined (HAVE_GSSAPI)
|
|
|
if (strcmp (cvs_cmd_name, "pserver") == 0)
|
|
|
-@@ -770,6 +1096,10 @@
|
|
|
+@@ -770,6 +1105,10 @@
|
|
|
|
|
|
#endif /* SERVER_SUPPORT */
|
|
|
|
|
|
@@ -2546,7 +2555,7 @@ diff -u -d -r1.1.1.14 main.c
|
|
|
|
|
|
#ifdef SERVER_SUPPORT
|
|
|
if (server_active)
|
|
|
-@@ -832,8 +1162,12 @@
|
|
|
+@@ -832,8 +1171,12 @@
|
|
|
in server mode, since the client will send the repository
|
|
|
directory after the connection is made. */
|
|
|
|
|
|
@@ -2559,7 +2568,7 @@ diff -u -d -r1.1.1.14 main.c
|
|
|
{
|
|
|
char *CVSADM_Root;
|
|
|
|
|
|
-@@ -889,6 +1223,54 @@
|
|
|
+@@ -889,6 +1232,54 @@
|
|
|
error (1, 0,
|
|
|
"CVS/Root file (if any).");
|
|
|
}
|
|
|
@@ -2614,7 +2623,7 @@ diff -u -d -r1.1.1.14 main.c
|
|
|
}
|
|
|
|
|
|
/* Here begins the big loop over unique cvsroot values. We
|
|
|
-@@ -921,6 +1303,9 @@
|
|
|
+@@ -921,6 +1312,9 @@
|
|
|
end of things. */
|
|
|
|
|
|
while (
|
|
|
@@ -2624,7 +2633,7 @@ diff -u -d -r1.1.1.14 main.c
|
|
|
#ifdef SERVER_SUPPORT
|
|
|
server_active ||
|
|
|
#endif
|
|
|
-@@ -932,8 +1317,12 @@
|
|
|
+@@ -932,8 +1326,12 @@
|
|
|
in server mode, since the client will send the repository
|
|
|
directory after the connection is made. */
|
|
|
|
|
|
@@ -2637,7 +2646,7 @@ diff -u -d -r1.1.1.14 main.c
|
|
|
{
|
|
|
/* Now we're 100% sure that we have a valid CVSROOT
|
|
|
variable. Parse it to see if we're supposed to do
|
|
|
-@@ -966,7 +1355,12 @@
|
|
|
+@@ -966,7 +1364,12 @@
|
|
|
{
|
|
|
save_errno = errno;
|
|
|
/* If this is "cvs init", the root need not exist yet. */
|
|
|
@@ -2650,7 +2659,7 @@ diff -u -d -r1.1.1.14 main.c
|
|
|
{
|
|
|
error (1, save_errno, "%s", path);
|
|
|
}
|
|
|
-@@ -1002,6 +1396,9 @@
|
|
|
+@@ -1002,6 +1405,9 @@
|
|
|
read_cvsrc and other such places or vice versa. That sort
|
|
|
of thing probably needs more thought. */
|
|
|
if (1
|
|
|
@@ -2660,7 +2669,7 @@ diff -u -d -r1.1.1.14 main.c
|
|
|
#ifdef SERVER_SUPPORT
|
|
|
&& !server_active
|
|
|
#endif
|
|
|
-@@ -1032,7 +1429,31 @@
|
|
|
+@@ -1032,7 +1438,31 @@
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
@@ -2692,7 +2701,7 @@ diff -u -d -r1.1.1.14 main.c
|
|
|
#ifdef SERVER_SUPPORT
|
|
|
/* Don't worry about lock_cleanup_setup when the server is
|
|
|
* active since we can only go through this loop once in that
|
|
|
-@@ -1044,6 +1465,9 @@
|
|
|
+@@ -1044,6 +1474,9 @@
|
|
|
!current_parsed_root->isremote &&
|
|
|
#endif
|
|
|
!lock_cleanup_setup)
|
|
|
@@ -2702,7 +2711,7 @@ diff -u -d -r1.1.1.14 main.c
|
|
|
{
|
|
|
/* Set up to clean up any locks we might create on exit. */
|
|
|
cleanup_register (Lock_Cleanup);
|
|
|
-@@ -1052,6 +1476,27 @@
|
|
|
+@@ -1052,6 +1485,27 @@
|
|
|
|
|
|
/* Call our worker function. */
|
|
|
err = (*(cm->func)) (argc, argv);
|
|
|
@@ -2730,7 +2739,7 @@ diff -u -d -r1.1.1.14 main.c
|
|
|
|
|
|
/* Mark this root directory as done. When the server is
|
|
|
active, current_root will be NULL -- don't try and
|
|
|
-@@ -1070,12 +1515,21 @@
|
|
|
+@@ -1070,12 +1524,21 @@
|
|
|
dellist (&root_directories);
|
|
|
#endif
|
|
|
|
|
|
@@ -3584,7 +3593,7 @@ RCS file: /e/ossp/pkg/tool/cvs/cvs/cvs/src/server.c,v
|
|
|
retrieving revision 1.1.1.16
|
|
|
diff -u -d -r1.1.1.16 server.c
|
|
|
--- src/server.c 18 May 2004 14:21:53 -0000 1.1.1.16
|
|
|
-+++ src/server.c 19 May 2004 18:41:07 -0000
|
|
|
++++ src/server.c 4 Jun 2004 19:01:35 -0000
|
|
|
@@ -112,6 +112,16 @@
|
|
|
|
|
|
# endif /* AUTH_SERVER_SUPPORT */
|
|
|
@@ -3679,7 +3688,7 @@ diff -u -d -r1.1.1.16 server.c
|
|
|
/* ... and make sure the protocol ends on the right foot. */
|
|
|
/* See above comment about error handling. */
|
|
|
getnline( &tmp, &tmp_allocated, PATH_MAX, stdin );
|
|
|
-@@ -6669,3 +6712,517 @@
|
|
|
+@@ -6669,3 +6712,519 @@
|
|
|
cvs_output (text, 0);
|
|
|
}
|
|
|
}
|
|
|
@@ -3855,6 +3864,7 @@ diff -u -d -r1.1.1.16 server.c
|
|
|
+#else
|
|
|
+ if (setpgid(0, getpid()) == -1)
|
|
|
+ return -1;
|
|
|
++#ifdef TIOCNOTTY
|
|
|
+#ifndef _PATH_TTY
|
|
|
+#define _PATH_TTY "/dev/tty"
|
|
|
+#endif
|
|
|
@@ -3863,6 +3873,7 @@ diff -u -d -r1.1.1.16 server.c
|
|
|
+ ioctl(fd, TIOCNOTTY, NULL);
|
|
|
+ close(fd);
|
|
|
+#endif
|
|
|
++#endif
|
|
|
+
|
|
|
+ /*
|
|
|
+ * fork again so the parent, (the session group leader), can exit. This
|