summaryrefslogtreecommitdiff
path: root/devel/cvs/patches/patch-ar
diff options
context:
space:
mode:
Diffstat (limited to 'devel/cvs/patches/patch-ar')
-rw-r--r--devel/cvs/patches/patch-ar34
1 files changed, 32 insertions, 2 deletions
diff --git a/devel/cvs/patches/patch-ar b/devel/cvs/patches/patch-ar
index dffd878f999..3cdf731c0c4 100644
--- a/devel/cvs/patches/patch-ar
+++ b/devel/cvs/patches/patch-ar
@@ -1,7 +1,7 @@
-$NetBSD: patch-ar,v 1.2 1999/04/20 15:09:44 mycroft Exp $
+$NetBSD: patch-ar,v 1.3 2000/02/23 06:48:56 mycroft Exp $
--- src/server.c.orig Thu Aug 6 20:46:38 1998
-+++ src/server.c Tue Apr 20 10:43:30 1999
++++ src/server.c Wed Feb 23 01:18:51 2000
@@ -597,31 +597,34 @@
nothing. But for rsh, we need to do it now. */
parse_config (CVSroot_directory);
@@ -69,3 +69,33 @@ $NetBSD: patch-ar,v 1.2 1999/04/20 15:09:44 mycroft Exp $
break;
case 'q':
quiet = 1;
+@@ -4663,19 +4668,23 @@
+ #endif /* HAVE_INITGROUPS */
+
+ #ifdef SETXID_SUPPORT
+- /* honor the setgid bit iff set*/
++ /* Honor the setgid bit iff set. */
+ if (getgid() != getegid())
+- {
+ setgid (getegid ());
+- }
+ else
+ #else
+- {
+ setgid (pw->pw_gid);
+- }
+ #endif
+
+- setuid (pw->pw_uid);
++#ifdef SETXID_SUPPORT
++ /* Honor the setuid bit iff set. */
++ if (getuid() != geteuid())
++ setuid (geteuid ());
++ else
++#else
++ setuid (pw->pw_uid);
++#endif
++
+ /* We don't want our umask to change file modes. The modes should
+ be set by the modes used in the repository, and by the umask of
+ the client. */