]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
gssd - expired credentials problem
authorLukas Hejtmanek <xhejtman@gmail.com>
Wed, 20 Mar 2013 17:24:02 +0000 (13:24 -0400)
committerSteve Dickson <steved@redhat.com>
Mon, 25 Mar 2013 14:09:09 +0000 (10:09 -0400)
I noticed that there is a problem with expired credentials if NFS
client's time is even few seconds behind KDC's or NFS server's time.
Client's kernel requests new GSS context but rpc.gssd is happy with
existing krb cache as it valid according to local time.

Signed-off-by: Steve Dickson <steved@redhat.com>
utils/gssd/krb5_util.c

index 4befa72a5b1f6fb9c496a705602e57a0e30e1f00..8178ae7ec04e0853b1f7dac32ed2adb91e72bb1e 100644 (file)
@@ -350,6 +350,11 @@ gssd_get_single_krb5_cred(krb5_context context,
 
        memset(&my_creds, 0, sizeof(my_creds));
 
+       /*
+        * Workaround for clock skew among NFS server, NFS client and KDC
+        * 300 because clock skew must be within 300sec for kerberos
+        */
+       now += 300;
        if (ple->ccname && ple->endtime > now && !nocache) {
                printerr(2, "INFO: Credentials in CC '%s' are good until %d\n",
                         ple->ccname, ple->endtime);