mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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:
parent
38c4a4cf02
commit
294ec5b87a
8 changed files with 30 additions and 24 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue