SUNRPC: remove RPCAUTH_AUTH_NO_CRKEY_TIMEOUT
[sfrench/cifs-2.6.git] / include / linux / sunrpc / auth.h
index c4db9424b63bc743bcf34c0ee92c46cba903d2ff..d8cf742f80324e0599281277d6cedb1bef69763e 100644 (file)
 
 struct rpcsec_gss_info;
 
-/* auth_cred ac_flags bits */
-enum {
-       RPC_CRED_KEY_EXPIRE_SOON = 1, /* underlying cred key will expire soon */
-       RPC_CRED_NOTIFY_TIMEOUT = 2,   /* nofity generic cred when underlying
-                                       key will expire soon */
-};
-
-/* Work around the lack of a VFS credential */
 struct auth_cred {
-       kuid_t  uid;
-       kgid_t  gid;
-       struct group_info *group_info;
-       const char *principal;
-       unsigned long ac_flags;
-       unsigned char machine_cred : 1;
+       const struct cred *cred;
+       const char *principal;  /* If present, this is a machine credential */
 };
 
 /*
@@ -68,6 +56,7 @@ struct rpc_cred {
        unsigned long           cr_expire;      /* when to gc */
        unsigned long           cr_flags;       /* various flags */
        refcount_t              cr_count;       /* ref count */
+       const struct cred       *cr_cred;
 
        kuid_t                  cr_uid;
 
@@ -78,8 +67,7 @@ struct rpc_cred {
 #define RPCAUTH_CRED_HASHED    2
 #define RPCAUTH_CRED_NEGATIVE  3
 
-/* rpc_auth au_flags */
-#define RPCAUTH_AUTH_NO_CRKEY_TIMEOUT  0x0001 /* underlying cred has no key timeout */
+struct rpc_cred *rpc_machine_cred(void);
 
 /*
  * Client authentication handle
@@ -155,7 +143,6 @@ struct rpc_credops {
        int                     (*crunwrap_resp)(struct rpc_task *, kxdrdproc_t,
                                                void *, __be32 *, void *);
        int                     (*crkey_timeout)(struct rpc_cred *);
-       bool                    (*crkey_to_expire)(struct rpc_cred *);
        char *                  (*crstringify_acceptor)(struct rpc_cred *);
        bool                    (*crneed_reencode)(struct rpc_task *);
 };
@@ -173,7 +160,6 @@ void                        rpc_destroy_authunix(void);
 struct rpc_cred *      rpc_lookup_cred(void);
 struct rpc_cred *      rpc_lookup_cred_nonblock(void);
 struct rpc_cred *      rpc_lookup_generic_cred(struct auth_cred *, int, gfp_t);
-struct rpc_cred *      rpc_lookup_machine_cred(const char *service_name);
 int                    rpcauth_register(const struct rpc_authops *);
 int                    rpcauth_unregister(const struct rpc_authops *);
 struct rpc_auth *      rpcauth_create(const struct rpc_auth_create_args *,
@@ -200,9 +186,6 @@ int                 rpcauth_uptodatecred(struct rpc_task *);
 int                    rpcauth_init_credcache(struct rpc_auth *);
 void                   rpcauth_destroy_credcache(struct rpc_auth *);
 void                   rpcauth_clear_credcache(struct rpc_cred_cache *);
-int                    rpcauth_key_timeout_notify(struct rpc_auth *,
-                                               struct rpc_cred *);
-bool                   rpcauth_cred_key_to_expire(struct rpc_auth *, struct rpc_cred *);
 char *                 rpcauth_stringify_acceptor(struct rpc_cred *);
 
 static inline