Skip to contentSkip to conversation

Kill SPKM3 auth method

PATCH In review Simo Sorce 2 participants 9 messages Mar 9, 2012

Subsystems (2)
lore
Share & tools
lore

Simo Sorce

author
#0 lore raw

cover Kill SPKM3 auth method

This authentication method is obsolete and it is time it dies for good.

Simo Sorce (7):
Kill SPKM3: Remove spkm3 references from svcgssd Kill SPKM3: Remove spkm3 support from gssd Kill SPKM3: remove spkm3 from common gssd code Kill SPKM3: Remove spkm3 support from nfs.mount Kill SPKM3: Remove spkm3 support from exports Kill SPKM3: Stop checking for spkm3.h in configure Kill SPKM3: Remove mentions of SPKM3 from README

 README                          |    4 +-
 configure.ac                    |    3 -
 support/include/pseudoflavors.h |    3 -
 support/nfs/exports.c           |    3 -
 utils/gssd/Makefile.am          |    1 -
 utils/gssd/context.c            |    4 -
 utils/gssd/context.h            |    2 -
 utils/gssd/context_spkm3.c      |  184 ---------------------------------------
 utils/gssd/gss_oids.c           |    3 -
 utils/gssd/gss_oids.h           |    1 -
 utils/gssd/gssd.h               |    5 +-
 utils/gssd/gssd_main_loop.c     |   11 ---
 utils/gssd/gssd_proc.c          |  106 +----------------------
 utils/gssd/svcgssd_mech2file.c  |    1 -
 utils/gssd/svcgssd_proc.c       |    8 +--
 utils/mount/nfs.man             |    7 +-
 utils/mount/nfs_mount.h         |    3 -
 utils/mount/nfsmount.c          |    6 --
 18 files changed, 10 insertions(+), 345 deletions(-)
 delete mode 100644 utils/gssd/context_spkm3.c
Signature · 1 line
1.7.7.6
author
#2 lore raw

PATCH 2/7 Kill SPKM3: Remove spkm3 support from gssd

---
 utils/gssd/gss_oids.c       |    3 -
 utils/gssd/gss_oids.h       |    1 -
 utils/gssd/gssd.h           |    5 +--
 utils/gssd/gssd_main_loop.c |   11 -----
 utils/gssd/gssd_proc.c      |  106 +-----------------------------------------
 5 files changed, 4 insertions(+), 122 deletions(-)
utils/gssd/gss_oids.c +0 -3
index a59c4a6428859ea0229252b063e0bc14164df63d..4362de26fbdcf7d23288da1b712fbd1ab0b4607b 100644
@@ -38,6 +38,3 @@
 /* from kerberos source, gssapi_krb5.c */
 gss_OID_desc krb5oid =
    {9, "\052\206\110\206\367\022\001\002\002"};
-
-gss_OID_desc spkm3oid =
-   {7, "\053\006\001\005\005\001\003"};
utils/gssd/gss_oids.h +0 -1
index 8b0a35219430ffa7711bbbdbc7ff3c37ff4ff9a0..fde8532ab3b480e5c43cf5a91abc9265b96d80aa 100644
@@ -34,7 +34,6 @@
 #include <sys/types.h>
 
 extern gss_OID_desc krb5oid;
-extern gss_OID_desc spkm3oid;
 
 #ifndef g_OID_equal
 #define g_OID_equal(o1,o2) \
utils/gssd/gssd.h +1 -4
index b1b57938c3490802ea659a5e54ca72218a806222..40f824cd19c2056f160c44764acb039a40df8f92 100644
@@ -55,7 +55,7 @@
 /*
  * The gss mechanisms that we can handle
  */
-enum {AUTHTYPE_KRB5, AUTHTYPE_SPKM3, AUTHTYPE_LIPKEY};
+enum {AUTHTYPE_KRB5, AUTHTYPE_LIPKEY};
 
 
 
@@ -80,8 +80,6 @@ struct clnt_info {
 	char			*protocol;
 	int			krb5_fd;
 	int			krb5_poll_index;
-	int			spkm3_fd;
-	int			spkm3_poll_index;
 	int                     gssd_fd;
 	int                     gssd_poll_index;
 	struct sockaddr_storage addr;
@@ -98,7 +96,6 @@ struct topdirs_info {
 void init_client_list(void);
 int update_client_list(void);
 void handle_krb5_upcall(struct clnt_info *clp);
-void handle_spkm3_upcall(struct clnt_info *clp);
 void handle_gssd_upcall(struct clnt_info *clp);
 void gssd_run(void);
 
utils/gssd/gssd_main_loop.c +0 -11
index b06c223294f2f0aadc928ba8d73d6b711e164ba0..cec09ea5b218fa6d586f5d5798e0280d4dde4125 100644
@@ -98,17 +98,6 @@ scan_poll_results(int ret)
 			if (!ret)
 				break;
 		}
-		i = clp->spkm3_poll_index;
-		if (i >= 0 && pollarray[i].revents) {
-			if (pollarray[i].revents & POLLHUP)
-				dir_changed = 1;
-			if (pollarray[i].revents & POLLIN)
-				handle_spkm3_upcall(clp);
-			pollarray[clp->spkm3_poll_index].revents = 0;
-			ret--;
-			if (!ret)
-				break;
-		}
 	}
 };
 
utils/gssd/gssd_proc.c +3 -103

182 lines not on this page · raw message

Signature · 1 line
1.7.7.6
author
#1 lore raw

PATCH 1/7 Kill SPKM3: Remove spkm3 references from svcgssd

In reply to Simo Sorce
---
 utils/gssd/svcgssd_mech2file.c |    1 -
 utils/gssd/svcgssd_proc.c      |    8 ++------
 2 files changed, 2 insertions(+), 7 deletions(-)
utils/gssd/svcgssd_mech2file.c +0 -1
index 65de8d01fedba026f35b11c4bd689f634579ef8d..a3177f6ff8ab7e0ee5eef7c830ce2c2042553c3c 100644
@@ -53,7 +53,6 @@ struct mech2file {
 
 struct mech2file m2f[] = {
 	{{9, "\052\206\110\206\367\022\001\002\002"}, "krb5"},
-	{{7, "\053\006\001\005\005\001\003"}, "spkm3"},
 	{{7, "\053\006\001\005\005\001\009"}, "lipkey"},
 	{{0,0},""},
 };
utils/gssd/svcgssd_proc.c +2 -6
index c714d99dd654aaff3b3369bebcbc0df0946284dd..0d4f78d9668396aaebb05ab97804cfb1e8d5ed5a 100644
@@ -369,12 +369,8 @@ get_hostbased_client_name(gss_name_t client_name, gss_OID mech,
 	if (g_OID_equal(&krb5oid, mech)) {
 		if (get_krb5_hostbased_name(&name, &cname) == 0)
 			*hostbased_name = cname;
-	}
-
-	/* No support for SPKM3, just print a warning (for now) */
-	if (g_OID_equal(&spkm3oid, mech)) {
-		printerr(1, "WARNING: get_hostbased_client_name: "
-			 "no hostbased_name support for SPKM3\n");
+	} else {
+		printerr(1, "WARNING: unknown/unsupport mech OID\n");
 	}
 
 	res = 0;
Signature · 1 line
1.7.7.6
author
#3 lore raw

PATCH 3/7 Kill SPKM3: remove spkm3 from common gssd code

In reply to Simo Sorce
---
 utils/gssd/Makefile.am     |    1 -
 utils/gssd/context.c       |    4 -
 utils/gssd/context.h       |    2 -
 utils/gssd/context_spkm3.c |  184 --------------------------------------------
 4 files changed, 0 insertions(+), 191 deletions(-)
 delete mode 100644 utils/gssd/context_spkm3.c
utils/gssd/Makefile.am +0 -1
index d29e132ab7191ed88ce625903c3afc651e4aca07..2365704c5db9b15d17f42b75adcb17f07f7e216f 100644
@@ -17,7 +17,6 @@ COMMON_SRCS = \
 	context_mit.c \
 	context_heimdal.c \
 	context_lucid.c \
-	context_spkm3.c \
 	gss_util.c \
 	gss_oids.c \
 	err_util.c \
utils/gssd/context.c +0 -4
index 1e50bbfd85d6073c8bea39e2ae84d36c0ee5fec9..fee7da27906e94b990fb7c49d73bf4f27a7003ac 100644
@@ -51,10 +51,6 @@ serialize_context_for_kernel(gss_ctx_id_t ctx,
 {
 	if (g_OID_equal(&krb5oid, mech))
 		return serialize_krb5_ctx(ctx, buf, endtime);
-#ifdef HAVE_SPKM3_H
-	else if (g_OID_equal(&spkm3oid, mech))
-		return serialize_spkm3_ctx(ctx, buf, endtime);
-#endif
 	else {
 		printerr(0, "ERROR: attempting to serialize context with "
 				"unknown/unsupported mechanism oid\n");
utils/gssd/context.h +0 -2
index c9cb0bd7496398e8304a1040bae8b7f30ea7d05a..0e437f4a34f0862b8f89bd0d6fe62c41a3a1c906 100644
@@ -43,8 +43,6 @@
 
 int serialize_context_for_kernel(gss_ctx_id_t ctx, gss_buffer_desc *buf,
 				 gss_OID mech, int32_t *endtime);
-int serialize_spkm3_ctx(gss_ctx_id_t ctx, gss_buffer_desc *buf,
-			int32_t *endtime);
 int serialize_krb5_ctx(gss_ctx_id_t ctx, gss_buffer_desc *buf,
 		       int32_t *endtime);
 
utils/gssd/context_spkm3.c deleted +0 -184

184 lines not on this page · raw message

Signature · 1 line
1.7.7.6
author
#4 lore raw

PATCH 4/7 Kill SPKM3: Remove spkm3 support from nfs.mount

In reply to Simo Sorce
---
 utils/mount/nfs.man     |    7 ++-----
 utils/mount/nfs_mount.h |    3 ---
 utils/mount/nfsmount.c  |    6 ------
 3 files changed, 2 insertions(+), 14 deletions(-)
utils/mount/nfs.man +2 -5
index 2ad92d1e55c7aab52c24fee64da11f6a25985999..810bfc075cb2629beedb8738f60e3f5fdf771f1e 100644
@@ -375,11 +375,8 @@ Valid security flavors are
 .BR krb5p ,
 .BR lkey ,
 .BR lkeyi ,
+and
 .BR lkeyp ,
-.BR spkm ,
-.BR spkmi ,
-and
-.BR spkmp .
 Refer to the SECURITY CONSIDERATIONS section for details.
 .TP 1.5i
 .BR sharecache " / " nosharecache
@@ -1416,7 +1413,7 @@ security flavor encrypts every RPC request
 to prevent data exposure during network transit; however,
 expect some performance impact
 when using integrity checking or encryption.
-Similar support for other forms of cryptographic security (such as lipkey and SPKM3)
+Similar support for other forms of cryptographic security (such as lipkey)
 is also available.
 .P
 The NFS version 4 protocol allows
utils/mount/nfs_mount.h +0 -3
index 2becfb1a0d655093385f47571b026124218fcf46..ec30c9b62a6da09c8671e3b8b7c995e1ef7f7e3c 100644
@@ -75,9 +75,6 @@ struct nfs_mount_data {
 #define AUTH_GSS_LKEY		390006
 #define AUTH_GSS_LKEYI		390007
 #define AUTH_GSS_LKEYP		390008
-#define AUTH_GSS_SPKM		390009
-#define AUTH_GSS_SPKMI		390010
-#define AUTH_GSS_SPKMP		390011
 #endif
 
 int	nfsmount(const char *, const char *, int , char **, int, int);
utils/mount/nfsmount.c +0 -6
index 1298fe44485789bae59cc10cf7430c2599b4f5a5..7bd1c97b291eb585221452ba865036d25e7fa8ff 100644
@@ -300,12 +300,6 @@ parse_options(char *old_opts, struct nfs_mount_data *data,
 					data->pseudoflavor = AUTH_GSS_LKEYI;
 				else if (!strcmp(secflavor, "lipkey-p"))
 					data->pseudoflavor = AUTH_GSS_LKEYP;
-				else if (!strcmp(secflavor, "spkm3"))
-					data->pseudoflavor = AUTH_GSS_SPKM;
-				else if (!strcmp(secflavor, "spkm3i"))
-					data->pseudoflavor = AUTH_GSS_SPKMI;
-				else if (!strcmp(secflavor, "spkm3p"))
-					data->pseudoflavor = AUTH_GSS_SPKMP;
 				else if (sloppy)
 					continue;
 				else {
Signature · 1 line
1.7.7.6
author
#5 lore raw

PATCH 5/7 Kill SPKM3: Remove spkm3 support from exports

In reply to Simo Sorce
---
 support/include/pseudoflavors.h |    3 ---
 support/nfs/exports.c           |    3 ---
 2 files changed, 0 insertions(+), 6 deletions(-)
support/include/pseudoflavors.h +0 -3
index c21087b9b52f9d76d12fe798c320c1d193b8a0e9..deb052b130e6ad8d1ac49693d6c71843159fc6c5 100644
@@ -4,9 +4,6 @@
 #define RPC_AUTH_GSS_LKEY       390006
 #define RPC_AUTH_GSS_LKEYI      390007
 #define RPC_AUTH_GSS_LKEYP      390008
-#define RPC_AUTH_GSS_SPKM       390009
-#define RPC_AUTH_GSS_SPKMI      390010
-#define RPC_AUTH_GSS_SPKMP      390011
 
 struct flav_info {
 	char    *flavour;
support/nfs/exports.c +0 -3
index c96500fdc73a0e09914edf6f4211703d1d84a539..6e7ed699dfda6863e1bb1c0ef7894d473232f834 100644
@@ -42,9 +42,6 @@ struct flav_info flav_map[] = {
 	{ "lipkey",	RPC_AUTH_GSS_LKEY	},
 	{ "lipkey-i",	RPC_AUTH_GSS_LKEYI	},
 	{ "lipkey-p",	RPC_AUTH_GSS_LKEYP	},
-	{ "spkm3",	RPC_AUTH_GSS_SPKM	},
-	{ "spkm3i",	RPC_AUTH_GSS_SPKMI	},
-	{ "spkm3p",	RPC_AUTH_GSS_SPKMP	},
 	{ "unix",	AUTH_UNIX		},
 	{ "sys",	AUTH_SYS		},
 	{ "null",	AUTH_NULL		},
Signature · 1 line
1.7.7.6
author
#6 lore raw

PATCH 6/7 Kill SPKM3: Stop checking for spkm3.h in configure

In reply to Simo Sorce
---
 configure.ac |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
configure.ac +0 -3
index 920e8da0216c447c1c93a017f8dea6c17043d148..67e8d2d9a2c6ec4296c96bb243202bbfea0ab4e9 100644
@@ -316,9 +316,6 @@ if test "$enable_gss" = yes; then
   dnl 'gss' also depends on nfsidmap.h - at least for svcgssd_proc.c
   AC_LIBNFSIDMAP
 
-  AC_CHECK_HEADERS([spkm3.h], ,
-                   [AC_MSG_WARN([Could not locate SPKM3 header; will not have SPKM3 support])])
-
   dnl Check for Kerberos V5
   AC_KERBEROS_V5
 
Signature · 1 line
1.7.7.6
author
#7 lore raw

PATCH 7/7 Kill SPKM3: Remove mentions of SPKM3 from README

In reply to Simo Sorce
---
 README |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
README +2 -2
index e7588cfd9337257aef27a90471c0c6935e3bc990..5c86808d3628e30c665f87501a1cd465fda5c76d 100644
@@ -80,7 +80,7 @@ scripts can be written to work correctly.
        and starting the nfsd server is not important.
        idmapd is only needed for NFSv4 support.
        svcgssd is only needed if exportfs NFS filesystem with crypto-
-       security (Kerberos or SPKM3).
+       security (Kerberos).
 
    C/ exportfs -av ; rpc.mountd
        It is important that exportfs be run before mountd so that
@@ -130,7 +130,7 @@ scripts can be written to work correctly.
    B/ gssd ; idmapd
       idmapd should be started before mounting any NFSv4 filesystems.
       gssd should be started before mounting any NFS filesystems
-      securely (with Kerberos of SPKM3).
+      securely (with Kerberos).
 
    C/ statd should be run before any NFSv2 or NFSv3 filesystem is
       mounted with remote locking (i.e. without -o nolock).
Signature · 1 line
1.7.7.6
#8 lore raw
In reply to Simo Sorce
Quoted 1 line · Simo Sorce

This authentication method is obsolete and it is time it dies for good.

Yes, the kernel no longer supports it, it was never really used, and it's now deprecated.

It might have some historical value, but someone that needs to go look at that code can find it in the git history.

So, ACK from me.--b.

Quoted 38 lines

Simo Sorce (7):
Kill SPKM3: Remove spkm3 references from svcgssd Kill SPKM3: Remove spkm3 support from gssd Kill SPKM3: remove spkm3 from common gssd code Kill SPKM3: Remove spkm3 support from nfs.mount Kill SPKM3: Remove spkm3 support from exports Kill SPKM3: Stop checking for spkm3.h in configure Kill SPKM3: Remove mentions of SPKM3 from README

 README                          |    4 +-
 configure.ac                    |    3 -
 support/include/pseudoflavors.h |    3 -
 support/nfs/exports.c           |    3 -
 utils/gssd/Makefile.am          |    1 -
 utils/gssd/context.c            |    4 -
 utils/gssd/context.h            |    2 -
 utils/gssd/context_spkm3.c      |  184 ---------------------------------------
 utils/gssd/gss_oids.c           |    3 -
 utils/gssd/gss_oids.h           |    1 -
 utils/gssd/gssd.h               |    5 +-
 utils/gssd/gssd_main_loop.c     |   11 ---
 utils/gssd/gssd_proc.c          |  106 +----------------------
 utils/gssd/svcgssd_mech2file.c  |    1 -
 utils/gssd/svcgssd_proc.c       |    8 +--
 utils/mount/nfs.man             |    7 +-
 utils/mount/nfs_mount.h         |    3 -
 utils/mount/nfsmount.c          |    6 --
 18 files changed, 10 insertions(+), 345 deletions(-)
 delete mode 100644 utils/gssd/context_spkm3.c
Signature · 6 lines
1.7.7.6

--
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