umask(0) in all binaries

Christof Schmitt cs at samba.org
Tue Nov 5 08:55:57 MST 2013


On Mon, Nov 04, 2013 at 04:54:31PM -0700, Christof Schmitt wrote:
> On Mon, Nov 04, 2013 at 03:34:24PM -0800, Jeremy Allison wrote:
> > On Mon, Nov 04, 2013 at 02:26:13PM -0700, Christof Schmitt wrote:
> > 
> > > If we decide that only smbd, winbindd and nmbd should create those
> > > directories in case they are missing: Wouldn't it be simpler to create
> > > the directories directly during startup of those daemons, and remove the
> > > if (!directory_exist(fname)) from xx_path?
> > 
> > Yes, I would support that change.
> 
> Ok, here is my attempt on making that change. The first patch ensures
> that the directories are only created during daemon startup, and the
> second one adds checks against NULL pointers in codepaths that can be
> reached from utility code.

There is at least one case where the directories are needed before a
daemon starts: net ads join is run before starting any daemons, and it
tries to look up DC information from the gencache. I can try to change
the code that it returns NOT_FOUND without the cache directory. The
question is if that is worth the effort, or if our code should expect
that all required directories already exist, e.g. from the package
installation.

Christof


More information about the samba-technical mailing list