NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/57279: 32 bit time_t leftover in NFS code
The following reply was made to PR kern/57279; it has been noted by GNATS.
From: mlelstv%serpens.de@localhost (Michael van Elst)
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: kern/57279: 32 bit time_t leftover in NFS code
Date: Tue, 21 Mar 2023 15:02:45 -0000 (UTC)
tsutsui%ceres.dti.ne.jp@localhost (Izumi Tsutsui) writes:
>There are calculations that use int or long for time_t time_second
>or tv_sec in src/sys/nfs.
>===================================================================
>RCS file: /cvsroot/src/sys/nfs/nfs_iod.c,v
>retrieving revision 1.8
>diff -u -p -d -r1.8 nfs_iod.c
>--- sys/nfs/nfs_iod.c 3 Sep 2018 16:29:36 -0000 1.8
>+++ sys/nfs/nfs_iod.c 21 Mar 2023 14:09:19 -0000
>@@ -409,7 +409,8 @@ nfs_savenickauth(struct nfsmount *nmp, k
> struct timeval ktvin, ktvout;
> u_int32_t nick;
> char *dpos = *dposp, *cp2;
>- int deltasec, error = 0;
>+ time_t deltasec;
>+ int error = 0;
>
> memset(&ktvout, 0, sizeof ktvout); /* XXX gcc */
That part doesn't look sufficient. The code is working with 32bit
timestamps and probably needs some rewrite to operate correctly
with 64bit timestamps.
On the other hand, the kerberos code looks broken and was written
for KERB4. It needs to be removed or replaced with RPCSEC_GSS code.
Home |
Main Index |
Thread Index |
Old Index