any reason why linker.hints has mode -rw------- ?

Luigi Rizzo rizzo at iet.unipi.it
Thu Nov 27 06:26:38 PST 2008


As the subject says...
kldxref creates linker.hints files with mode 600,
and I cannot see any good reason for that except for a bug
(or probably two bugs).

Looking at the source code src/usr.sbin/kldxref/kldxref.c,
it seems that the file is originally created by mkstemp
(in a weird way -- the file descriptor returned by mkstemp
is ignored, then the file is reopened) and here is where
it gets the 600 permission.

Then the file is rename()'d, but forgetting to restore the
permission to something more useful ?

	cheers
	luigi


More information about the freebsd-current mailing list