diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-12-26 08:08:41 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-12-26 08:08:41 +0900 |
| commit | 0e476c5e5b5f5b5fccfab0794936e3ede1c8116a (patch) | |
| tree | 6888d613595229085b15f9c57a1a8853270d2b42 /cmd/sharefs/fuse-operations.h | |
| parent | 54712e04265f1e74194fe8df0cc8f596af2e80d5 (diff) | |
cmd/sharefs: allocate sharefs_private early
This also removes global state used by sharefs_init.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd/sharefs/fuse-operations.h')
| -rw-r--r-- | cmd/sharefs/fuse-operations.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd/sharefs/fuse-operations.h b/cmd/sharefs/fuse-operations.h index 34f388b3..9abc47ce 100644 --- a/cmd/sharefs/fuse-operations.h +++ b/cmd/sharefs/fuse-operations.h @@ -13,7 +13,11 @@ /* sharefs_private is populated by sharefs_init and contains process-wide context */ struct sharefs_private { - int dirfd; /* source dirfd opened during sharefs_init */ + int dirfd; /* source dirfd opened during sharefs_init */ + bool init_failed; /* whether sharefs_init failed */ + uintptr_t source_handle; /* cgo handle of pathname to open for dirfd, freed during sharefs_init */ + uintptr_t setuid; /* uid to set by sharefs_init when running as root */ + uintptr_t setgid; /* gid to set by sharefs_init when running as root */ }; int sharefs_getattr(const char *pathname, struct stat *statbuf, struct fuse_file_info *fi); |
