[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#767448: No way to override settings from /usr/share/initramfs-tools/conf-hooks.d/*



Control: tag -1 moreinfo

On Fri, 2015-12-11 at 02:43 +0000, Ben Hutchings wrote:
> On Fri, 31 Oct 2014 06:17:46 +0100 Piotr Jurkiewicz  wrote:
> > Package: initramfs-tools
> >  
> > There is no way for user to override settings from 
> > /usr/share/initramfs-tools/conf-hooks.d.
> >  
> > For example, dropbear package in file /usr/.../conf-hooks.d/dropbear 
> > sets UMASK variable to 0077. User cannot override this with his own 
> > setting in /etc.
> >  
> > The only way to do that is to edit /usr/.../conf-hooks.d/dropbear file 
> > directly and change UMASK. However, such change will be of course 
> > overwritten on a next update of dropbear package.
> 
> Actually, you can use dpkg-divert to rename this file to somewhere else
> that initramfs-tools will ignore it.  dpkg will follow that renaming so
> it won't undo your change.
> 
> > In my opinion, user-provided settings from /etc/* should have priority 
> > over package-provided settings form /usr/*.
> 
> This is a tricky one.  Some packages really do need to override
> initramfs.conf, to enable features they depend on.  I agree we need to
> come up with a better approach for controlling the UMASK variable.

The UMASK variable is *documented* as affecting only the permissions
for the initramfs image (which it doesn't seem to do reliably!) but it
also affects the permissions for the files inside the initramfs.

When dropbear is used in the initramfs, the host private key must be
kept secret and so the initramfs image must not be world-readable.  But
most of the files installed in the initramfs can be world-readable.  Is
that what you want to change?

I don't think we can simply 'fix' the behaviour of UMASK now, because
other packages may depend on it.  I think that the proper fix may
require introducing a new configuration variable, e.g. 'SECRET' that
really only affects the permissions of the initramfs image.

Ben.

-- 
Ben Hutchings
Klipstein's 4th Law of Prototyping and Production:
                                    A fail-safe circuit will destroy others.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: