diff options
author | Carlo Marcelo Arenas Belón <carenas@gmail.com> | 2021-09-15 01:09:46 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-16 15:06:24 -0700 |
commit | a7775c7eb8074fcf37f22bdcdc0971448c1aa4d1 (patch) | |
tree | 012510275785edc16239c7d1618f49e44228ea37 /Documentation/git-cvsserver.txt | |
parent | Git 2.33 (diff) | |
download | tgif-a7775c7eb8074fcf37f22bdcdc0971448c1aa4d1.tar.xz |
git-cvsserver: use crypt correctly to compare password hashes
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 <carenas@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-cvsserver.txt')
-rw-r--r-- | Documentation/git-cvsserver.txt | 10 |
1 files changed, 4 insertions, 6 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: ------ |