* auth/authmutations.h: Add mutator.
* auth/auth_mig.h (auth_payload_to_handle): New declaration.
* auth/auth.c (auth_payload_to_handle): New function.
* utils/fakeauth.c (auth_payload_to_handle): Likewise.
---
auth/auth.c | 6 ++++++
auth/auth_mig.h | 1 +
auth/authmutations.h | 1 +
utils/fakeauth.c | 6 ++++++
4 files changed, 14 insertions(+)
diff --git a/auth/auth.c b/auth/auth.c
index 91a21e4..4fdb712 100644
--- a/auth/auth.c
+++ b/auth/auth.c
@@ -80,6 +80,12 @@ auth_port_to_handle (auth_t auth)
{
return ports_lookup_port (auth_bucket, auth, authhandle_portclass);
}
+
+authhandle_t
+auth_payload_to_handle (unsigned long payload)
+{
+ return ports_lookup_payload (auth_bucket, payload, authhandle_portclass);
+}
/* id management. */
diff --git a/auth/auth_mig.h b/auth/auth_mig.h
index d919c1b..7b20915 100644
--- a/auth/auth_mig.h
+++ b/auth/auth_mig.h
@@ -1,5 +1,6 @@
typedef struct authhandle *authhandle_t;
authhandle_t auth_port_to_handle (auth_t);
+authhandle_t auth_payload_to_handle (unsigned long);
#include <hurd/ports.h>
diff --git a/auth/authmutations.h b/auth/authmutations.h
index 63b2f54..69875ae 100644
--- a/auth/authmutations.h
+++ b/auth/authmutations.h
@@ -1,6 +1,7 @@
/* CPP definitions for MiG processing of auth.defs for auth server. */
#define AUTH_INTRAN authhandle_t auth_port_to_handle (auth_t)
+#define AUTH_INTRAN_PAYLOAD authhandle_t auth_payload_to_handle
#define AUTH_DESTRUCTOR ports_port_deref (authhandle_t)
#define AUTH_IMPORTS import "auth_mig.h";
diff --git a/utils/fakeauth.c b/utils/fakeauth.c
index 154bf8e..d934f41 100644
--- a/utils/fakeauth.c
+++ b/utils/fakeauth.c
@@ -71,6 +71,12 @@ auth_port_to_handle (auth_t auth)
{
return ports_lookup_port (auth_bucket, auth, authhandle_portclass);
}
+
+authhandle_t
+auth_payload_to_handle (unsigned long payload)
+{
+ return ports_lookup_payload (auth_bucket, payload, authhandle_portclass);
+}
/* id management. */
--
1.7.10.4