summaryrefslogtreecommitdiff
path: root/net/sunrpc/auth_gss/gss_mech_switch.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2018-06-07 17:02:50 +0200
committerArnd Bergmann <arnd@arndb.de>2019-12-18 18:07:32 +0100
commit294ec5b87a8aaef664efb00ba62e4ef6ca05707c (patch)
tree6c8a255b395355575414db315586c25b225296ec /net/sunrpc/auth_gss/gss_mech_switch.c
parent38c4a4cf02513a7904b9db0a668b7e50145ea696 (diff)
downloadlinux-294ec5b87a8aaef664efb00ba62e4ef6ca05707c.tar.gz
linux-294ec5b87a8aaef664efb00ba62e4ef6ca05707c.tar.bz2
linux-294ec5b87a8aaef664efb00ba62e4ef6ca05707c.zip
sunrpc: convert to time64_t for expiry
Using signed 32-bit types for UTC time leads to the y2038 overflow, which is what happens in the sunrpc code at the moment. This changes the sunrpc code over to use time64_t where possible. The one exception is the gss_import_v{1,2}_context() function for kerberos5, which uses 32-bit timestamps in the protocol. Here, we can at least treat the numbers as 'unsigned', which extends the range from 2038 to 2106. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'net/sunrpc/auth_gss/gss_mech_switch.c')
-rw-r--r--net/sunrpc/auth_gss/gss_mech_switch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/auth_gss/gss_mech_switch.c b/net/sunrpc/auth_gss/gss_mech_switch.c
index 30b7de6f3d76..d3685d4ed9e0 100644
--- a/net/sunrpc/auth_gss/gss_mech_switch.c
+++ b/net/sunrpc/auth_gss/gss_mech_switch.c
@@ -376,7 +376,7 @@ int
gss_import_sec_context(const void *input_token, size_t bufsize,
struct gss_api_mech *mech,
struct gss_ctx **ctx_id,
- time_t *endtime,
+ time64_t *endtime,
gfp_t gfp_mask)
{
if (!(*ctx_id = kzalloc(sizeof(**ctx_id), gfp_mask)))