Great Circle Associates Majordomo-Workers
(November 1997)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Single archive and -l option bug
From: Dave Wolfe <dwolfe @ risc . sps . mot . com>
Date: Tue, 4 Nov 1997 10:31:42 -0600 (CST)
To: majordomo-workers @ greatcircle . com (Majordomo developer's mailing list)
Cc: majordomo-patches @ cloud . ccsf . cc . ca . us (Majordomo patches), cwilson @ slurp . neu . sgi . com (Chan Wilson)
Reply-to: Dave Wolfe <david_wolfe @ risc . sps . mot . com>

I set up all lists here with a listname-request alias to simplify things
for users since we have multiple Mj servers. Some list owners, despite
my urging to the contrary, choose to archive list traffic in a single
file, which, by convention, matches the list name. This combination
results in requests to listname-request of the form:

    get listname

Unfortunately, the code in do_get() grabs "listname" and determines that
it's a valid list name, and attempts to grab a third token for the file
name (bug #1):

    local($list) = shift;
    local($clean_list);
    if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list)))
	&& defined($deflist)) {

The expression that should squawk about there not being a file name
present doesn't detect that fact due to the local declaration (bug #2):

    (local($filename) = shift) ||       &squawk("get: which file?");

and silently proceeds to pass a directory to lopen() because
valid_filename() only checks that the pathname exists (bug #3) and the
*directory* does exist.

Bug #2 exists in several places but is easy enough to fix. In the
process I discovered some inconsistency in the use of $sm in squawk()
messages and even some messages that referenced the wrong command (bug
#4).

Bug #1 is a bit of a sticky wicket. I chose to adopt the policy that
if the -l option is specified (a default list) then a list name must
*not* be specified in the request, reasoning that requests sent to a
specific list-request alias shouldn't be specifying other lists anyway,
non-list-specific requests not withstanding. Note that this policy
changes mkdigest syntax which previously always required the listname to
be specified in the request, even when -l was specified. The downside is
that it enforces the difference in request syntax between requests sent
to the general majordomo alias and the list-request alias. Does anyone
object vehemently to that dichotomy? While it's possible to examine the
number of operands and decide if the listname might be present, that's
not reliable when there can be a variable number of operands, e.g.:

    subscribe user@host.domain.com (Joe User)
    subscribe alist user@host.domain.com

Anyway, here are my patches. If the fix for #1 causes too much of a
change in the request semantics for you, let's hear your counter-
proposal:

--- majordomo.orig	Wed Aug 27 09:55:29 1997
+++ majordomo	Tue Nov  4 10:19:53 1997
@@ -237,14 +237,9 @@
     # figure out what list we are trying to subscribe to
     # and check to see if the list is valid
     local($sm) = "subscribe";
-    local($list) = shift;
-    local($clean_list);
-    if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list)))
-	&& defined($deflist)) {
-        unshift(@_,$list) ; 			# Not a list name, put it back.
-	$list=$deflist || &squawk("$sm: which list?");# set the list to deflist
-        $clean_list = &valid_list($listdir, $list);
-    }
+    local($list) = defined($deflist) ? $deflist : shift;
+    &squawk("$sm: which list?") unless $list;
+    local($clean_list) = &valid_list($listdir, $list);
 
     # figure out who's trying to subscribe, and check that it's a valid address
     local($subscriber) = join(" ", @_);
@@ -252,7 +247,7 @@
 	$subscriber = $reply_to;
     }
     if (! &valid_addr($subscriber, $clean_list)) {
-	&squawk("subscribe: invalid address '$subscriber'");
+	&squawk("$sm: invalid address '$subscriber'");
 	return 0;
     }
 
@@ -333,7 +328,7 @@
 	    &check_and_request("subscribe", $clean_list, $subscriber);
 	}
     } else {
-	&squawk("subscribe: unknown list '$list'.");
+	&squawk("$sm: unknown list '$list'.");
     }
 }
 
@@ -364,20 +359,15 @@
     # figure out what list we are trying to unsubscribe from
     # and check to see if the list is valid
     local($sm) = "unsubscribe";
-    local($list) = shift;
-    local($clean_list);
+    local($list) = defined($deflist) ? $deflist : shift;
 
     if ($list =~ /^\*$/) {
     	&do_unsubscribe_all(@_);
     	return 0;
     }
 
-    if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list)))
-	&& defined($deflist)) {
-        unshift(@_,$list) ; 				# Not a list name, put it back.
-	$list=$deflist || &squawk("$sm: which list?");	# set the list to deflist
-        $clean_list = &valid_list($listdir, $list);
-    }
+    &squawk("$sm: which list?") unless $list;
+    local($clean_list) = &valid_list($listdir, $list);
 
     # figure out who's trying to unsubscribe, and check it's a valid address
     local($subscriber) = join(" ", @_);
@@ -385,7 +375,7 @@
 	$subscriber = $reply_to;
     }
     if (! &valid_addr($subscriber)) {
-	&squawk("unsubscribe: invalid address '$subscriber'");
+	&squawk("$sm: invalid address '$subscriber'");
 	return 0;
     }
 
@@ -443,7 +433,7 @@
 		    $match_count++;
 		    $match_length = length;
 		    if ($match_count != 1) {
-			&squawk("unsubscribe: '$subscriber' matches multiple list members.");
+			&squawk("$sm: '$subscriber' matches multiple list members.");
 			last;
 		    }
 		}
@@ -491,7 +481,7 @@
 	    &check_and_request("unsubscribe", $clean_list, $subscriber);
 	}
     } else {
-	&squawk("unsubscribe: unknown list '$list'.");
+	&squawk("$sm: unknown list '$list'.");
     }
 }
 
@@ -512,21 +502,16 @@
 
 sub do_approve {
     # Check to see we've got all the arguments
-    (local($passwd) = shift)	|| &squawk("approve: needs passwd");
-    (local($cmd) = shift)	|| &squawk("approve: which command?");
-    $cmd =~ tr/A-Z/a-z/;	# downcase the command
-    # Check to see if the list is valid or use default list.
-    # and check to see if we've got a valid list
     local($sm) = "approve";
-    local($list) = shift;
-    local($clean_list);
-    if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list)))
-	&& defined($deflist)) {
-        unshift(@_,$list) ; 				# Not a list name, put it back.
-	$list=$deflist || &squawk("$sm: which list?");	# set the list to deflist
-        $clean_list = &valid_list($listdir, $list);
-    }
-
+    local($passwd, $cmd);
+    ($passwd = shift)	|| &squawk("$sm: needs passwd");
+    ($cmd    = shift)	|| &squawk("$sm: which command?");
+    $cmd =~ tr/A-Z/a-z/;	# downcase the command
+    # Use default list if specified and check to see if we've got a
+    # valid list
+    local($list) = defined($deflist) ? $deflist : shift;
+    &squawk("$sm: which list?") unless $list;
+    local($clean_list) = &valid_list($listdir, $list);
 
     if ($clean_list ne "") {
 	# get the config info for the command
@@ -538,11 +523,13 @@
 	    # The password is valid, so set "approved" and do the request
 	    $approved = 1;
 	    if ($cmd eq "subscribe") {
-		(local($subscriber) = join(" ",@_))	|| &squawk("approve: who?");
+		local($subscriber);
+		($subscriber = join(" ",@_))	|| &squawk("$sm: who?");
 		&log("approve PASSWORD subscribe $clean_list $subscriber");
 		&do_subscribe($clean_list, $subscriber);
 	    } elsif ($cmd eq "unsubscribe") {
-		(local($subscriber) = join(" ",@_))	|| &squawk("approve: who?");
+		local($subscriber);
+		($subscriber = join(" ",@_))	|| &squawk("$sm: who?");
 		&log("approve PASSWORD unsubscribe $clean_list $subscriber");
 		&do_unsubscribe($clean_list, $subscriber);
 	    } elsif ($cmd eq "get" 
@@ -556,13 +543,13 @@
 		&$sub($clean_list, @_);
 	    } else {
 		# you can only approve the above
-		&squawk("approve: invalid command '$cmd'");
+		&squawk("$sm: invalid command '$cmd'");
 	    }
 	} else {
-	    &squawk("approve: invalid list or password.");
+	    &squawk("$sm: invalid list or password.");
 	}
     } else {
-	&squawk("approve: unknown list '$list'.");
+	&squawk("$sm: unknown list '$list'.");
     }
 }
 	
@@ -570,20 +557,15 @@
     # check to see that we've got all the arguments
     # and check to see if we've got a valid list
     local($sm) = "passwd";
-    local($list) = shift;
-    local($clean_list);
-    if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list)))
-	&& defined($deflist)) {
-        unshift(@_,$list) ; 				# Not a list name, put it back.
-	$list=$deflist || &squawk("$sm: which list?");	# set the list to deflist
-        $clean_list = &valid_list($listdir, $list);
-    }
-
+    local($list) = defined($deflist) ? $deflist : shift;
+    &squawk("$sm: which list?") unless $list;
+    local($clean_list) = &valid_list($listdir, $list);
 
-    (local($passwd) = shift)	|| &squawk("passwd: need old password");
-    (local($new_passwd) = shift)|| &squawk("passwd: need new password");
+    local($passwd, $new_passwd);
+    ($passwd     = shift)	|| &squawk("$sm: need old password");
+    ($new_passwd = shift)	|| &squawk("$sm: need new password");
     if ($clean_list eq "") {
-	&squawk("passwd: invalid list '$list'");
+	&squawk("$sm: invalid list '$list'");
 	return;
     }
     # We've got a valid list; now see if the old password is valid
@@ -594,7 +576,7 @@
     if (&valid_passwd($listdir, $clean_list, $passwd)) {
 	# The old password is correct, so make sure the new one isn't null
 	if ($new_passwd eq "") {
-	    &squawk("passwd: null 'new_passwd'.");
+	    &squawk("$sm: null 'new_passwd'.");
 	    return;
 	}
 	# The new password is valid, too, so write it.
@@ -677,16 +659,10 @@
     # Make sure we've got the right arguments
     # and check to see if we've got a valid list
     local($sm) = "who";
-    local($list) = shift;
-    local($clean_list);
-    local($counter) = 0;	                        # count the whos in whoville.
-    if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list)))
-	&& defined($deflist)) {
-        unshift(@_,$list) ; 				# Not a list name, put it back.
-	$list=$deflist || &squawk("$sm: which list?");	# set the list to deflist
-        $clean_list = &valid_list($listdir, $list);
-    }
-
+    local($list) = defined($deflist) ? $deflist : shift;
+    &squawk("$sm: which list?") unless $list;
+    local($clean_list) = &valid_list($listdir, $list);
+    local($counter) = 0;
 
     # Check to see that the list is valid
     if ($clean_list ne "") {
@@ -732,15 +708,9 @@
     # Make sure we've got the arguments we need
     # and Check that the list is OK
     local($sm) = "info";
-    local($list) = shift;
-    local($clean_list);
-    if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list)))
-	&& defined($deflist)) {
-        unshift(@_,$list) ; 				# Not a list name, put it back.
-	$list=$deflist || &squawk("$sm: which list?");	# set the list to deflist
-        $clean_list = &valid_list($listdir, $list);
-    }
-
+    local($list) = defined($deflist) ? $deflist : shift;
+    &squawk("$sm: which list?") unless $list;
+    local($clean_list) = &valid_list($listdir, $list);
 
     if ($clean_list ne "") {
 	# The list is OK, so give the info, or a message that none is available
@@ -769,7 +739,7 @@
 	    print REPLY "#### No info available for $clean_list.\n";
 	}
     } else {
-	&squawk("info: unknown list '$list'.");
+	&squawk("$sm: unknown list '$list'.");
     }
     &log("info $clean_list");
 }
@@ -778,17 +748,12 @@
     # Check to make sure we've got the right arguments
     # and Check that the list is valid
     local($sm) = "newinfo";
-    local($list) = shift;
-    local($clean_list);
-    if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list))) 
-	&& defined($deflist)) {
-        unshift(@_,$list) ;			# Not a list name, put it back.
-	$list=$deflist || &squawk("$sm: which list?"); 	# set the list to deflist
-        $clean_list = &valid_list($listdir, $list);
-    }
-
+    local($list) = defined($deflist) ? $deflist : shift;
+    &squawk("$sm: which list?") unless $list;
+    local($clean_list) = &valid_list($listdir, $list);
 
-    (local($passwd) = shift)	|| &squawk("newinfo: needs password");
+    local($passwd);
+    ($passwd = shift)	|| &squawk("$sm: needs password");
     if ($clean_list ne "") {
 	&get_config($listdir, $clean_list) if !&cf_ck_bool($clean_list, '', 1);
 	# The list is valid, so check the password
@@ -818,7 +783,7 @@
 		&abort("Can't write $listdir/$clean_list.info: $!");
 	    }
 	} else { 
-	    &squawk("newinfo: invalid password.");
+	    &squawk("$sm: invalid password.");
 	    &log("FAILED newinfo $clean_list PASSWORD");
 	    while (<>) {
 		$_ = &chop_nl($_);
@@ -828,7 +793,7 @@
 	    }
 	}
     } else {
-	&squawk("newinfo: unknown list '$list'.");
+	&squawk("$sm: unknown list '$list'.");
         while (<>) {
 	    $_ = &chop_nl($_);
 	    if ($_ eq "EOF") {
@@ -842,14 +807,10 @@
     # Make sure we've got the arguments we need
     # and Check that the list is OK
     local($sm) = "intro";
-    local($list) = shift;
-    local($clean_list);
-    if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list)))
-	&& defined($deflist)) {
-        unshift(@_,$list) ; 				# Not a list name, put it back.
-	$list=$deflist || &squawk("$sm: which list?");	# set the list to deflist
-        $clean_list = &valid_list($listdir, $list);
-    }
+    local($list) = defined($deflist) ? $deflist : shift;
+    &squawk("$sm: which list?") unless $list;
+    local($clean_list) = &valid_list($listdir, $list);
+
     if ($clean_list ne "") {
 	# The list is OK, so give the intro, or a message that none is available
 	# get configuration info
@@ -876,7 +837,7 @@
 	    print REPLY "#### No intro available for $clean_list.\n";
 	}
     } else {
-	&squawk("intro: unknown list '$list'.");
+	&squawk("$sm: unknown list '$list'.");
     }
     &log("intro $clean_list");
 }
@@ -884,15 +845,12 @@
     # Check to make sure we've got the right arguments
     # and Check that the list is valid
     local($sm) = "newintro";
-    local($list) = shift;
-    local($clean_list);
-    if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list)))
-	&& defined($deflist)) {
-        unshift(@_,$list) ;			# Not a list name, put it back.
-	$list=$deflist || &squawk("$sm: which list?"); 	# set the list to deflist
-        $clean_list = &valid_list($listdir, $list);
-    }
-    (local($passwd) = shift)	|| &squawk("newintro: needs password");
+    local($list) = defined($deflist) ? $deflist : shift;
+    &squawk("$sm: which list?") unless $list;
+    local($clean_list) = &valid_list($listdir, $list);
+
+    local($passwd);
+    ($passwd = shift)	|| &squawk("$sm: needs password");
     if ($clean_list ne "") {
 	&get_config($listdir, $clean_list) if !&cf_ck_bool($clean_list, '', 1);
 	# The list is valid, so check the password
@@ -917,7 +875,7 @@
 		&abort("Can't write $listdir/$clean_list.intro: $!");
 	    }
 	} else {
-	    &squawk("newintro: invalid password.");
+	    &squawk("$sm: invalid password.");
 	    &log("FAILED newintro $clean_list PASSWORD");
 	    while (<>) {
 		$_ = &chop_nl($_);
@@ -927,7 +885,7 @@
 	    }
 	}
     } else {
-	&squawk("newintro: unknown list '$list'.");
+	&squawk("$sm: unknown list '$list'.");
         while (<>) {
 	    $_ = &chop_nl($_);
 	    if ($_ eq "EOF") {
@@ -940,16 +898,12 @@
     # Check to make sure we've got the right arguments
     # and Check that the list is valid
     local($sm) = "config";
-    local($list) = shift;
-    local($clean_list);
-    if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list)))
-	&& defined($deflist)) {
-        unshift(@_,$list) ; 				# Not a list name, put it back.
-	$list=$deflist || &squawk("$sm: which list?");	# set the list to deflist
-        $clean_list = &valid_list($listdir, $list);
-    }
+    local($list) = defined($deflist) ? $deflist : shift;
+    &squawk("$sm: which list?") unless $list;
+    local($clean_list) = &valid_list($listdir, $list);
 
-    (local($passwd) = shift)	|| &squawk("config: needs password");
+    local($passwd);
+    ($passwd = shift)	|| &squawk("$sm: needs password");
     if ($clean_list ne "") {
 	# The list is valid, parse the config file
 	&set_lock("$listdir/$clean_list.config.LOCK") ||
@@ -974,12 +928,12 @@
 	    print REPLY "#### No config available for $clean_list.\n";
 	    }
         } else {
-	    &squawk("config: invalid password.");
+	    &squawk("$sm: invalid password.");
 	    &log("FAILED config $clean_list PASSWORD");
         }
 	&free_lock("$listdir/$clean_list.config.LOCK");
     } else {
-	&squawk("config: unknown list '$list'.");
+	&squawk("$sm: unknown list '$list'.");
     }
     &log("config $clean_list");
 }
@@ -988,16 +942,12 @@
     # Check to make sure we've got the right arguments
     # and Check that the list is valid
     local($sm) = "newconfig";
-    local($list) = shift;
-    local($clean_list);
-    if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list)))
-	&& defined($deflist)) {
-        unshift(@_,$list) ; 				# Not a list name, put it back.
-	$list=$deflist || &squawk("$sm: which list?");	# set the list to deflist
-        $clean_list = &valid_list($listdir, $list);
-    }
+    local($list) = defined($deflist) ? $deflist : shift;
+    &squawk("$sm: which list?") unless $list;
+    local($clean_list) = &valid_list($listdir, $list);
 
-    (local($passwd) = shift)	|| &squawk("newconfig: needs password");
+    local($passwd);
+    ($passwd = shift)	|| &squawk("$sm: needs password");
     if ($clean_list ne "") {
 	# The list is valid, parse the config file
 	&set_lock("$listdir/$clean_list.config.LOCK") ||
@@ -1052,7 +1002,7 @@
 		&abort("Can't write $listdir/$clean_list.config: $!");
 	    }
 	} else {
-	    &squawk("newconfig: invalid password.");
+	    &squawk("$sm: invalid password.");
 	    &log("FAILED newconfig $clean_list PASSWORD");
 	    while (<>) {
 		$_ = &chop_nl($_);
@@ -1064,7 +1014,7 @@
 	&free_lock("$listdir/$clean_list.config.LOCK");
 
     } else {
-	&squawk("newconfig: unknown list '$list'.");
+	&squawk("$sm: unknown list '$list'.");
         while (<>) {
 	    $_ = &chop_nl($_);
 	    if ($_ eq "EOF") {
@@ -1078,16 +1028,12 @@
     # Check to make sure we've got the right arguments
     # and Check that the list is valid
     local($sm) = "writeconfig";
-    local($list) = shift;
-    local($clean_list);
-    if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list)))
-	&& defined($deflist)) {
-        unshift(@_,$list) ; 				# Not a list name, put it back.
-	$list=$deflist || &squawk("$sm: which list?");	# set the list to deflist
-        $clean_list = &valid_list($listdir, $list);
-    }
+    local($list) = defined($deflist) ? $deflist : shift;
+    &squawk("$sm: which list?") unless $list;
+    local($clean_list) = &valid_list($listdir, $list);
 
-    (local($passwd) = shift)	|| &squawk("writeconfig: needs password");
+    local($passwd);
+    ($passwd = shift)	|| &squawk("$sm: needs password");
     if ($clean_list ne "") {
 	# The list is valid, parse the config file
 	&set_lock("$listdir/$clean_list.config.LOCK") ||
@@ -1102,18 +1048,19 @@
 		print REPLY "wrote new config for list $clean_list.\n";
 		&log("writeconfig $clean_list PASSWORD");
 	} else {
-	    &squawk("writeconfig: invalid password.");
+	    &squawk("$sm: invalid password.");
 	    &log("FAILED writeconfig $clean_list PASSWORD");
 	}
 	&free_lock("$listdir/$clean_list.config.LOCK");
     } else {
-	&squawk("writeconfig: unknown list '$list'.");
+	&squawk("$sm: unknown list '$list'.");
     }
 }
 
 sub do_mkdigest { 
     # Check to make sure we've got the right arguments
-    (local($list) = shift)	|| &squawk("config: which list?");
+    local($list) = defined($deflist) ? $deflist : shift;
+    &squawk("$sm: which list?") unless $list;
 
     # We allow the specification of the outgoing alias for the digest so
     # that list owners can change it to be something secret, but we have to
@@ -1125,7 +1072,8 @@
     else {
       $list_outgoing = "$list-outgoing";
     }
-    (local($passwd) = shift)	|| &squawk("config: needs password");
+    local($passwd);
+    ($passwd = shift)	|| &squawk("$sm: needs password");
     local(@digest_errors) = ();
     # Check that the list is valid
     local($clean_list) = &valid_list($listdir, $list);
@@ -1157,11 +1105,11 @@
 	        }
             }
         } else {
-	    &squawk("mkdigest: invalid password.");
+	    &squawk("$sm: invalid password.");
 	    &log("FAILED mkdigest $clean_list PASSWORD");
         }
     } else {
-	&squawk("mkdigest: unknown list '$list'.");
+	&squawk("$sm: unknown list '$list'.");
     }
 }
 
@@ -1256,17 +1204,12 @@
     # Make sure we've got the arguments we need
     # and Check that the list is OK
     local($sm) = "get";
-    local($list) = shift;
-    local($clean_list);
-    if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list)))
-	&& defined($deflist)) {
-        unshift(@_,$list) ; 				# Not a list name, put it back.
-	$list=$deflist || &squawk("$sm: which list?");	# set the list to deflist
-        $clean_list = &valid_list($listdir, $list);
-    }
-
+    local($list) = defined($deflist) ? $deflist : shift;
+    &squawk("$sm: which list?") unless $list;
+    local($clean_list) = &valid_list($listdir, $list);
 
-    (local($filename) = shift) ||	&squawk("get: which file?");
+    local($filename);
+    ($filename = shift) ||	&squawk("$sm: which file?");
 
     if ($clean_list ne "") {
 	# The list is valid, so now check make sure that it's not a private
@@ -1325,10 +1268,10 @@
 		}
 	    }
 	} else {
-	    &squawk("get: invalid file '$filename' for list '$clean_list'.");
+	    &squawk("$sm: invalid file '$filename' for list '$clean_list'.");
 	}
     } else {
-	&squawk("get: unknown list '$list'.");
+	&squawk("$sm: unknown list '$list'.");
     }
     &log("get $clean_list $filename");
 }
@@ -1337,15 +1280,9 @@
     # Make sure we've got the arguments we need
     # and Check that the list is OK
     local($sm) = "index";
-    local($list) = shift;
-    local($clean_list);
-    if ( ((!$list) || ! ($clean_list = &valid_list($listdir, $list)))
-	&& defined($deflist)) {
-        unshift(@_,$list) ; 				# Not a list name, put it back.
-	$list=$deflist || &squawk("$sm: which list?");	# set the list to deflist
-        $clean_list = &valid_list($listdir, $list);
-    }
-
+    local($list) = defined($deflist) ? $deflist : shift;
+    &squawk("$sm: which list?") unless $list;
+    local($clean_list) = &valid_list($listdir, $list);
 
     if ($clean_list ne "") {
 	&get_config($listdir, $clean_list) 
@@ -1384,19 +1321,19 @@
 		    }
 		    unless (close INDEX) {
 			&bitch("Index command $index_command failed.\n$! $?");
-			&squawk("index: index command failed");
+			&squawk("$sm: index command failed");
 		    }
 		}
 		else {
 		    &bitch("Cannot chdir to $filedir/$clean_list$filedir_suffix to build index\n$!");
-		    &squawk("index: index command failed");
+		    &squawk("$sm: index command failed");
 		}
 	    } else {
 		print REPLY "#### No files available for $clean_list.\n";
 	    }
 	}
     } else {
-	&squawk("index: unknown list '$list'.");
+	&squawk("$sm: unknown list '$list'.");
     }
     &log("index $list");
     chdir("$homedir");
@@ -1937,7 +1874,7 @@
     local($addr) = &valid_addr($subscriber);
     if ($addr =~ /\s/ && $addr !~ /[!%\@:]/) {
 	# yup, looks like a LISTSERV-style request to me.
-	&squawk("subscribe: LISTSERV-style request failed");
+	&squawk("$request: LISTSERV-style request failed");
 	print REPLY <<"EOM";
 This looks like a BITNET LISTSERV style '$request' request, because
 the part after the list name doesn't look like an email address; it looks
--- majordomo.pl.orig	Wed Aug 27 09:58:53 1997
+++ majordomo.pl	Tue Nov  4 10:00:20 1997
@@ -673,7 +673,7 @@
     } else {
 	$clean_filename = $taint_filename;
     }
-    if (! -e "$directory/$list$suffix/$clean_filename") {
+    if (! -f "$directory/$list$suffix/$clean_filename") {
 	return undef;
     }
     return "$directory/$list$suffix/$clean_filename";

-- 
 Dave Wolfe



Follow-Ups:
Indexed By Date Previous: Re: majordomo/qmail tool available
From: Russ Allbery <rra@stanford.edu>
Next: Re: majordomo/qmail tool available
From: John R Levine <johnl@iecc.com>
Indexed By Thread Previous: Re: majordomo/qmail tool available
From: Russ Allbery <rra@stanford.edu>
Next: Re: Single archive and -l option bug
From: Jason L Tibbitts III <tibbs@hpc.uh.edu>

Google
 
Search Internet Search www.greatcircle.com