diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-06-15 22:51:15 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-06-15 22:51:15 +0000 |
commit | 4c8fcbafea683430503cf147c8e00bd16bb63406 (patch) | |
tree | 6fb0c841f4885261c6935817eea8a358558813e7 /libtrivfs | |
parent | c3f9ba7b1a4286e09cd80a58b80b185e05dce532 (diff) |
Formerly trivfs.h.~6~
Diffstat (limited to 'libtrivfs')
-rw-r--r-- | libtrivfs/trivfs.h | 47 |
1 files changed, 42 insertions, 5 deletions
diff --git a/libtrivfs/trivfs.h b/libtrivfs/trivfs.h index 1af5994a..52f12f98 100644 --- a/libtrivfs/trivfs.h +++ b/libtrivfs/trivfs.h @@ -19,14 +19,25 @@ struct trivfs_protid { struct port_info pi; + uid_t *uids, *gids; + int nuids, ngids; int isroot; mach_port_t realnode; /* restricted permissions */ + void *hook; /* for user use */ + struct trivfs_peropen *po; +}; + +struct trivfs_peropen +{ + void *hook; /* for user use */ + int refcnt; struct trivfs_control *cntl; }; struct trivfs_control { struct port_info pi; + int protidtypes; mach_port_t underlying; }; @@ -38,8 +49,10 @@ extern int trivfs_support_read; extern int trivfs_support_write; extern int trivfs_support_exec; -extern int trivfs_protid_porttype; -extern int trivfs_cntl_porttype; +extern int trivfs_protid_porttypes[]; +extern int trivfs_protid_nporttypes; +extern int trivfs_cntl_porttypes[]; +extern int trivfs_cntl_nporttypes; /* The user must define this function. This should modify a struct stat (as returned from the underlying node) for presentation to @@ -47,11 +60,30 @@ extern int trivfs_cntl_porttype; nothing. */ void trivfs_modify_stat (struct stat *); +/* If this variable is set, it is called every time a new protid + structure is created and initialized. */ +void (*trivfs_protid_create_hook) (struct trivfs_protid *); + +/* If this variable is set, it is called every time a new peropen + structure is created and initialized. */ +void (*trivfs_peropen_create_hook) (struct trivfs_peropen *); + +/* If this variable is set, it is called every time a protid structure + is about to be destroyed. */ +void (*trivfs_protid_destroy_hook) (struct trivfs_protid *); + +/* If this variable is set, it is called every time a peropen structure + is about to be destroyed. */ +void (*trivfs_peropen_destroy_hook) (struct trivfs_peropen *); + /* Call this to create a new control port and return a receive right for it; exactly one send right must be created from the returned receive right. UNDERLYING is the underlying port, such as fsys_startup - returns as the realnode. */ -mach_port_t trivfs_handle_port (mach_port_t realnode); + returns as the realnode. PROTIDTYPE is the ports type to be used + for ports that refer to this underlying node. CNTLTYPE is the ports type + to be used for the control port for this node. */ +mach_port_t trivfs_handle_port (mach_port_t underlying, int cntltype, + int protidtype); /* Install these as libports cleanroutines for trivfs_protid_porttype and trivfs_cntl_porttype respectively. */ @@ -61,4 +93,9 @@ void trivfs_clean_cntl (void *); /* This demultiplees messages for trivfs ports. */ int trivfs_demuxer (mach_msg_header_t *, mach_msg_header_t *); -error_t trivfs_goaway (int); +/* The user must define this function. Someone wants the filesystem + to go away. FLAGS are from the set FSYS_GOAWAY_*; REALNODE, + CNTLTYPE, and PROTIDTYPE are as from the trivfs_handle_port + call which creade this filesystem. */ +error_t trivfs_goaway (int flags, mach_port_t realnode, int cntltype, + int protidtype); |