John Summerfield <[EMAIL PROTECTED]> writes:
> if you create folders with it:
> 
> I filter mail with procmail & pipe it into rcvstore.
> 
> Here's strace output showing how it creates folders:
> procmail.trace:12385 mkdir("/u02/summer/.Mail/redhat/2000_03/piglet-list", 
> 01274) = 0
> 
> 
> Here''s how 1.02 did it:
> procmail.trace2:12441 mkdir("/u02/summer/.Mail/redhat/2000_03/piglet-list",
>  0755) = 0
> procmail.trace2:12441 chmod("/u02/summer/.Mail/redhat/2000_03/piglet-list",
>  0700) = 0
> 
> I like the old behaviour better; the new way creates a folder I cannot 
> access.

"Sullivan N. Beck" <[EMAIL PROTECTED]> writes:
> This is similar (probably related) to the thread "1.0.2 folder creation bug"
> that was on the mailing list a couple months ago.  The problem still exists
> in 1.0.3 under Solaris.
> 
> If .mh_profile contains the line 
>    Folder-protect: 700
> then you get the following:
>    % folder +zzz
>    Create folder "/cis/homes/sbeck/Mail/zzz"? y
>    zzz+ is unreadable
>    % ls -ld zzz
>    d-w-rwxr--   2 sbeck    apps         512 Mar 15 16:07 zzz
> If you remove the Folder-protect line, the directory is created
> properly.
> 
> I've seen this occur with perl too (on Solaris), and it's easily fixed
> by expressing the mode as 4 digits rather than 3.  Sure enough, changing
> the line to:
>    Folder-protect: 0700
> and it worked fine, but it might be nice to document this somewhere.

Thanks for the clarification of the problem John was seeing, Sullivan.  That
was indeed it.  When I fixed multiple bugs in makedir() in January, I was
unfortunately unaware of the "Folder-Protect:" .mh_profile entry.  Thus I
only considered mode constants expressed as ASCII in the nmh source, which
all had leading zeroes.  "Folder-Protect:", however, is documented as being
an octal-only constant, with no leading zero required.

I've changed my call to strtoul(..., 0) (which I did to be more flexible in
case anyone ever wanted to express a mode in another base besides octal) to
a call to atooi().  Now "Folder-Protect:" no longer needs a leading zero.
I've also removed all the misleading leading zeroes in ASCII constants to
reinforce that we're working in octal _only_ when it comes to modes.

John, please upgrade to the latest 1.0.3+dev CVS source, if possible.  If
you don't have cvs and are unable to install it, let me know and I can make
a tar file available for you.  BTW, is your Folder-Protect 700?  If so, just
remove that line from your .mh_profile -- 700 is already nmh's default (I've
modified the mh-profile man page to make this more clear).

Sorry for introducing that bug when fixing the other one.

-----------------------------------------------------------------------
Dan Harkless                   | To prevent SPAM contamination, please 
[EMAIL PROTECTED]      | do not post this private email address
SpeedGate Communications, Inc. | to the USENET or WWW.  Thank you.     

Reply via email to