nfs-utils/0001-nfsidmap-Keys-need-to-be-invalidated-instead-of-revo.patch
Neil Brown eb9980846b - New upstream version 1.3.0.
Includes all our bugfix patches except 1.
  Adds assorted other bugfixes and improvements including
  initial support for NFSv4.2
  Prepares the way for better systemd integration.
  Discards useless programs gss_clnt_send_err and gss_destroy_creds
- Removes: 0001-mountd-Fix-is_subdirectory-again.patch
- Removes: 0002-gssd-Fix-recent-fix-to-Avoid-DNS-reverse-resolution-.patch
- Removes: 0003-Fix-handling-of-preferred-realm-command-line-option.patch
- Removes: 0004-nfsiostat-restore-output-format.patch
- Removes: 0005-gssd-don-t-give-up-on-machine-credential-if-hostname.patch
- Removes: 0006-gssd-fixed-typo-in-machine-cred-name.patch
- Removes: skip-on-ENOENT.patch
- Removes: mountd-fix-bug-affecting-exports-of-dirs-with-64bit-.patch
- Removes: exportfs-exit-with-error-code-if-there-was-any-error.patch
- Removes: exportfs-report-failure-if-asked-to-unexport-somethi.patch
- Removes: gssd-mount-hang-fix.patch
- Removes: udp-fallback-fix.patch
- Removes: fedfs-lib-name.patch
- 0001-nfsidmap-Keys-need-to-be-invalidated-instead-of-revo.patch
 This upstream patch is currently reverted until we get a newer version
 of keyutils.

OBS-URL: https://build.opensuse.org/package/show/Base:System/nfs-utils?expand=0&rev=119
2014-05-14 02:46:47 +00:00

69 lines
2.0 KiB
Diff

From 2ae0763a618d30037ebb2520f6292f80d838a440 Mon Sep 17 00:00:00 2001
From: Steve Dickson <steved@redhat.com>
Date: Tue, 25 Mar 2014 10:56:58 -0400
Subject: [PATCH] nfsidmap: Keys need to be invalidated instead of revoked
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 2518ed6b022b..3f51b4d4ca1b 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.3.1.487.g3e7a5b4