* [PATCH] svcgssd: Encryption types not being parsed correctly
@ 2012-11-17 13:57 Steve Dickson
2012-11-19 15:53 ` Steve Dickson
0 siblings, 1 reply; 2+ messages in thread
From: Steve Dickson @ 2012-11-17 13:57 UTC (permalink / raw)
To: Linux NFS Mailing List
When svcgssd reads the supported encrytion types from the
kernel, they are prefixed with a 'enctypes='. That prefix
has to be ignored to correctly parse the rest of the types.
Signed-off-by: Steve Dickson <steved@redhat.com>
---
utils/gssd/svcgssd_krb5.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/utils/gssd/svcgssd_krb5.c b/utils/gssd/svcgssd_krb5.c
index 6c34faf..1d44d34 100644
--- a/utils/gssd/svcgssd_krb5.c
+++ b/utils/gssd/svcgssd_krb5.c
@@ -38,6 +38,7 @@
#include <stdio.h>
#include <errno.h>
+#include <ctype.h>
#include <gssapi/gssapi.h>
#include <krb5.h>
@@ -98,6 +99,12 @@ parse_enctypes(char *enctypes)
if (n == 0)
return ENOENT;
+ /* Skip pass any non digits */
+ while (*enctypes && isdigit(*enctypes) == 0)
+ enctypes++;
+ if (*enctypes == '\0')
+ return EINVAL;
+
/* Allocate space for enctypes array */
if ((parsed_enctypes = (int *) calloc(n, sizeof(int))) == NULL) {
return ENOMEM;
--
1.7.11.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] svcgssd: Encryption types not being parsed correctly
2012-11-17 13:57 [PATCH] svcgssd: Encryption types not being parsed correctly Steve Dickson
@ 2012-11-19 15:53 ` Steve Dickson
0 siblings, 0 replies; 2+ messages in thread
From: Steve Dickson @ 2012-11-19 15:53 UTC (permalink / raw)
To: Steve Dickson; +Cc: Linux NFS Mailing List
On 17/11/12 08:57, Steve Dickson wrote:
> When svcgssd reads the supported encrytion types from the
> kernel, they are prefixed with a 'enctypes='. That prefix
> has to be ignored to correctly parse the rest of the types.
>
> Signed-off-by: Steve Dickson <steved@redhat.com>
Committed...
steved.
> ---
> utils/gssd/svcgssd_krb5.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/utils/gssd/svcgssd_krb5.c b/utils/gssd/svcgssd_krb5.c
> index 6c34faf..1d44d34 100644
> --- a/utils/gssd/svcgssd_krb5.c
> +++ b/utils/gssd/svcgssd_krb5.c
> @@ -38,6 +38,7 @@
>
> #include <stdio.h>
> #include <errno.h>
> +#include <ctype.h>
> #include <gssapi/gssapi.h>
> #include <krb5.h>
>
> @@ -98,6 +99,12 @@ parse_enctypes(char *enctypes)
> if (n == 0)
> return ENOENT;
>
> + /* Skip pass any non digits */
> + while (*enctypes && isdigit(*enctypes) == 0)
> + enctypes++;
> + if (*enctypes == '\0')
> + return EINVAL;
> +
> /* Allocate space for enctypes array */
> if ((parsed_enctypes = (int *) calloc(n, sizeof(int))) == NULL) {
> return ENOMEM;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-19 15:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-17 13:57 [PATCH] svcgssd: Encryption types not being parsed correctly Steve Dickson
2012-11-19 15:53 ` Steve Dickson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.