[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Secret votes HOWTO



I like this proposal.

In <[🔎] 20010331130847.A14111@lml.bas.bg>,
 on "Sat, 31 Mar 2001 13:08:47 +0300",
 with "Secret votes HOWTO",
  Anton Zinoviev <anton@lml.bas.bg> wrote:

> 	Can we accept the following procedure for the future balots?
> Every voted Debian developer receives a message like this:
> 
> > Your ballot has been received and tallied.
> >
> > Name: Anton Zinoviev
> > Email: zinoviev@debian.org
> > Id: zinoviev
> > Ballot: 231
> > VoteNumber: 159  <-- this is new information.
> 
> Then the final result is announced in this way:
(snip)
> Here's how people voted:
> 
>   Choice #1: Branden Robinson
> /  Choice #2: Anand Kumria
> |/  Choice #3: Ben Collins
> ||/  Choice #4: Bdale Garbee
> |||/  Choice #5: None Of The Above
> ||||/    VoteNumber
> |||||  /
> 23-14 153
(snip)
> The following developers voted:
(snip)
> In this way every developer can check that his/her vote is correct and
> the list of the voted developers makes clean that there were no
> `phantome' votes.

How about this modification on debvote ?

--- DBase.pm.orig	Sat Mar 31 22:58:09 2001
+++ DBase.pm	Sat Mar 31 23:06:39 2001
@@ -36,7 +36,7 @@
 
 sub ReadDB
 {	my $file = $_[0];
-	my $name; my $addr; my $id; my $vote;
+	my $name; my $addr; my $id; my $vote; my $tag;
 	my %dbHash;
 
 	print "V: Reading Database: $file\n" if $Globals{ 'verbose' };
@@ -52,10 +52,13 @@
 		$addr = $1;
 		next unless <FILE> =~ /^V: (.*)$/;
 		$vote = $1;
+		next unless <FILE> =~ /^T: (.*)$/;
+		$tag = $1;
 		$dbHash{ "$id" } = $rec;
 		$rec->{ "name" } = $name;
 		$rec->{ "addr" } = $addr;
 		$rec->{ "vote" } = $vote;
+		$rec->{ "tag" } = $tag;
 	}
 	close FILE;
 	return %dbHash;
@@ -76,6 +79,7 @@
 		print FILE "N: $rec->{ name }\n";
 		print FILE "A: $rec->{ addr }\n";
 		print FILE "V: $rec->{ vote }\n";
+		print FILE "T: $rec->{ tag }\n";
 	}
 	close FILE;
 }
--- Validate.pm.orig	Sat Mar 31 22:58:04 2001
+++ Validate.pm	Sat Mar 31 23:07:16 2001
@@ -58,7 +58,7 @@
     $voter{ 'name' } = ($replyto[0])->name();
     $voter{ 'email' } = ($replyto[0])->address();
     $voter{ 'id' } = $ENV{ 'PGP_KEYID' };
-    #$voter{ 'id' } = time() . ":" . rand();
+    $voter{ 'tag' } = (time() + rand());
 }
 
 END { }       # module clean-up code here (global destructor)
--- debvote-take.orig	Sat Mar 31 22:47:23 2001
+++ debvote-take	Sat Mar 31 23:07:52 2001
@@ -135,6 +135,7 @@
 $response .= "Email: $voter{ 'email' }\n";
 $response .= "Id: $voter{ 'id' }\n";
 $response .= "Ballot: $vote\n";
+$response .= "Tag: $voter{ 'tag' }\n";
 
 $rtags{ 'BODY' } = $response;
 &ProcessTags( \@response_letter, \%rtags, "RTAG" );



I don't think about this deeply, and have not tested yet,
so there might be some faults.  But this is intended to add a new 
field "TAG" (recoreded "T:") in Database using the combination of
time() and rand(), and use it in place of "VoteNumber" described
in the proposal above.

Regards.
-- 
  Taketoshi Sano: <sano@debian.org>,<sano@debian.or.jp>,<kgh12351@nifty.ne.jp>



Reply to: