aboutsummaryrefslogtreecommitdiff
path: root/libtrivfs/open.c
Commit message (Collapse)AuthorAgeFilesLines
* libtrivfs: fix notion of privileged userJustus Winter2016-04-261-1/+1
| | | | | | | | | | | | | | | | | Set 'is_root' if the node has been opened by the root user (this was the old behavior) or if it has been opened by the user the translator is executing under. This fixes the irritating bug that an unprivileged user cannot control her own trivfs-based translators. It does not change how privileged trivfs translators work. * libtrivfs/io-reauthenticate.c (trivfs_S_io_reauthenticate): Use the new function to compute 'isroot'. * libtrivfs/io-restrict-auth.c (trivfs_S_io_restrict_auth): Likewise. * libtrivfs/open.c (trivfs_open): Likewise. * libtrivfs/priv.h (_is_privileged): New function. * libtrivfs/trivfs.h (struct peropen): Clarify what 'isroot' means.
* libtrivfs: lock-less reference counting for trivfs_peropen objectsJustus Winter2014-05-261-1/+1
| | | | | | | | | | | | | | * libtrivfs/trivfs.h (struct trivfs_peropen): Use refcount_t for field refcnt. (struct trivfs_control): Remove unused field lock. * libtrivfs/cntl-create.c (trivfs_create_control): Drop the mutex initialization. * libtrivfs/io-reauthenticate.c (trivfs_S_io_reauthenticate): Adjust accordingly. * libtrivfs/io-restrict-auth.c (trivfs_S_io_restrict_auth): Likewise. * libtrivfs/open.c (trivfs_open): Initialize refcnt. * libtrivfs/protid-clean.c (trivfs_clean_protid): Likewise. * libtrivfs/protid-dup.c (trivfs_protid_dup): Likewise.
* 1999-02-12 Gordon Matzigkeit <gord@trick.fig.org>Thomas Bushnell1999-02-131-1/+1
| | | | * open.c (trivfs_open): Add missing `=' from last change.
* 1999-02-05 Mark Kettenis <kettenis@gnu.org>Thomas Bushnell1999-02-071-3/+2
| | | | * open.c (trivfs_open): Correctly initialize NEW->isroot.
* Mon Nov 18 18:13:42 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell1996-11-181-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * io-stat.c (trivfs_S_io_stat): Make the mode specify IFCHR by default. Sat Nov 16 17:20:15 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * Makefile (HURDLIBS): Add `iohelp'. Thu Nov 14 13:13:10 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * io-restrict-auth.c (trivfs_S_io_restrict_auth): idvec_set -> idvec_set_ids. Fix unrelated typos. * protid-dup.c (trivfs_protid_dup): Use iouser_dup_iouser instead of copying old arrays by hand. * protid-clean.c (trivfs_clean_protid): Free CRED->user instead of CRED->uids and CRED->gids. * io-reauthenticate.c (trivfs_S_io_reauthenticate): Args for io_restrict_auth now come from the new structure definitions. * open.c (trivfs_open): Pass correct first arg to idvec_contains. * open.c (trivfs_open): Delete variable I. * trivfs.h: Include <hurd/iohelp.h>
* Thu Nov 7 01:01:05 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>Thomas Bushnell1996-11-131-13/+4
| | | | | | | | | | | | | | | | | | * io-restrict-auth.c (trivfs_S_io_restrict_auth): Rewrite to use idvecs. Wed Nov 6 23:40:50 1996 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> * trivfs.h (struct trivfs_protid): Delete members `uids', `gids', `nuids', and `ngids'. Replace with `user'. (trivfs_check_open_hook): Delete args `uids', `nuids', `gids', `ngids'. Replace with new arg `user'. All callers changed. (trivfs_open): Likewise. * open.c (trivfs_open): Change to match new declaration. * trivfs.h (struct trivfs_protid): Delete members `uids', `gids', * io-reauthenticate.c (trivfs_S_io_reauthenticate): Use new iohelp_reauth call.
* (trivfs_open): Use ports_create_port instead of ports_allocate_port, andMiles Bader1996-01-271-7/+4
| | | | return any error.
* Initial revisionMiles Bader1995-08-121-0/+102