Add description to set_auto_perm
This commit is contained in:
parent
77775e4097
commit
9b0eb10965
@ -48,6 +48,12 @@
|
||||
|
||||
int auto_create_perm = GRANT_TEMP;
|
||||
|
||||
/*
|
||||
* Sets the default permission granted by file creation.
|
||||
*
|
||||
* @param val: the default permission to grant. Should be one of GRANT_TEMP,
|
||||
* GRANT_TEM and 0. When set to 0, grants no permissions.
|
||||
*/
|
||||
void set_auto_create_perm(int val) { auto_create_perm = val; }
|
||||
|
||||
static void *xmp_init(struct fuse_conn_info *conn, struct fuse_config *cfg) {
|
||||
@ -397,8 +403,8 @@ static int xmp_chmod(const char *path, mode_t mode, struct fuse_file_info *fi) {
|
||||
}
|
||||
|
||||
/**
|
||||
* This filesystem is not designed for multiuser operation (e.g. with
|
||||
* allow_other) so there is little point in having chown implemnted
|
||||
* This filesystem is not designed for multiuser operation (with
|
||||
* allow_other option) so there is little point in having chown implemnted
|
||||
*/
|
||||
static int xmp_chown(const char *path, uid_t uid, gid_t gid,
|
||||
struct fuse_file_info *fi) {
|
||||
@ -466,8 +472,6 @@ static int xmp_create(const char *path, mode_t mode,
|
||||
|
||||
pi = get_process_info(fc->pid);
|
||||
|
||||
// fprintf(stderr, "%s, %d\n", path, ask_access(path, pi));
|
||||
|
||||
if (auto_create_perm != 0) {
|
||||
if (!interactive_access(path, pi, auto_create_perm)) {
|
||||
free(pi.name);
|
||||
|
@ -14,6 +14,13 @@
|
||||
#include <fuse3/fuse.h>
|
||||
|
||||
const struct fuse_operations *get_fuse_operations();
|
||||
|
||||
/*
|
||||
* Sets the default permission granted by file creation.
|
||||
*
|
||||
* @param val: the default permission to grant. Should be one of GRANT_TEMP,
|
||||
* GRANT_TEM and 0. When set to 0, grants no permissions.
|
||||
*/
|
||||
void set_auto_create_perm(int val);
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user