<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>49879</bug_id>
          
          <creation_ts>2004-05-03 11:52 0000</creation_ts>
          <short_desc>cvs should be setuid root in dev-util/cvs</short_desc>
          <delta_ts>2004-05-22 20:08:09 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>ryan@epicgames.com</reporter>
          <assigned_to>scandium@gentoo.org</assigned_to>
          <cc>jmglov@gentoo.org</cc>

      

      
          <long_desc isprivate="0">
            <who>ryan@epicgames.com</who>
            <bug_when>2004-05-03 11:52:37 0000</bug_when>
            <thetext>Unless /usr/bin/cvs is setuid root, it can&apos;t change users, which makes it unusable for serving multiple anonymous read-only clients.

 Details and discussion:
   http://mail.gnu.org/archive/html/info-cvs/2001-06/msg00071.html

cvs in portage works fine as-is for client usage.

--ryan.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ryan@epicgames.com</who>
            <bug_when>2004-05-03 16:16:35 0000</bug_when>
            <thetext>Wanted to follow up on this, and correct my report:

cvs gets installed into xinetd to run in pserver mode as user &quot;cvs&quot; and group &quot;cvs&quot;. This breaks anonymous pserver access, since non-root binaries can&apos;t setuid() to a different user, which pserver does for security...in dropping root privs like this, it doesn&apos;t need to run as a &quot;cvs&quot; user in the first place.

However, setting the suid bit on /usr/bin/cvs so it runs as root breaks cvs-over-ssh in other strange ways. Details here:
    https://bugzilla.icculus.org/show_bug.cgi?id=1646

The solution appears to be running the pserver as root in xinetd (which lets it change users and drop privs), and NOT setting the suid bit on the binary (so users working over ssh get the right permissions...in this case, the cvs binary has to be run as the user that ssh&apos;d into the server, and not root).

So I guess the actual bug solution is not tagging the binary as suid root, but instead:

 - change the xinetd entry for cvspserver to run as root, not the user &quot;cvs&quot;.
 - Don&apos;t make the cvs user/group in the ebuild at all? I don&apos;t think it&apos;s necessary in light of this...?

Sorry for the misinformation in the original bug report, but the issue was a little deeper than I originally believed it to be.

Thanks,
--ryan.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>scandium@gentoo.org</who>
            <bug_when>2004-05-07 04:27:57 0000</bug_when>
            <thetext>Sorry, it took me some time to comment on this :)

I am currently looking for our cvs server admin, so that we can fix this issue for people who want to run a server for sure.

I hope to get this solved over the weekend.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>scandium@gentoo.org</who>
            <bug_when>2004-05-22 16:25:42 0000</bug_when>
            <thetext>I will attach proposed fixes for the ebuild/xinetd file soon.
Please review then :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>scandium@gentoo.org</who>
            <bug_when>2004-05-22 16:48:50 0000</bug_when>
            <thetext>Created an attachment (id=31856)
proposed changes for xinetd config
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>scandium@gentoo.org</who>
            <bug_when>2004-05-22 16:49:25 0000</bug_when>
            <thetext>Created an attachment (id=31857)
proposed changes for cvs-1.11.16-r1
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>scandium@gentoo.org</who>
            <bug_when>2004-05-22 16:50:01 0000</bug_when>
            <thetext>The ebuild diff also contains the &quot;doc&quot; USE additions proposed by jmglov.

Sorry that I didn&apos;t seperate them :/</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>jmglov@gentoo.org</who>
            <bug_when>2004-05-22 17:32:24 0000</bug_when>
            <thetext>I have tested scandium&apos;s proposed changes, and I can get pserver working using the normal methods. Go for it, scandium! :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>scandium@gentoo.org</who>
            <bug_when>2004-05-22 17:47:24 0000</bug_when>
            <thetext>committed</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>ryan@epicgames.com</who>
            <bug_when>2004-05-22 20:08:09 0000</bug_when>
            <thetext>You guys rock, as usual.  :)

Thanks for your attention!

--ryan.

</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>31856</attachid>
            <date>2004-05-22 16:48 0000</date>
            <desc>proposed changes for xinetd config</desc>
            <filename>cvspserver.xinetd.d.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">Niw3YzYKPCAJdXNlcgkJPSBjdnMKPCAJZ3JvdXAJCT0gY3ZzCi0tLQo+IAl1c2VyCQk9IHJvb3QK
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>31857</attachid>
            <date>2004-05-22 16:49 0000</date>
            <desc>proposed changes for cvs-1.11.16-r1</desc>
            <filename>cvs-1.11.16.ebuild.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">OWM5LDEyCjwgU1JDX1VSST0iaHR0cDovL2Z0cC5jdnNob21lLm9yZy9yZWxlYXNlL3N0YWJsZS8k
e1B9LyR7UH0udGFyLmJ6MiIKLS0tCj4gU1JDX1VSST0iaHR0cDovL2Z0cC5jdnNob21lLm9yZy9y
ZWxlYXNlL3N0YWJsZS8ke1B9LyR7UH0udGFyLmJ6Mgo+IAlkb2M/ICggaHR0cDovL2Z0cC5jdnNo
b21lLm9yZy9yZWxlYXNlL3N0YWJsZS8ke1B9L2NlZGVycXZpc3QtJHtQVn0uaHRtbC50YXIuYnoy
Cj4gCQlodHRwOi8vZnRwLmN2c2hvbWUub3JnL3JlbGVhc2Uvc3RhYmxlLyR7UH0vY2VkZXJxdmlz
dC0ke1BWfS5wZGYKPiAJC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