From owner-svn-soc-all@FreeBSD.ORG Sat May 16 23:16:39 2015 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6797924 for ; Sat, 16 May 2015 23:16:39 +0000 (UTC) Received: from socsvn.freebsd.org (socsvn.freebsd.org [IPv6:2001:1900:2254:206a::50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6119106B for ; Sat, 16 May 2015 23:16:39 +0000 (UTC) Received: from socsvn.freebsd.org ([127.0.1.124]) by socsvn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4GNGdUe080549 for ; Sat, 16 May 2015 23:16:39 GMT (envelope-from gavin@FreeBSD.org) Received: (from www@localhost) by socsvn.freebsd.org (8.14.9/8.14.9/Submit) id t4GNGdrq080523 for svn-soc-all@FreeBSD.org; Sat, 16 May 2015 23:16:39 GMT (envelope-from gavin@FreeBSD.org) Date: Sat, 16 May 2015 23:16:39 GMT Message-Id: <201505162316.t4GNGdrq080523@socsvn.freebsd.org> X-Authentication-Warning: socsvn.freebsd.org: www set sender to gavin@FreeBSD.org using -f From: gavin@FreeBSD.org To: svn-soc-all@FreeBSD.org Subject: socsvn commit: r285601 - svnadmin/tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 May 2015 23:16:39 -0000 Author: gavin Date: Sat May 16 23:16:38 2015 New Revision: 285601 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=285601 Log: Switch to use openssl to encrypt passwords rather than htpasswd. Modified: svnadmin/tools/add-user.sh Modified: svnadmin/tools/add-user.sh ============================================================================== --- svnadmin/tools/add-user.sh Sat May 16 22:53:26 2015 (r285600) +++ svnadmin/tools/add-user.sh Sat May 16 23:16:38 2015 (r285601) @@ -44,11 +44,8 @@ passwd="${passwd%%==}" echo Adding ${type} ${name} to ${htuser} with passwd ${passwd} -htpasswd -sb "${htuser}" "${name}" "${passwd}" -if [ $? -ne 0 ]; then - echo "htpasswd failed" - exit 1 -fi +encpass=`echo -n ${passwd} | openssl dgst -sha1 -binary | openssl enc -base64` +echo "${name}:{SHA}${encpass}" >> "${htuser}" svn commit -m "add ${type} ${name}" ${htuser} if [ $? -ne 0 ]; then