nfsidmap not setting key timeouts
Subsystems (2)
cover nfsidmap not setting key timeouts
These should fix up nfsidmap being unable to set key timeouts.
Benjamin Coddington (2):
nfsidmap: set the correct DEFAULT_KEYRING string
nfsidmap: Correct a failure to set key timeout values
utils/nfsidmap/nfsidmap.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
PATCH 1/2 nfsidmap: set the correct DEFAULT_KEYRING string
--- utils/nfsidmap/nfsidmap.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
utils/nfsidmap/nfsidmap.c +1 -1
@@ -25,7 +25,7 @@ char *usage="Usage: %s [-v] [-c || [-u|-g|-r key] || [-t timeout] key desc]";#define PROCKEYS "/proc/keys"#ifndef DEFAULT_KEYRING -#define DEFAULT_KEYRING "id_resolver" +#define DEFAULT_KEYRING ".id_resolver"#endif #ifndef PATH_IDMAPDCONF
Signature · 1 line
1.7.1
PATCH 2/2 nfsidmap: Correct a failure to set key timeout values
In reply to Benjamin CoddingtonThe caller must be a possesor of the key to set the attributes, so link the destination keyring to the current thread's keyring before instantiation so that after instantiation the timeout can be set.
--- utils/nfsidmap/nfsidmap.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
utils/nfsidmap/nfsidmap.c +3 -0
@@ -329,6 +329,9 @@ int main(int argc, char **argv) key, type, value, timeout); } +/* become a possesor of the to-be-instantiated key to set the key's timeout */ +request_key ("keyring" ,DEFAULT_KEYRING ,NULL ,KEY_SPEC_THREAD_KEYRING ); +if (strcmp (type,"uid" ) ==0 ) rc =id_lookup (value, key,USER );else if (strcmp (type,"gid" ) ==0 )
Signature · 1 line
1.7.1
Quoted 8 lines · Benjamin Coddington
These should fix up nfsidmap being unable to set key timeouts.
Benjamin Coddington (2):
nfsidmap: set the correctDEFAULT_KEYRINGstring
nfsidmap: Correct a failure to set key timeout values
utils/nfsidmap/nfsidmap.c| 5 ++++-1 files changed, 4 insertions(+), 1 deletions(-)
This fixed the timeout problem for me with a 3.18-rc3 kernel.
However, I still need to apply the “no state check” fix I posted last Thursday, or the keys simply expire after 10 minutes and the kernel never renews them.
http://marc.info/?l=linux-nfs&m=141469121406791&w=2
--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
Quoted 5 lines · Benjamin Coddington
These should fix up nfsidmap being unable to set key timeouts.
Benjamin Coddington (2):
nfsidmap: set the correctDEFAULT_KEYRINGstring
nfsidmap: Correct a failure to set key timeout values
Both committed...
steved.
Quoted 9 lines
utils/nfsidmap/nfsidmap.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html