From users-return-11244-apmail-subversion-users-archive=subversion.apache.org@subversion.apache.org Wed Oct 5 08:17:25 2011 Return-Path: X-Original-To: apmail-subversion-users-archive@minotaur.apache.org Delivered-To: apmail-subversion-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C5E139CCD for ; Wed, 5 Oct 2011 08:17:25 +0000 (UTC) Received: (qmail 39597 invoked by uid 500); 5 Oct 2011 08:17:25 -0000 Delivered-To: apmail-subversion-users-archive@subversion.apache.org Received: (qmail 39585 invoked by uid 500); 5 Oct 2011 08:17:25 -0000 Mailing-List: contact users-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@subversion.apache.org Received: (qmail 39578 invoked by uid 99); 5 Oct 2011 08:17:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2011 08:17:25 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dpsenner@gmail.com designates 209.85.220.43 as permitted sender) Received: from [209.85.220.43] (HELO mail-dy0-f43.google.com) (209.85.220.43) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Oct 2011 08:17:17 +0000 Received: by dyj3 with SMTP id 3so116052dyj.16 for ; Wed, 05 Oct 2011 01:16:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:references:in-reply-to:subject:date:message-id:mime-version :content-type:content-transfer-encoding:x-mailer:x-mimeole :thread-index; bh=1fgyDORRrPznScTGKwdc5klM4nyLkrfXn3/QdR9U7Gs=; b=Nz0wh5b3/YVHRgjoC83TK8lWfS/zrZsUQRa0RclBohHPC95G5lnfQY0XnIfIT1e55T PxwpWavOu1hmLdMB6FCR3PLyDBgvf8DgL2FSB3eM9aZUI2evD+EV/MqyBbVQT/5djhtT QjZIeb2Gg+v1ytb9zxxXtteFnhrZnm58SzzKQ= Received: by 10.223.52.141 with SMTP id i13mr3180089fag.74.1317802615710; Wed, 05 Oct 2011 01:16:55 -0700 (PDT) Received: from DOMINIKP ([95.171.44.200]) by mx.google.com with ESMTPS id f10sm1302209fac.14.2011.10.05.01.16.53 (version=SSLv3 cipher=OTHER); Wed, 05 Oct 2011 01:16:54 -0700 (PDT) From: "Dominik Psenner" To: "'Matt Joiner'" , References: In-Reply-To: Subject: RE: Transaction author without requiring password Date: Wed, 5 Oct 2011 10:16:51 +0200 Message-ID: <76F0814CA9F24EF3BA3405F25198EA89@alpin.local> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 X-MimeOLE: Produced By Microsoft MimeOLE V6.1.7601.17609 Thread-Index: AcyDLDeCSM/sU/JkRnerwbs0a0VXSwACYE8g >I'm trying to force commits to have an attached author, but I don't >care for requiring passwords. In other words, commits should contain >an author field but there's no enforcing that the committer is who >they claim to be. > >I've tried filtering for an author in the pre-commit hook, but the >user name given in the commit is not passed unless anon-access doesn't >given write privileges, and auth-access is enabled. Furthermore, >without a corresponding author name in the passwd file, I don't think >svnserve makes it to the pre-commit stage at all. > >Are there any recommended solutions for ensuring that commits have an >attached author, or similar field? Maybe something like this put in place as a pre-commit hook? #!/bin/bash SVNLOOK=/usr/bin/svnlook REPOPATH=$1 TRANSACTION=$2 # get user USER=`$SVNLOOK author $REPOPATH -t $TRANSACTION` # check if the user is empty if[ -z "$USER" ]; then exit 1 exit 0