summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-11-30 09:59:17 +0000
committerfukachan <fukachan>2003-11-30 09:59:17 +0000
commitba63f5f3b7154c090f72b898ecf48255ff48b874 (patch)
tree5bc92ce58582d5f98911bd15a9adb7f002fe005d /fml/lib
parent4934a4bd50caf85890f30cfcc08734bc159f600f (diff)
downloadfml8-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/lib')
-rw-r--r--fml/lib/FML/Command/Auth.pm8
-rw-r--r--fml/lib/FML/Credential.pm10
-rw-r--r--fml/lib/FML/Process/Command.pm8
-rw-r--r--fml/lib/FML/Process/Distribute.pm6
-rw-r--r--fml/lib/FML/Restriction/Post.pm18
5 files changed, 31 insertions, 19 deletions
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