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>
#include <stdio.h>
#include <errno.h>
+#include <ctype.h>
#include <gssapi/gssapi.h>
#include <krb5.h>
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;