summaryrefslogtreecommitdiff
path: root/libdiskfs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-07-14 00:04:58 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-07-14 00:04:58 +0000
commit0ba064aec7f9f7bbc0b348759958992ba2d8b188 (patch)
tree503e8601a77fa4ec0835cbad9cd4bc8dce579556 /libdiskfs
parentd23b777fcf60506138356085b5c0c18dfa981ad6 (diff)
(diskfs_S_io_reauthenticate): Repeat diskfs_start_protid and
auth_server_authenticate for as we get EINTR.
Diffstat (limited to 'libdiskfs')
-rw-r--r--libdiskfs/io-reauthenticate.c29
1 files changed, 19 insertions, 10 deletions
diff --git a/libdiskfs/io-reauthenticate.c b/libdiskfs/io-reauthenticate.c
index 25765161..c04b9315 100644
--- a/libdiskfs/io-reauthenticate.c
+++ b/libdiskfs/io-reauthenticate.c
@@ -38,23 +38,32 @@ diskfs_S_io_reauthenticate (struct protid *cred,
aux_uids = aubuf;
aux_gids = agbuf;
+ /* This routine must carefully ignore EINTR because we
+ are a simpleroutine, so callers won't know to restart. */
+
mutex_lock (&cred->po->np->lock);
- err = diskfs_start_protid (cred->po, &newcred);
+ do
+ err = diskfs_start_protid (cred->po, &newcred);
+ while (err == EINTR);
if (err)
{
mutex_unlock (&cred->po->np->lock);
return err;
}
- err = auth_server_authenticate (diskfs_auth_server_port,
- rend_port,
- MACH_MSG_TYPE_COPY_SEND,
- ports_get_right (newcred),
- MACH_MSG_TYPE_MAKE_SEND,
- &gen_uids, &genuidlen,
- &aux_uids, &auxuidlen,
- &gen_gids, &gengidlen,
- &aux_gids, &auxgidlen);
+ do
+ {
+ err = auth_server_authenticate (diskfs_auth_server_port,
+ rend_port,
+ MACH_MSG_TYPE_COPY_SEND,
+ ports_get_right (newcred),
+ MACH_MSG_TYPE_MAKE_SEND,
+ &gen_uids, &genuidlen,
+ &aux_uids, &auxuidlen,
+ &gen_gids, &gengidlen,
+ &aux_gids, &auxgidlen);
+ }
+ while (err == EINTR);
mach_port_deallocate (mach_task_self (), rend_port);
if (err)