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))) {
Follow-Ups:
|
|