diff options
| author | fukachan <fukachan> | 2003-11-30 09:59:17 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2003-11-30 09:59:17 +0000 |
| commit | ba63f5f3b7154c090f72b898ecf48255ff48b874 (patch) | |
| tree | 5bc92ce58582d5f98911bd15a9adb7f002fe005d /fml | |
| parent | 4934a4bd50caf85890f30cfcc08734bc159f600f (diff) | |
| download | fml8-ba63f5f3b7154c090f72b898ecf48255ff48b874.tar.gz fml8-ba63f5f3b7154c090f72b898ecf48255ff48b874.tar.bz2 fml8-ba63f5f3b7154c090f72b898ecf48255ff48b874.zip | |
system_accounts -> system_special_accounts.
XXX xxx_restrictions supports "reject_system_accounts" for backward
XXX compatiblity.
Diffstat (limited to 'fml')
| -rw-r--r-- | fml/etc/src/config.cf.en/acl.cf | 14 | ||||
| -rw-r--r-- | fml/etc/src/config.cf.ja/acl.cf | 14 | ||||
| -rw-r--r-- | fml/lib/FML/Command/Auth.pm | 8 | ||||
| -rw-r--r-- | fml/lib/FML/Credential.pm | 10 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Command.pm | 8 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Distribute.pm | 6 | ||||
| -rw-r--r-- | fml/lib/FML/Restriction/Post.pm | 18 | ||||
| -rw-r--r-- | fml/share/message/euc-jp/error/system_special_accounts | 3 | ||||
| -rw-r--r-- | fml/share/message/us-ascii/error/system_special_accounts | 3 |
9 files changed, 51 insertions, 33 deletions
diff --git a/fml/etc/src/config.cf.en/acl.cf b/fml/etc/src/config.cf.en/acl.cf index 2d246570..b52ea882 100644 --- a/fml/etc/src/config.cf.en/acl.cf +++ b/fml/etc/src/config.cf.en/acl.cf @@ -23,11 +23,11 @@ address_compare_function_type = user_part_case_insensitive # Value: list of attributes ( # permit_anyone # permit_member_maps -# reject_system_accounts +# reject_system_special_accounts # reject # ) # Examples: -post_restrictions = reject_system_accounts +post_restrictions = reject_system_special_accounts permit_member_maps reject @@ -37,11 +37,11 @@ post_restrictions = reject_system_accounts # permit_anyone # permit_commands_for_stranger # permit_member_maps -# reject_system_accounts +# reject_system_special_accounts # reject # ) # Examples: -command_restrictions = reject_system_accounts +command_restrictions = reject_system_special_accounts permit_commands_for_stranger permit_member_maps reject @@ -53,7 +53,7 @@ command_restrictions = reject_system_accounts # permit_anyone # permit_admin_member_maps # check_admin_member_password -# reject_system_accounts +# reject_system_special_accounts # reject # ) # Examples: @@ -62,7 +62,7 @@ command_restrictions = reject_system_accounts # 2. password auth (members-admin + password) # check_admin_member_password reject # -admin_command_restrictions = reject_system_accounts +admin_command_restrictions = reject_system_special_accounts check_admin_member_password reject @@ -235,7 +235,7 @@ moderator_recipient_maps = $primary_moderator_recipient_map # History: fml 4.0's $REJECT_ADDR # Value: a list of strings # Examples: see below -system_accounts = root +system_special_accounts = root postmaster MAILER-DAEMON msgs diff --git a/fml/etc/src/config.cf.ja/acl.cf b/fml/etc/src/config.cf.ja/acl.cf index 7a0c19c8..751809ea 100644 --- a/fml/etc/src/config.cf.ja/acl.cf +++ b/fml/etc/src/config.cf.ja/acl.cf @@ -27,11 +27,11 @@ address_compare_function_type = user_part_case_insensitive # Value: list of attributes ( # permit_anyone # permit_member_maps -# reject_system_accounts +# reject_system_special_accounts # reject # ) # Examples: -post_restrictions = reject_system_accounts +post_restrictions = reject_system_special_accounts permit_member_maps reject @@ -41,11 +41,11 @@ post_restrictions = reject_system_accounts # permit_anyone # permit_commands_for_stranger # permit_member_maps -# reject_system_accounts +# reject_system_special_accounts # reject # ) # Examples: -command_restrictions = reject_system_accounts +command_restrictions = reject_system_special_accounts permit_commands_for_stranger permit_member_maps reject @@ -57,7 +57,7 @@ command_restrictions = reject_system_accounts # permit_anyone # permit_admin_member_maps # check_admin_member_password -# reject_system_accounts +# reject_system_special_accounts # reject # ) # Examples: @@ -66,7 +66,7 @@ command_restrictions = reject_system_accounts # 2. パスワード認証 (members-admin &&パスワード認証) # check_admin_member_password reject # -admin_command_restrictions = reject_system_accounts +admin_command_restrictions = reject_system_special_accounts check_admin_member_password reject @@ -238,7 +238,7 @@ moderator_recipient_maps = $primary_moderator_recipient_map # History: fml 4.0 の $REJECT_ADDR # Value: a list of strings # Examples: see below -system_accounts = root +system_special_accounts = root postmaster MAILER-DAEMON msgs diff --git a/fml/lib/FML/Command/Auth.pm b/fml/lib/FML/Command/Auth.pm index 125611f8..bb320381 100644 --- a/fml/lib/FML/Command/Auth.pm +++ b/fml/lib/FML/Command/Auth.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Auth.pm,v 1.27 2003/08/23 07:24:41 fukachan Exp $ +# $FML: Auth.pm,v 1.28 2003/08/29 15:33:57 fukachan Exp $ # package FML::Command::Auth; @@ -98,15 +98,15 @@ sub permit_admin_member_maps # Arguments: OBJ($self) OBJ($curproc) HASH_REF($args) HASH_REF($optargs) # Side Effects: none # Return Value: NUM or STR (__LAST__, a special upcall) -sub reject_system_accounts +sub reject_system_special_accounts { my ($self, $curproc, $args, $optargs) = @_; my $cred = $curproc->{ credential }; my $sender = $cred->sender(); - my $match = $cred->match_system_accounts($sender); + my $match = $cred->match_system_special_accounts($sender); if ($match) { - $curproc->log("reject_system_accounts: matches the sender"); + $curproc->log("reject_system_special_accounts: matches the sender"); return '__LAST__'; } diff --git a/fml/lib/FML/Credential.pm b/fml/lib/FML/Credential.pm index 9a902462..055be3ff 100644 --- a/fml/lib/FML/Credential.pm +++ b/fml/lib/FML/Credential.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Credential.pm,v 1.50 2003/11/26 04:47:08 fukachan Exp $ +# $FML: Credential.pm,v 1.51 2003/11/26 09:14:04 fukachan Exp $ # package FML::Credential; @@ -455,12 +455,12 @@ sub _get_address } -=head2 match_system_accounts($addr) +=head2 match_system_special_accounts($addr) C<addr> matches a system account or not. The system accounts are given as - $curproc->config()->{ system_accounts }. + $curproc->config()->{ system_special_accounts }. =cut @@ -470,7 +470,7 @@ The system accounts are given as # Arguments: OBJ($self) STR($addr) # Side Effects: none # Return Value: STR -sub match_system_accounts +sub match_system_special_accounts { my ($self, $addr) = @_; my $curproc = $self->{ _curproc }; @@ -481,7 +481,7 @@ sub match_system_accounts # compare $user part with e.g. root, postmaster, ... # XXX always case INSENSITIVE - my $accounts = $config->get_as_array_ref('system_accounts'); + my $accounts = $config->get_as_array_ref('system_special_accounts'); for my $addr (@$accounts) { if ($user =~ /^${addr}$/i) { return $addr;} } diff --git a/fml/lib/FML/Process/Command.pm b/fml/lib/FML/Process/Command.pm index 55633cd7..84da87e5 100644 --- a/fml/lib/FML/Process/Command.pm +++ b/fml/lib/FML/Process/Command.pm @@ -3,7 +3,7 @@ # Copyright (C) 2000,2001,2002,2003 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Command.pm,v 1.90 2003/10/17 14:00:51 fukachan Exp $ +# $FML: Command.pm,v 1.91 2003/11/29 10:24:27 fukachan Exp $ # package FML::Process::Command; @@ -201,13 +201,13 @@ sub run # XXX reject command use irrespective of requests from admins/users. # XXX rejection of admin use occurs in _evaluate_command_lines() # XXX not here. - # XXX possible cases are from "system_accounts" or from a not member. + # XXX possible cases are from "system_special_accounts" or from a not member. else { # check the error reason by permit_command(). my $reason = $pcb->get("check_restrictions", "deny_reason"); - if (defined($reason) && ($reason eq 'reject_system_accounts')) { + if (defined($reason) && ($reason eq 'reject_system_special_accounts')) { my $s = "deny request from system accounts"; - $curproc->reply_message_nl("error.system_accounts", $s); + $curproc->reply_message_nl("error.system_special_accounts", $s); } else { $curproc->reply_message_nl("error.not_member", diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm index 3a1d7295..47fc84ae 100644 --- a/fml/lib/FML/Process/Distribute.pm +++ b/fml/lib/FML/Process/Distribute.pm @@ -3,7 +3,7 @@ # Copyright (C) 2000,2001,2002,2003 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Distribute.pm,v 1.128 2003/10/15 01:03:33 fukachan Exp $ +# $FML: Distribute.pm,v 1.129 2003/11/29 10:24:28 fukachan Exp $ # package FML::Process::Distribute; @@ -221,9 +221,9 @@ sub run $curproc->log("deny article submission"); my $rule = $pcb->get("check_restrictions", "deny_reason"); - if ($rule eq 'reject_system_accounts') { + if ($rule eq 'reject_system_special_accounts') { my $r = "deny request from a system account"; - $curproc->reply_message_nl("error.system_accounts", + $curproc->reply_message_nl("error.system_special_accounts", $r, $msg_args); } elsif ($rule eq 'permit_member_maps') { diff --git a/fml/lib/FML/Restriction/Post.pm b/fml/lib/FML/Restriction/Post.pm index 1e9ef211..ee92e419 100644 --- a/fml/lib/FML/Restriction/Post.pm +++ b/fml/lib/FML/Restriction/Post.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Post.pm,v 1.6 2003/08/23 14:38:01 fukachan Exp $ +# $FML: Post.pm,v 1.7 2003/08/29 15:34:10 fukachan Exp $ # package FML::Restriction::Post; @@ -46,12 +46,12 @@ sub new # Arguments: OBJ($self) STR($rule) STR($sender) # Side Effects: none # Return Value: ARRAY(STR, STR) -sub reject_system_accounts +sub reject_system_special_accounts { my ($self, $rule, $sender) = @_; my $curproc = $self->{ _curproc }; my $cred = $curproc->{ credential }; - my $match = $cred->match_system_accounts($sender); + my $match = $cred->match_system_special_accounts($sender); my $pcb = $curproc->pcb(); if ($match) { @@ -66,6 +66,18 @@ sub reject_system_accounts } +# Descriptions: [BACKWARD COMPATIBILITY] +# reject if $sender matches a system account. +# Arguments: OBJ($self) STR($rule) STR($sender) +# Side Effects: none +# Return Value: ARRAY(STR, STR) +sub reject_system_accounts +{ + my ($self, $rule, $sender) = @_; + $self->reject_system_special_accounts($rule, $sender); +} + + # Descriptions: permit irrespective of $sender :) # Arguments: OBJ($self) STR($rule) STR($sender) # Side Effects: none diff --git a/fml/share/message/euc-jp/error/system_special_accounts b/fml/share/message/euc-jp/error/system_special_accounts new file mode 100644 index 00000000..5b68c495 --- /dev/null +++ b/fml/share/message/euc-jp/error/system_special_accounts @@ -0,0 +1,3 @@ +システムアカウントさんからのメールは個人が特定できないため +お断りしています。 + diff --git a/fml/share/message/us-ascii/error/system_special_accounts b/fml/share/message/us-ascii/error/system_special_accounts new file mode 100644 index 00000000..5b3ba2f9 --- /dev/null +++ b/fml/share/message/us-ascii/error/system_special_accounts @@ -0,0 +1,3 @@ +reject your mail. We cannot identify who you are since you are an +system account. + |
