From patchwork Wed Sep 15 08:09:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= X-Patchwork-Id: 12495683 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B030EC433F5 for ; Wed, 15 Sep 2021 08:11:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8D7BE61209 for ; Wed, 15 Sep 2021 08:11:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237077AbhIOIMS (ORCPT ); Wed, 15 Sep 2021 04:12:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237048AbhIOILh (ORCPT ); Wed, 15 Sep 2021 04:11:37 -0400 Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05A97C061574 for ; Wed, 15 Sep 2021 01:10:04 -0700 (PDT) Received: by mail-qt1-x833.google.com with SMTP id x5so1556735qtq.13 for ; Wed, 15 Sep 2021 01:10:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=meQLh/fOvDEJEhDTGNwuyd4iAd78b+Ha5Rm3teYRLak=; b=nQKfHDJH1qoX59GoKboM8SyTTEgtziLSz7oRylmi3l1kcpQdYUOr5fvRbyG3VJfxvl 9cS03eNqsNzEsJXZ3TDuY79dXFIw4lKhOkyzvXZ4jF+wQdIiAmDg078kvTds5rSJBwxG OXF4xEn/oveyrymaX5K7vtWf1XWcQOx02Hbj4H461MnOT8h6WFOvlTWeFhw8aFuLvSA+ TNAN2OWqRZ4R0ee/n7SN/pMyZgc64X6hGAjxePwNq52I9upXfDHyZcvtL0R/RR03eR6i AcDppX/Brmvt0mXmBEYnEodPDE+UWTUIVCJseu0N0wBRU/ZWdODvrXGqNJQIt/sGO25n 5z+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=meQLh/fOvDEJEhDTGNwuyd4iAd78b+Ha5Rm3teYRLak=; b=gYwvd9wJBD/xG6K2AWaLuNTJnXXpe6lumkx7tiPosk1KiRpd2Zu6e4PndW8tXsrV9t tVvAqv7rs9dA3H6M5I5kjLCDM3WKLWF/1s2LdR9glVzuTSmnf4RAad5rMiVs79ihp0Px 3JY7qNniJdjg3ZWGEr9fJKdixj4REeVVIrhkWxA8WM884PwP2z3jzmoswcI+8OTNZHuT dLui1zGKp8Y5hPfeIOSZoZCP04wuxk733AX12VqcTqKKsH+9/ZROBD587987/PlDGYE4 XRECGijErJ/FTVYn7CXYpb5ruYN4uN/JEikBZUUybyR1wpyPKGcpeaZzN9Dl7e0hpQoZ gAzg== X-Gm-Message-State: AOAM5315hgMTQ/lDTrds+17tJ4KDiOyAqvU+QWHRG8YU40Vmx86IlYLA MjJvKl80RG38kdn3IR8nVkHOt2RBsw4= X-Google-Smtp-Source: ABdhPJyP5OlLZI8O/0/voxvynzQdg8I1usXLXAO60RfjByIenhUe98LIT6RGNLEB0FlVPhVrIg1svg== X-Received: by 2002:ac8:5617:: with SMTP id 23mr8788010qtr.20.1631693402890; Wed, 15 Sep 2021 01:10:02 -0700 (PDT) Received: from carlos-mbp.lan (104-1-92-200.lightspeed.sntcca.sbcglobal.net. [104.1.92.200]) by smtp.gmail.com with ESMTPSA id 20sm9661435qkn.31.2021.09.15.01.10.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Sep 2021 01:10:02 -0700 (PDT) From: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= To: git@vger.kernel.org Cc: sam@vilain.net, avarab@gmail.com, =?utf-8?q?Carlo_Marcelo_Arenas_Bel?= =?utf-8?q?=C3=B3n?= Subject: [PATCH 1/3] git-cvsserver: use crypt correctly to compare password hashes Date: Wed, 15 Sep 2021 01:09:46 -0700 Message-Id: <20210915080948.11891-2-carenas@gmail.com> X-Mailer: git-send-email 2.33.0.481.g26d3bed244 In-Reply-To: <20210915080948.11891-1-carenas@gmail.com> References: <20210915080948.11891-1-carenas@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org c057bad370 (git-cvsserver: use a password file cvsserver pserver, 2010-05-15) adds a way for `git cvsserver` to provide authenticated pserver accounts without having clear text passwords, but uses the username instead of the password to the call for crypt(3). Correct that, and make sure the documentation correctly indicates how to obtain hashed passwords that could be used to populate this configuration, as well as correcting the hash that was used for the tests. This change will require that any user of this feature updates the hashes in their configuration, but has the advantage of using a more similar format than cvs uses, probably also easying any migration. Signed-off-by: Carlo Marcelo Arenas Belón --- Documentation/git-cvsserver.txt | 10 ++++------ git-cvsserver.perl | 2 +- t/t9400-git-cvsserver-server.sh | 4 +++- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt index f2e4a47ebe..4d13367c77 100644 --- a/Documentation/git-cvsserver.txt +++ b/Documentation/git-cvsserver.txt @@ -118,13 +118,11 @@ for example: myuser:$1$BA)@$vbnMJMDym7tA32AamXrm./ ------ You can use the 'htpasswd' facility that comes with Apache to make these -files, but Apache's MD5 crypt method differs from the one used by most C -library's crypt() function, so don't use the -m option. +files, but only with the -d option (or -B if your system suports it). -Alternatively you can produce the password with perl's crypt() operator: ------ - perl -e 'my ($user, $pass) = @ARGV; printf "%s:%s\n", $user, crypt($user, $pass)' $USER password ------ +Preferably use the system specific utility that manages password hash +creation in your platform (e.g. mkpasswd in Linux, encrypt in OpenBSD or +pwhash in NetBSD) and paste it in the right location. Then provide your password via the pserver method, for example: ------ diff --git a/git-cvsserver.perl b/git-cvsserver.perl index ed035f32c2..4c93b5d099 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -222,7 +222,7 @@ open my $passwd, "<", $authdb or die $!; while (<$passwd>) { if (m{^\Q$user\E:(.*)}) { - if (crypt($user, descramble($password)) eq $1) { + if (crypt(descramble($password), $1) eq $1) { $auth_ok = 1; } }; diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh index 2d29d486ee..59b40359c7 100755 --- a/t/t9400-git-cvsserver-server.sh +++ b/t/t9400-git-cvsserver-server.sh @@ -36,6 +36,8 @@ CVSWORK="$PWD/cvswork" CVS_SERVER=git-cvsserver export CVSROOT CVS_SERVER +PWDHASH='lac2ItudM3.KM' + rm -rf "$CVSWORK" "$SERVERDIR" test_expect_success 'setup' ' git config push.default matching && @@ -54,7 +56,7 @@ test_expect_success 'setup' ' GIT_DIR="$SERVERDIR" git config --bool gitcvs.enabled true && GIT_DIR="$SERVERDIR" git config gitcvs.logfile "$SERVERDIR/gitcvs.log" && GIT_DIR="$SERVERDIR" git config gitcvs.authdb "$SERVERDIR/auth.db" && - echo cvsuser:cvGVEarMLnhlA > "$SERVERDIR/auth.db" + echo "cvsuser:$PWDHASH" >"$SERVERDIR/auth.db" ' # note that cvs doesn't accept absolute pathnames From patchwork Wed Sep 15 08:09:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= X-Patchwork-Id: 12495687 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 951D9C433EF for ; Wed, 15 Sep 2021 08:11:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7CA6F61212 for ; Wed, 15 Sep 2021 08:11:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237110AbhIOIMk (ORCPT ); Wed, 15 Sep 2021 04:12:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236942AbhIOILh (ORCPT ); Wed, 15 Sep 2021 04:11:37 -0400 Received: from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com [IPv6:2607:f8b0:4864:20::72c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D8CDC0613E2 for ; Wed, 15 Sep 2021 01:10:05 -0700 (PDT) Received: by mail-qk1-x72c.google.com with SMTP id m21so2476967qkm.13 for ; Wed, 15 Sep 2021 01:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NY7uCMi5cPY9K6nWHX9/3YVKLVG9oWje/gUm5AtEnRs=; b=NHGuAxCVfmS6G3ncrcK29+WVe0mtCbadGP4kWSzvfnZStSdIjRoUQKE4TOEYKrcks4 pO+RkjrQ2fcYOfHz9MZcka2HxmkCzCeA0Verm31zS0OUgOl4AW6caVa5K9V7Qfb2hvxt DSE4Upi5F59cahPk26WtLBaJaIAcm7+AI83+VPHKkrS1p1OxxdY1o/wXwymEO97vuMyr I6zr29ZItQfOGHUbSXsjMjxCkgvZL/Z6r6vD0vj5yLQu9IVruEA9dECyfjGspv+hnPmd r7qJZlqdS/ErB6Vr7y6pes2tgvITCf04VS+uKlMXQS0jD09fpmMVFJ+gd3P8gkbixYg2 +ydQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NY7uCMi5cPY9K6nWHX9/3YVKLVG9oWje/gUm5AtEnRs=; b=O3jhwjoNe+e8GoEnNn1DJ6x8o/GXUme2q6WLRm6PDflHxGmIljF4bQ/jcQQknytMNr D4iW+fe9wuSKAmibUiLGOBLEvRSQ4SF44RwYlZ56yUnR3V3PJwZ4w0Rdkf1dxpI+aFua ihV8S3WT+lDC2yJhjOwhBzgSL+DseNfGna7AAuIpONdKx7I6x+dK8NtyAGJ4pDz6zsHt MctRvtUHAkYG/7K4P4p9DDYJWy+3mtYU1Mm91nmFzLmrSnviVBP+KduAyOviAguWtlkm t8L35cs2K7SkBzBoZEjR2xkzVW9JEDSyhPIDpyAvUPqtce9UDDjPgLF0iQLtSbBweMEf yWEQ== X-Gm-Message-State: AOAM5316D7kuyueeR8/eaz4mDo3mgXxhrUA5xL8wpwe2oCq5dxKA/D3a GiytYvtF1cEhNrC0M4WKvOwwZKxr/GU= X-Google-Smtp-Source: ABdhPJxNVBQUttlqGUEx96ALdScTUAvf5Zf11nRCQOBOTdrc7PjoPiriDdMRjlNNbIF1QamgYy7Dew== X-Received: by 2002:a37:6451:: with SMTP id y78mr8627944qkb.427.1631693403903; Wed, 15 Sep 2021 01:10:03 -0700 (PDT) Received: from carlos-mbp.lan (104-1-92-200.lightspeed.sntcca.sbcglobal.net. [104.1.92.200]) by smtp.gmail.com with ESMTPSA id 20sm9661435qkn.31.2021.09.15.01.10.03 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Sep 2021 01:10:03 -0700 (PDT) From: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= To: git@vger.kernel.org Cc: sam@vilain.net, avarab@gmail.com, =?utf-8?q?Carlo_Marcelo_Arenas_Bel?= =?utf-8?q?=C3=B3n?= Subject: [PATCH 2/3] git-cvsserver: protect against NULL in crypt(3) Date: Wed, 15 Sep 2021 01:09:47 -0700 Message-Id: <20210915080948.11891-3-carenas@gmail.com> X-Mailer: git-send-email 2.33.0.481.g26d3bed244 In-Reply-To: <20210915080948.11891-1-carenas@gmail.com> References: <20210915080948.11891-1-carenas@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Some versions of crypt(3) will return NULL when passed an unsupported hash type (ex: OpenBSD with DES), so check for undef instead of using it directly. Also use this to probe the system and select a better hash function in the tests, so it can pass successfully. Signed-off-by: Carlo Marcelo Arenas Belón --- git-cvsserver.perl | 7 ++++--- t/t9400-git-cvsserver-server.sh | 7 ++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 4c93b5d099..8e7c34a235 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -222,10 +222,11 @@ open my $passwd, "<", $authdb or die $!; while (<$passwd>) { if (m{^\Q$user\E:(.*)}) { - if (crypt(descramble($password), $1) eq $1) { - $auth_ok = 1; + my $hash = crypt(descramble($password), $1); + if (defined $hash) { + $auth_ok = 1 if $hash eq $1; } - }; + } } close $passwd; diff --git a/t/t9400-git-cvsserver-server.sh b/t/t9400-git-cvsserver-server.sh index 59b40359c7..17f988edd2 100755 --- a/t/t9400-git-cvsserver-server.sh +++ b/t/t9400-git-cvsserver-server.sh @@ -36,7 +36,12 @@ CVSWORK="$PWD/cvswork" CVS_SERVER=git-cvsserver export CVSROOT CVS_SERVER -PWDHASH='lac2ItudM3.KM' +if perl -e 'exit(1) if not defined crypt("", "cv")' +then + PWDHASH='lac2ItudM3.KM' +else + PWDHASH='$2b$10$t8fGvE/a9eLmfOLzsZme2uOa2QtoMYwIxq9wZA6aBKtF1Yb7FJIzi' +fi rm -rf "$CVSWORK" "$SERVERDIR" test_expect_success 'setup' ' From patchwork Wed Sep 15 08:09:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= X-Patchwork-Id: 12495689 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05200C433EF for ; Wed, 15 Sep 2021 08:11:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DEDE561185 for ; Wed, 15 Sep 2021 08:11:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237118AbhIOIMm (ORCPT ); Wed, 15 Sep 2021 04:12:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231596AbhIOILh (ORCPT ); Wed, 15 Sep 2021 04:11:37 -0400 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00B5BC061575 for ; Wed, 15 Sep 2021 01:10:06 -0700 (PDT) Received: by mail-qt1-x831.google.com with SMTP id 2so1627417qtw.1 for ; Wed, 15 Sep 2021 01:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=B/7sUsd7sXBB4TyNldi9psar4Z2EeHkW+mTAth3OCRc=; b=MbykRhql+2bYLS8w3awGKnSq0FITvZSmCImD94RB+MFTC0/enj4nKIwl3CrbDn7Omg eNimuslWcJ62XJl/wWReC34AqWKPDpLWQX7/xYCLwcxksFD1rnz082Voa0hxqqBLMavM qgzQ4jtUM3rJ+Ic53RtopaQp7QTiRosrg5CzF8AnbwVWga/u7pkot5YBh2H3/wSUm3IK ZOCXhbd9ei2e6y1Wfuu/7zudgExSpCAMJfLpvnrPRIdjrT9RAmoQsZTRQXiFrdadBVOA WhvL4l8/pl42tfEurB8RQa69L7smQdR9ScYhZK89XcWukGtBatcqGIMkySXBMUDvzUIJ nxfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B/7sUsd7sXBB4TyNldi9psar4Z2EeHkW+mTAth3OCRc=; b=BGpvbPHKKx1jcaQ6P5uwbjlEnF4GibS8gl+MR2BX4/tSxrAvP0yd3iTqNy/5To4ze3 /VMUi7rvV+jedDcNRyp7ZFbc5HT6yEzrOuaRYwgenwtBUgNl0df4P0wIJE6P9oqlNKyr n21KW46gIx9W1H3F5Nf8+LLVcd31dJsev355GpR5aMc+GiwnxfKFkqsNS23qmH2mtjWb cHzaVqJYICdk47GUsIxIuAR59tMRCUrFednQ+WjsMIsxVW+svjrNZL1+K5WKtlXrG6Tl 5AwauR2RlLrq8B/7x/flXexARCgk+GcdnPHFIvL0e+4vSRjzlIex+9o1FxWaedp3hHjX 8Nsw== X-Gm-Message-State: AOAM532Y9HYAgybR+TlMTVzharkMqxlhhGPGZ6JLZ9gJdk7I+elevzJP BUNnCGsmZ6/29Xojwhmk3QthSj+rZek= X-Google-Smtp-Source: ABdhPJxrb1Vr3cA2o3wz+9+NsMIMpFq32v/Btj3cEgoseobR93MN55NfwkawM3bsXr+XRZLpfHsicg== X-Received: by 2002:ac8:5909:: with SMTP id 9mr8883561qty.50.1631693404896; Wed, 15 Sep 2021 01:10:04 -0700 (PDT) Received: from carlos-mbp.lan (104-1-92-200.lightspeed.sntcca.sbcglobal.net. [104.1.92.200]) by smtp.gmail.com with ESMTPSA id 20sm9661435qkn.31.2021.09.15.01.10.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Sep 2021 01:10:04 -0700 (PDT) From: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= To: git@vger.kernel.org Cc: sam@vilain.net, avarab@gmail.com, =?utf-8?q?Carlo_Marcelo_Arenas_Bel?= =?utf-8?q?=C3=B3n?= Subject: [PATCH 3/3] Documentation: cleanup git-cvsserver Date: Wed, 15 Sep 2021 01:09:48 -0700 Message-Id: <20210915080948.11891-4-carenas@gmail.com> X-Mailer: git-send-email 2.33.0.481.g26d3bed244 In-Reply-To: <20210915080948.11891-1-carenas@gmail.com> References: <20210915080948.11891-1-carenas@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Fix a few typos and alignment issues, and while at it update the example hashes to show most of the ones available in recent crypt(3). Signed-off-by: Carlo Marcelo Arenas Belón --- Documentation/git-cvsserver.txt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Documentation/git-cvsserver.txt b/Documentation/git-cvsserver.txt index 4d13367c77..4dc57ed254 100644 --- a/Documentation/git-cvsserver.txt +++ b/Documentation/git-cvsserver.txt @@ -99,7 +99,7 @@ looks like ------ -Only anonymous access is provided by pserve by default. To commit you +Only anonymous access is provided by pserver by default. To commit you will have to create pserver accounts, simply add a gitcvs.authdb setting in the config file of the repositories you want the cvsserver to allow writes to, for example: @@ -114,8 +114,9 @@ The format of these files is username followed by the encrypted password, for example: ------ - myuser:$1Oyx5r9mdGZ2 - myuser:$1$BA)@$vbnMJMDym7tA32AamXrm./ + myuser:sqkNi8zPf01HI + myuser:$1$9K7FzU28$VfF6EoPYCJEYcVQwATgOP/ + myuser:$5$.NqmNH1vwfzGpV8B$znZIcumu1tNLATgV2l6e1/mY8RzhUDHMOaVOeL1cxV3 ------ You can use the 'htpasswd' facility that comes with Apache to make these files, but only with the -d option (or -B if your system suports it). @@ -126,7 +127,7 @@ pwhash in NetBSD) and paste it in the right location. Then provide your password via the pserver method, for example: ------ - cvs -d:pserver:someuser:somepassword server/path/repo.git co + cvs -d:pserver:someuser:somepassword@server:/path/repo.git co ------ No special setup is needed for SSH access, other than having Git tools in the PATH. If you have clients that do not accept the CVS_SERVER @@ -136,7 +137,7 @@ Note: Newer CVS versions (>= 1.12.11) also support specifying CVS_SERVER directly in CVSROOT like ------ -cvs -d ":ext;CVS_SERVER=git cvsserver:user@server/path/repo.git" co + cvs -d ":ext;CVS_SERVER=git cvsserver:user@server/path/repo.git" co ------ This has the advantage that it will be saved in your 'CVS/Root' files and you don't need to worry about always setting the correct environment @@ -184,8 +185,8 @@ allowing access over SSH. + -- ------ - export CVSROOT=:ext:user@server:/var/git/project.git - export CVS_SERVER="git cvsserver" + export CVSROOT=:ext:user@server:/var/git/project.git + export CVS_SERVER="git cvsserver" ------ -- 4. For SSH clients that will make commits, make sure their server-side @@ -201,7 +202,7 @@ allowing access over SSH. `project-master` directory: + ------ - cvs co -d project-master master + cvs co -d project-master master ------ [[dbbackend]]