Grouped permission mode setting in the parameter file
parent
9218a5449c
commit
9f92518396
|
@ -31,6 +31,33 @@
|
|||
#define FORCE_FORMAT_v1x 0 /* Insert security data as in NTFS v1.x */
|
||||
#define OWNERFROMACL 1 /* Get the owner from ACL (not Windows owner) */
|
||||
|
||||
#define FULLCOLLATE 1
|
||||
/*
|
||||
* Permission checking modes for high level and low level
|
||||
*
|
||||
* The choices for high and low lowel are independent, they have
|
||||
* no effect on the library
|
||||
*
|
||||
* Stick to the recommended values unless you understand the consequences
|
||||
* on protection and performances. Use of cacheing is good for
|
||||
* performances, but bad on security.
|
||||
*
|
||||
* Possible values for high level :
|
||||
* 1 : no cache, kernel control (recommended)
|
||||
* 4 : no cache, file system control
|
||||
* 7 : no cache, kernel control for ACLs
|
||||
*
|
||||
* Possible values for low level :
|
||||
* 2 : no cache, kernel control
|
||||
* 3 : use kernel/fuse cache, kernel control
|
||||
* 5 : no cache, file system control (recommended)
|
||||
* 8 : no cache, kernel control for ACLs
|
||||
*
|
||||
* Use of options 7 and 8 requires a patch to fuse
|
||||
* When Posix ACLs are selected in the configure options, a value
|
||||
* of 6 is added in the mount report.
|
||||
*/
|
||||
|
||||
#define HPERMSCONFIG 1
|
||||
#define LPERMSCONFIG 5
|
||||
|
||||
#endif /* defined _NTFS_PARAM_H */
|
||||
|
|
|
@ -103,10 +103,17 @@
|
|||
#include "logging.h"
|
||||
#include "misc.h"
|
||||
|
||||
#define KERNELACLS 0 /* do not want ACLs checked by kernel */
|
||||
/* fuse patch required for KERNELACLS ! */
|
||||
#define KERNELPERMS 1 /* want permissions checked by kernel */
|
||||
#define CACHEING 0 /* Fuse cacheing; broken, do no use ! */
|
||||
/*
|
||||
* The following permission checking modes are governed by
|
||||
* the LPERMSCONFIG value in param.h
|
||||
*/
|
||||
|
||||
/* ACLS may be checked by kernel (requires a fuse patch) or here */
|
||||
#define KERNELACLS ((HPERMSCONFIG > 6) & (HPERMSCONFIG < 10))
|
||||
/* basic permissions may be checked by kernel or here */
|
||||
#define KERNELPERMS (((HPERMSCONFIG - 1) % 6) < 3)
|
||||
/* may want to use fuse/kernel cacheing */
|
||||
#define CACHEING (!(HPERMSCONFIG % 3))
|
||||
|
||||
#if KERNELACLS & !KERNELPERMS
|
||||
#error Incompatible options KERNELACLS and KERNELPERMS
|
||||
|
@ -4163,6 +4170,7 @@ int main(int argc, char *argv[])
|
|||
if (fstype == FSTYPE_NONE || fstype == FSTYPE_UNKNOWN)
|
||||
fstype = load_fuse_module();
|
||||
create_dev_fuse();
|
||||
|
||||
if (drop_privs())
|
||||
goto err_out;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue