From: Steve Dickson <steved@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH] nfsidmap: Keys need to be invalidated instead of revoked
Date: Tue, 25 Mar 2014 11:10:12 -0400 [thread overview]
Message-ID: <1395760212-22265-1-git-send-email-steved@redhat.com> (raw)
With some recent kernel changes to the key ring
for a key to be removed they need to be invalidated
instead of revoked.
Signed-off-by: Steve Dickson <steved@redhat.com>
---
utils/nfsidmap/nfsidmap.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/utils/nfsidmap/nfsidmap.c b/utils/nfsidmap/nfsidmap.c
index 2518ed6..3f51b4d 100644
--- a/utils/nfsidmap/nfsidmap.c
+++ b/utils/nfsidmap/nfsidmap.c
@@ -166,7 +166,7 @@ static int keyring_clear(char *keyring)
/*
* Revoke a key
*/
-static int key_revoke(char *keystr, int keymask)
+static int key_invalidate(char *keystr, int keymask)
{
FILE *fp;
char buf[BUFSIZ], *ptr;
@@ -200,7 +200,7 @@ static int key_revoke(char *keystr, int keymask)
if (verbose) {
*(strchr(buf, '\n')) = '\0';
- xlog_warn("revoking '%s'", buf);
+ xlog_warn("invalidating '%s'", buf);
}
/*
* The key is the first arugment in the string
@@ -208,8 +208,8 @@ static int key_revoke(char *keystr, int keymask)
*(strchr(buf, ' ')) = '\0';
sscanf(buf, "%x", &key);
- if (keyctl_revoke(key) < 0) {
- xlog_err("keyctl_revoke(0x%x) failed: %m", key);
+ if (keyctl_invalidate(key) < 0) {
+ xlog_err("keyctl_invalidate(0x%x) failed: %m", key);
fclose(fp);
return 1;
}
@@ -273,7 +273,7 @@ int main(int argc, char **argv)
}
}
- if (rc = nfs4_init_name_mapping(PATH_IDMAPDCONF)) {
+ if ((rc = nfs4_init_name_mapping(PATH_IDMAPDCONF))) {
xlog_errno(rc, "Unable to create name to user id mappings.");
return 1;
}
@@ -281,7 +281,7 @@ int main(int argc, char **argv)
verbose = conf_get_num("General", "Verbosity", 0);
if (keystr) {
- rc = key_revoke(keystr, keymask);
+ rc = key_invalidate(keystr, keymask);
return rc;
}
if (clearing) {
--
1.8.5.3
reply other threads:[~2014-03-25 15:24 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1395760212-22265-1-git-send-email-steved@redhat.com \
--to=steved@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).