Great Circle Associates Majordomo-Workers
(November 1996)
 

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

Subject: Re: bug in 1.94, + patch
From: Brian Behlendorf <brian @ hyperreal . com>
Date: Sat, 2 Nov 1996 17:26:38 -0800 (PST)
To: majordomo-workers @ GreatCircle . COM
In-reply-to: <Pine.BSI.3.95.961102165933.14133A-100000@taz.hyperreal.com>


Scratch this, sorry, I sent this before fully testing it.  Whatever,
commenting out the chown seemed to work fine for me, and produces the
same behavior as older majordomos.  I'm just curious as to why $uid is
getting set to 1 instead of to what it should be set to, or otherwise why
the chown would fail.

	Brian

On Sat, 2 Nov 1996, Brian Behlendorf wrote:
> I don't think this is related to the chown business we were discussing
> before, but this gave me some amount of grief today and does involve
> chown.  Basically a chunk of code tries to do a chown without checking to
> make sure there's actually a valid value in $uid; other places in the
> majordomo code where chown's are done do check to make sure it's
> "defined".  What trying to run without this patch I'd get:
> 
>   majordomo... aliased to "|/usr/local/majordomo/wrapper majordomo"
>   "|/usr/local/majordomo/wrapper majordomo"... Connecting to prog...
>   chown(1, 10, "/usr/local/majordomo/Lists/sfraves.new"): Operation not permitted
>   ABORT chown(1, 10, "/usr/local/majordomo/Lists/sfraves.new"): Operation
>     not permitted"|/usr/local/majordomo/wrapper majordomo"... Sent
> 
> Notice the "1" for the UID; the UID on the file was "10" (my majordom
> UID), not "1".  Anyways, here's the patch.  I don't know why I would have
> see this and no one else, though.  And yes, "./wrapper config-test"
> passed.
> 
> 	Brian
> 
> *** /usr/local/src/maj/majordomo-1.94/majordomo	Tue Oct  8 12:00:13 1996
> --- majordomo	Sat Nov  2 17:03:12 1996
> ***************
> *** 414,421 ****
>   		&abort("Can't open $listdir/$clean_list.new: $!");
>   	    chmod($mode, "$listdir/$clean_list.new") ||
>   		&abort("chmod($mode, \"$listdir/$clean_list.new\"): $!");
> ! 	    chown($uid, $gid, "$listdir/$clean_list.new") ||
> ! 		&abort("chown($uid, $gid, \"$listdir/$clean_list.new\"): $!");
>   	    while (<LIST>) {
>   		if (! &addr_match($subscriber, $_,
>   				  (&cf_ck_bool($clean_list,"mungedomain") ? 2 : undef))) {
> --- 414,423 ----
>   		&abort("Can't open $listdir/$clean_list.new: $!");
>   	    chmod($mode, "$listdir/$clean_list.new") ||
>   		&abort("chmod($mode, \"$listdir/$clean_list.new\"): $!");
> ! 	    if (defined($uid)) {
> ! 	        chown($uid, $gid, "$listdir/$clean_list.new") || 
> ! 		    &abort("chown($uid, $gid, \"$listdir/$clean_list.new\"): $!");
> ! 	    }
>   	    while (<LIST>) {
>   		if (! &addr_match($subscriber, $_,
>   				  (&cf_ck_bool($clean_list,"mungedomain") ? 2 : undef))) {
> 
> 
> 

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@hyperreal.com     http://www.apache.org     http://www.organic.com/jobs



References:
Indexed By Date Previous: bug in 1.94, + patch
From: Brian Behlendorf <brian@hyperreal.com>
Next: Passwords
From: Charly <charly@jerry.frba.utn.edu.ar>
Indexed By Thread Previous: bug in 1.94, + patch
From: Brian Behlendorf <brian@hyperreal.com>
Next: Passwords
From: Charly <charly@jerry.frba.utn.edu.ar>

Google
 
Search Internet Search www.greatcircle.com