<<< Date Index >>>     <<< Thread Index >>>

Re: [PATCH] Add $umask for mailboxes and attachments



On Wednesday, 21 March 2007 at 18:37, Oswald Buddenhagen wrote:
> On Wed, Mar 21, 2007 at 10:19:06AM -0700, Brendan Cully wrote:
> > So how about the following strategy for $umask:
> > 
> > 1. I back out my patch
> > 
> > 2. we save the existing $umask when setting it to 077 in main
> > 3. we temporarily restore that umask for saving attachments and pipe
> >    commands
> > 4. we create new mailboxes unconditionally as 077, but use the
> >    permissions of the existing mailbox when updating it. This works
> >    for mbox, but we would need to stat the root directory of
> >    maildir/mh and save that mode when updating.
> 
> this poses the question why you would change the umask in the first
> place? you can always create files with a stricter mode than umask, only
> a more liberal mode needs an additional chmod.

a fair point.

> regarding attachments specifically, i considered asking the user for the
> requested mode after the file name. however, i tend to think that this
> wouldn't be too helpful, given that the development of a "press enter
> twice"-reflex would be sort of inevitable.

Attachment: pgpy7a42heCOx.pgp
Description: PGP signature