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>
This commit is contained in:
@@ -436,7 +436,7 @@ static int rsc_parse(struct cache_detail *cd,
|
||||
int id;
|
||||
int len, rv;
|
||||
struct rsc rsci, *rscp = NULL;
|
||||
time_t expiry;
|
||||
time64_t expiry;
|
||||
int status = -EINVAL;
|
||||
struct gss_api_mech *gm = NULL;
|
||||
|
||||
@@ -1221,7 +1221,7 @@ static int gss_proxy_save_rsc(struct cache_detail *cd,
|
||||
static atomic64_t ctxhctr;
|
||||
long long ctxh;
|
||||
struct gss_api_mech *gm = NULL;
|
||||
time_t expiry;
|
||||
time64_t expiry;
|
||||
int status = -EINVAL;
|
||||
|
||||
memset(&rsci, 0, sizeof(rsci));
|
||||
|
Reference in New Issue
Block a user