Accéder au contenu.
Menu Sympa

fr - patch privateorpublickey

Objet : Pour les administrateurs de serveurs de listes utilisant le logiciel Sympa

Archives de la liste

Chronologique Discussions  
  • From: Olivier Salaun - CRU <adresse@cachée>
  • To: adresse@cachée
  • Subject: patch privateorpublickey
  • Date: Thu, 29 Oct 1998 11:56:02 +0100

Rappel: l'option privateorpublickey du paramètre send autorise les abonnés
d'une liste à y poster des message ainsi que les non-abonnés, moyennant une
procédure d'authentification (par retour de courrier).

Description du problème : Demande d'authentification aux abonnés lorsque
le message proposé comporte un champ X-Sender ou Approved différent du
From.

Les modifications concernent les modules List.pm et sympa.pl.


--------------------------------------------------------------------------
Olivier SALAÜN Comité Réseau des Universités Tel: 02 99 84 71 27
Campus de Beaulieu 35042 Rennes Cedex

*** List.pm.orig Wed Oct 28 16:20:58 1998
--- List.pm Wed Oct 28 16:21:20 1998
***************
*** 798,806 ****
return undef;
}
if ($action =~ /^send$/io) {
! if ($admin->{'send'} =~ /^(private|privatekey)$/io) {
return undef unless ($self->is_user($who) || $self->am_i('owner',
$who));
! } elsif ($admin->{'send'} =~ /^(editor|editorkey)$/io) {
return undef unless ($self->am_i('editor', $who));
}elsif ($admin->{'send'} =~ /^(editorkeyonly)$/io) {
return undef;
--- 798,806 ----
return undef;
}
if ($action =~ /^send$/io) {
! if ($admin->{'send'} =~
/^(private|privatekey|privateorpublickey)$/io) {
return undef unless ($self->is_user($who) || $self->am_i('owner',
$who));
! }elsif ($admin->{'send'} =~ /^(editor|editorkey)$/io) {
return undef unless ($self->am_i('editor', $who));
}elsif ($admin->{'send'} =~ /^(editorkeyonly)$/io) {
return undef;
***************
*** 819,825 ****
if ($action =~ /^auth$/io) {
if ($admin->{'send'} =~ /^(privatekey)$/io) {
return 1 if ($self->is_user($who) || $self->am_i('owner', $who));
! } elsif ($admin->{'send'} =~ /^(privateorpublickey)$/io) {
return 1 unless ($self->is_user($who) || $self->am_i('owner',
$who));
}elsif ($admin->{'send'} =~ /^(publickey)$/io) {
return 1;
--- 819,825 ----
if ($action =~ /^auth$/io) {
if ($admin->{'send'} =~ /^(privatekey)$/io) {
return 1 if ($self->is_user($who) || $self->am_i('owner', $who));
! }elsif ($admin->{'send'} =~ /^(privateorpublickey)$/io) {
return 1 unless ($self->is_user($who) || $self->am_i('owner',
$who));
}elsif ($admin->{'send'} =~ /^(publickey)$/io) {
return 1;
*** sympa.pl.orig Wed Oct 28 16:21:09 1998
--- sympa.pl Wed Oct 28 16:21:16 1998
***************
*** 173,185 ****
rename("$qdir/$i", "$qdir/BAD-$i");
do_log('notice', Msg(4, 3, "Renaming bad file %s to BAD-%s"), $i,
$i);
}
- # MODIF OS en cas de SIGTERM et pour relire la queue (priorités)
last;
- # Fin MODIF
}
! # MODIF du temps d'attente
! sleep($Conf{'sleep'});
! # Fin MODIF
&smtp::reaper;
}
do_log('notice', Msg(3, 6, 'Sympa exited normally due to signal'));
--- 173,181 ----
rename("$qdir/$i", "$qdir/BAD-$i");
do_log('notice', Msg(4, 3, "Renaming bad file %s to BAD-%s"), $i,
$i);
}
last;
}
! sleep($Conf{'sleep'});
&smtp::reaper;
}
do_log('notice', Msg(3, 6, 'Sympa exited normally due to signal'));
***************
*** 283,302 ****
return 0;
}

-
- ## Authentification of the sender
- if ( $list->may_do('auth', $sender)||
- ($hdr->get('Approved') && $list->may_do('auth',
$hdr->get('Approved'))) ||
- ($hdr->get('X-Sender') && $list->may_do('auth',
$hdr->get('X-Sender')))){
- $list->send_auth($sender,$msg);
- do_log('notice',Msg(4, 32, 'Message for %s from %s kept for
authentification'), $listname, $sender);
- return 1;
- }
-
## Check if the sender may send the message to the list.
unless ($list->may_do('send', $sender) ||
($hdr->get('Approved') && $list->may_do('send',
$hdr->get('Approved'))) ||
($hdr->get('X-Sender') && $list->may_do('send',
$hdr->get('X-Sender')))) {

## Either send the message to the moderators or reject it.
if ($list->is_moderated()) {
--- 279,297 ----
return 0;
}

## Check if the sender may send the message to the list.
unless ($list->may_do('send', $sender) ||
($hdr->get('Approved') && $list->may_do('send',
$hdr->get('Approved'))) ||
($hdr->get('X-Sender') && $list->may_do('send',
$hdr->get('X-Sender')))) {
+
+ ## Authentification of the sender
+ if ( $list->may_do('auth', $sender)||
+ ($hdr->get('Approved') && $list->may_do('auth',
$hdr->get('Approved'))) ||
+ ($hdr->get('X-Sender') && $list->may_do('auth',
$hdr->get('X-Sender')))){
+ $list->send_auth($sender,$msg);
+ do_log('notice',Msg(4, 32, 'Message for %s from %s kept for
authentification'), $listname, $sender);
+ return 1;
+ }

## Either send the message to the moderators or reject it.
if ($list->is_moderated()) {


  • patch privateorpublickey, Olivier Salaun - CRU, 29/10/1998

Archives gérées par MHonArc 2.6.19+.

Haut de le page