* [PATCH 1/2] nfsidmap: set the correct DEFAULT_KEYRING string
2014-11-03 17:49 [PATCH 0/2] nfsidmap not setting key timeouts Benjamin Coddington
@ 2014-11-03 17:49 ` Benjamin Coddington
2014-11-03 17:49 ` [PATCH 2/2] nfsidmap: Correct a failure to set key timeout values Benjamin Coddington
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Benjamin Coddington @ 2014-11-03 17:49 UTC (permalink / raw)
To: linux-nfs; +Cc: chuck.lever
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
---
utils/nfsidmap/nfsidmap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/utils/nfsidmap/nfsidmap.c b/utils/nfsidmap/nfsidmap.c
index 96149cc..4da7f5c 100644
--- a/utils/nfsidmap/nfsidmap.c
+++ b/utils/nfsidmap/nfsidmap.c
@@ -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
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/2] nfsidmap: Correct a failure to set key timeout values
2014-11-03 17:49 [PATCH 0/2] nfsidmap not setting key timeouts Benjamin Coddington
2014-11-03 17:49 ` [PATCH 1/2] nfsidmap: set the correct DEFAULT_KEYRING string Benjamin Coddington
@ 2014-11-03 17:49 ` Benjamin Coddington
2014-11-03 20:43 ` [PATCH 0/2] nfsidmap not setting key timeouts Chuck Lever
2014-11-04 19:49 ` Steve Dickson
3 siblings, 0 replies; 5+ messages in thread
From: Benjamin Coddington @ 2014-11-03 17:49 UTC (permalink / raw)
To: linux-nfs; +Cc: chuck.lever
The 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.
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
---
utils/nfsidmap/nfsidmap.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/utils/nfsidmap/nfsidmap.c b/utils/nfsidmap/nfsidmap.c
index 4da7f5c..b141f9e 100644
--- a/utils/nfsidmap/nfsidmap.c
+++ b/utils/nfsidmap/nfsidmap.c
@@ -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)
--
1.7.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH 0/2] nfsidmap not setting key timeouts
2014-11-03 17:49 [PATCH 0/2] nfsidmap not setting key timeouts Benjamin Coddington
2014-11-03 17:49 ` [PATCH 1/2] nfsidmap: set the correct DEFAULT_KEYRING string Benjamin Coddington
2014-11-03 17:49 ` [PATCH 2/2] nfsidmap: Correct a failure to set key timeout values Benjamin Coddington
@ 2014-11-03 20:43 ` Chuck Lever
2014-11-04 19:49 ` Steve Dickson
3 siblings, 0 replies; 5+ messages in thread
From: Chuck Lever @ 2014-11-03 20:43 UTC (permalink / raw)
To: Benjamin Coddington; +Cc: Linux NFS Mailing List
On Nov 3, 2014, at 12:49 PM, Benjamin Coddington <bcodding@redhat.com> wrote:
> 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(-)
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 0/2] nfsidmap not setting key timeouts
2014-11-03 17:49 [PATCH 0/2] nfsidmap not setting key timeouts Benjamin Coddington
` (2 preceding siblings ...)
2014-11-03 20:43 ` [PATCH 0/2] nfsidmap not setting key timeouts Chuck Lever
@ 2014-11-04 19:49 ` Steve Dickson
3 siblings, 0 replies; 5+ messages in thread
From: Steve Dickson @ 2014-11-04 19:49 UTC (permalink / raw)
To: Benjamin Coddington, linux-nfs; +Cc: chuck.lever
On 11/03/2014 12:49 PM, Benjamin Coddington wrote:
> 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
Both committed...
steved.
>
> 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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread