diff options
author | Michael I. Bushnell <mib@gnu.org> | 1996-07-19 03:42:43 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1996-07-19 03:42:43 +0000 |
commit | 8ad48f6ce444648397d82b107cd196c24599d7cb (patch) | |
tree | 1dbc9e6c691521e74a48a9df2b7944366a4c0922 | |
parent | f030ef4e9d02fc0c88113a569773e49d629e9aa2 (diff) |
*** empty log message ***
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | config/ChangeLog | 7 | ||||
-rw-r--r-- | config/fstab | 2 | ||||
-rw-r--r-- | config/root-.profile | 1 | ||||
-rw-r--r-- | libdiskfs/ChangeLog | 6 | ||||
-rw-r--r-- | libdiskfs/protid-make.c | 7 | ||||
-rw-r--r-- | libnetfs/ChangeLog | 7 | ||||
-rw-r--r-- | libnetfs/io-reauthenticate.c | 3 | ||||
-rw-r--r-- | libnetfs/make-protid.c | 10 | ||||
-rw-r--r-- | libports/ChangeLog | 1 | ||||
-rw-r--r-- | libports/Makefile | 2 | ||||
-rw-r--r-- | libtrivfs/ChangeLog | 7 | ||||
-rw-r--r-- | libtrivfs/io-reauthenticate.c | 13 | ||||
-rw-r--r-- | pfinet/ChangeLog | 8 | ||||
-rw-r--r-- | pfinet/io-ops.c | 10 | ||||
-rw-r--r-- | pfinet/misc.c | 13 | ||||
-rw-r--r-- | pfinet/socket-ops.c | 4 |
17 files changed, 79 insertions, 25 deletions
@@ -34,6 +34,9 @@ See `tasks', the exported task list. ** libports: *** Get rid of general `uninibited-rpcs' mechanism in libports, & just special-case interrupt_operation. +*** Drop wire parms to manage-operations; instead have a new-thread hook + function. +*** Add ports_create_port_noinstall to ports.h. ** libstore: *** test it and make diskfs use it. diff --git a/config/ChangeLog b/config/ChangeLog index 2e086f2b..a27ab48a 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,10 @@ +Thu Jul 18 17:24:55 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu> + + * root-.profile: Echo usual noisy message. + + * fstab: Comment out example entry so it doesn't get incorrectly + used by accident. + Wed Jul 17 17:09:06 1996 Miles Bader <miles@gnu.ai.mit.edu> * root-.bashrc: Fixup test and source of user's .root_bashrc. diff --git a/config/fstab b/config/fstab index e33c52f0..618ba992 100644 --- a/config/fstab +++ b/config/fstab @@ -2,4 +2,4 @@ # # Disk device Mount point Format rw/ro dump fsckpassno # -/dev/rsd0a / ufs rw 1 1 +#/dev/rsd0a / ufs rw 1 1 diff --git a/config/root-.profile b/config/root-.profile index 5a2188db..1e7e1009 100644 --- a/config/root-.profile +++ b/config/root-.profile @@ -12,4 +12,5 @@ if [ "$UHOME" -a -r "$UHOME/.root_profile" ]; then else PATH=/sbin:/bin:/local/bin export PATH + echo "Don\'t login as root; use su." fi diff --git a/libdiskfs/ChangeLog b/libdiskfs/ChangeLog index b24ffc8f..89e81313 100644 --- a/libdiskfs/ChangeLog +++ b/libdiskfs/ChangeLog @@ -1,3 +1,9 @@ +Thu Jul 18 23:05:56 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu> + + * protid-make.c (diskfs_start_protid): Use noinstall version of + ports_create_port. + (diskfs_finish_protid): Install port right into port set here. + Mon Jul 15 21:37:12 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu> * diskfs.h (diskfs_checkdirmod): diskfs_isowner returns error or diff --git a/libdiskfs/protid-make.c b/libdiskfs/protid-make.c index 2921f569..c67bd41b 100644 --- a/libdiskfs/protid-make.c +++ b/libdiskfs/protid-make.c @@ -24,8 +24,8 @@ error_t diskfs_start_protid (struct peropen *po, struct protid **cred) { error_t err = - ports_create_port (diskfs_protid_class, diskfs_port_bucket, - sizeof (struct protid), cred); + ports_create_port_noinstall (diskfs_protid_class, diskfs_port_bucket, + sizeof (struct protid), cred); if (! err) { po->refcnt++; @@ -61,6 +61,9 @@ diskfs_finish_protid (struct protid *cred, uid_t *uids, int nuids, bcopy (gids, cred->gids, ngids * sizeof (uid_t)); else *cred->gids = 0; + + mach_port_move_member (mach_task_self (), cred->pi.port_right, + diskfs_port_bucket->portset); } /* Create and return a protid for an existing peropen PO in CRED. The uid diff --git a/libnetfs/ChangeLog b/libnetfs/ChangeLog index ccb98e49..c125bb94 100644 --- a/libnetfs/ChangeLog +++ b/libnetfs/ChangeLog @@ -1,3 +1,10 @@ +Thu Jul 18 23:09:54 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu> + + * io-reauthenticate.c (netfs_S_io_reauthenticate): After attaching + credential to NEWPI, install it in NETFS_PORT_BUCKET->portset. + * make-protid.c (netfs_make_protid): If CRED is null, use + noinstall version of ports_create_port. + Sat Jul 13 20:10:02 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu> * io-reauthenticate.c (netfs_S_io_reauthenticate): Repeat diff --git a/libnetfs/io-reauthenticate.c b/libnetfs/io-reauthenticate.c index aea60154..dff3af8f 100644 --- a/libnetfs/io-reauthenticate.c +++ b/libnetfs/io-reauthenticate.c @@ -67,6 +67,9 @@ netfs_S_io_reauthenticate (struct protid *user, mach_port_t rend_port) newpi->credential = netfs_make_credential (gen_uids, genuidlen, gen_gids, gengidlen); + mach_port_move_member (mach_task_self (), newpi->pi.port_right, + netfs_port_bucket->portset); + mutex_unlock (&user->po->np->lock); ports_port_deref (newpi); diff --git a/libnetfs/make-protid.c b/libnetfs/make-protid.c index 352698e2..7d9240a1 100644 --- a/libnetfs/make-protid.c +++ b/libnetfs/make-protid.c @@ -25,8 +25,14 @@ netfs_make_protid (struct peropen *po, struct netcred *cred) { struct protid *pi; - errno = ports_create_port (netfs_protid_class, netfs_port_bucket, - sizeof (struct protid), &pi); + if (cred) + errno = ports_create_port (netfs_protid_class, netfs_port_bucket, + sizeof (struct protid), &pi); + else + errno = ports_create_port_noinstall (netfs_protid_class, + netfs_port_bucket, + sizeof (struct protid), &pi); + if (errno) return 0; diff --git a/libports/ChangeLog b/libports/ChangeLog index 16686e5e..2a50f7ce 100644 --- a/libports/ChangeLog +++ b/libports/ChangeLog @@ -1,5 +1,6 @@ Thu Jul 18 22:59:14 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu> + * Makefile (SRCS): Add create-port-noinstall.c and create-internal.c. * create-port-noinstall.c: New file. * create-port.c (ports_create_port): Guts deleted; call new work function. diff --git a/libports/Makefile b/libports/Makefile index 68088ea3..50ccd0c9 100644 --- a/libports/Makefile +++ b/libports/Makefile @@ -35,7 +35,7 @@ SRCS = create-bucket.c create-class.c \ notify-msg-accepted.c notify-port-deleted.c notify-send-once.c \ interrupt-operation.c interrupt-on-notify.c interrupt-notified-rpcs.c \ dead-name.c create-port.c import-port.c default-uninhibitable-rpcs.c \ - claim-right.c transfer-right.c + claim-right.c transfer-right.c create-port-noinstall.c create-internal.c LCLHDRS = ports.h installhdrs = ports.h diff --git a/libtrivfs/ChangeLog b/libtrivfs/ChangeLog index eaf3afa2..51e946e4 100644 --- a/libtrivfs/ChangeLog +++ b/libtrivfs/ChangeLog @@ -1,7 +1,8 @@ -Thu Jul 18 19:39:32 1996 Miles Bader <miles@gnu.ai.mit.edu> +Thu Jul 18 23:14:44 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu> - * io-reauthenticate.c (trivfs_S_io_reauthenticate): Hold - GLOBAL_LOCK while we're setting up the new port. + * io-reauthenticate.c (trivfs_S_io_reauthenticate): Use noinstall + version of ports_create_port. Put it in the port set after the + node has been fully initialized. Sat Jul 13 20:15:56 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu> diff --git a/libtrivfs/io-reauthenticate.c b/libtrivfs/io-reauthenticate.c index 10e32481..e199642b 100644 --- a/libtrivfs/io-reauthenticate.c +++ b/libtrivfs/io-reauthenticate.c @@ -48,13 +48,11 @@ trivfs_S_io_reauthenticate (struct trivfs_protid *cred, aux_uids = aubuf; aux_gids = agbuf; - mutex_lock (&global_lock); - do - err = ports_create_port (cred->po->cntl->protid_class, - cred->po->cntl->protid_bucket, - sizeof (struct trivfs_protid), - &newcred); + err = ports_create_port_noinstall (cred->po->cntl->protid_class, + cred->po->cntl->protid_bucket, + sizeof (struct trivfs_protid), + &newcred); while (err == EINTR); if (err) return err; @@ -126,7 +124,8 @@ trivfs_S_io_reauthenticate (struct trivfs_protid *cred, /* Signal that the user destroy hook shouldn't be called on NEWCRED. */ newcred->realnode = MACH_PORT_NULL; - mutex_unlock (&global_lock); + mach_port_move_member (mach_task_self (), newcred->pi.port_right, + cred->po->cntl->protid_bucket->portset); if (gubuf != gen_uids) vm_deallocate (mach_task_self (), (u_int) gen_uids, diff --git a/pfinet/ChangeLog b/pfinet/ChangeLog index b2484ffb..c84fe38d 100644 --- a/pfinet/ChangeLog +++ b/pfinet/ChangeLog @@ -1,3 +1,11 @@ +Thu Jul 18 23:19:07 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu> + + * misc.c (make_sock_user): New parm `noinstall'; if it's set use + non-installing version of ports_create_port. All callers + changed. + * io-ops.c (S_io_reauthenticate): Install NEWUSER port right into + portset after it's fully initialized. + Sat Jul 13 20:18:18 1996 Michael I. Bushnell, p/BSG <mib@gnu.ai.mit.edu> * io-ops.c (S_io_reauthenticate): Repeat auth_server_authenticate diff --git a/pfinet/io-ops.c b/pfinet/io-ops.c index 1ca158bb..72895065 100644 --- a/pfinet/io-ops.c +++ b/pfinet/io-ops.c @@ -373,7 +373,7 @@ S_io_reauthenticate (struct sock_user *user, aux_gids = agbuf; mutex_lock (&global_lock); - newuser = make_sock_user (user->sock, 0); + newuser = make_sock_user (user->sock, 0, 1); auth = getauth (); newright = ports_get_right (newuser); @@ -401,6 +401,10 @@ S_io_reauthenticate (struct sock_user *user, for (i = 0; i < genuidlen; i++) if (gen_uids[i] == 0) newuser->isroot = 1; + + mach_port_move_member (mach_task_self (), newuser->pi.port_right, + pfinet_bucket->portset); + mutex_unlock (&global_lock); ports_port_deref (newuser); @@ -445,7 +449,7 @@ S_io_restrict_auth (struct sock_user *user, if (uids[i] == 0) isroot = 1; - newuser = make_sock_user (user->sock, isroot); + newuser = make_sock_user (user->sock, isroot, 0); *newobject = ports_get_right (newuser); *newobject_type = MACH_MSG_TYPE_MAKE_SEND; ports_port_deref (newuser); @@ -463,7 +467,7 @@ S_io_duplicate (struct sock_user *user, return EOPNOTSUPP; mutex_lock (&global_lock); - newuser = make_sock_user (user->sock, user->isroot); + newuser = make_sock_user (user->sock, user->isroot, 0); *newobject = ports_get_right (newuser); *newobject_type = MACH_MSG_TYPE_MAKE_SEND; ports_port_deref (newuser); diff --git a/pfinet/misc.c b/pfinet/misc.c index b1cf519b..6eb96b89 100644 --- a/pfinet/misc.c +++ b/pfinet/misc.c @@ -21,14 +21,19 @@ #include "pfinet.h" #include <string.h> -/* Create a sock_user structure, initialized from SOCK and ISROOT. */ +/* Create a sock_user structure, initialized from SOCK and ISROOT. + If NOINSTALL is set, don't put it in the portset. */ struct sock_user * -make_sock_user (struct socket *sock, int isroot) +make_sock_user (struct socket *sock, int isroot, int noinstall) { struct sock_user *user; - errno = ports_create_port (socketport_class, pfinet_bucket, - sizeof (struct sock_user), &user); + if (noinstall) + errno = ports_create_port_noinstall (socketport_class, pfinet_bucket, + sizeof (struct sock_user), &user); + else + errno = ports_create_port (socketport_class, pfinet_bucket, + sizeof (struct sock_user), &user); if (errno) return 0; diff --git a/pfinet/socket-ops.c b/pfinet/socket-ops.c index 968f927a..691dccfc 100644 --- a/pfinet/socket-ops.c +++ b/pfinet/socket-ops.c @@ -62,7 +62,7 @@ S_socket_create (struct trivfs_protid *master, sock_release (sock); else { - user = make_sock_user (sock, master->isroot); + user = make_sock_user (sock, master->isroot, 0); *port = ports_get_right (user); *porttype = MACH_MSG_TYPE_MAKE_SEND; ports_port_deref (user); @@ -146,7 +146,7 @@ S_socket_accept (struct sock_user *user, if (err) goto out; - newuser = make_sock_user (newsock, user->isroot); + newuser = make_sock_user (newsock, user->isroot, 0); *new_port = ports_get_right (newuser); *new_port_type = MACH_MSG_TYPE_MAKE_SEND; ports_port_deref (newuser); |