From a0368f78728e5fb66c5c72ecc0b76905897ca79d Mon Sep 17 00:00:00 2001 From: peteh Date: Thu, 9 Mar 2006 02:30:03 -0800 Subject: 6342022 keyserv does not use /etc/.rootkey on x86 --- usr/src/cmd/keyserv/keyserv.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'usr/src/cmd/keyserv/keyserv.c') diff --git a/usr/src/cmd/keyserv/keyserv.c b/usr/src/cmd/keyserv/keyserv.c index 0adc9e5140..1c5804142d 100644 --- a/usr/src/cmd/keyserv/keyserv.c +++ b/usr/src/cmd/keyserv/keyserv.c @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -523,8 +522,13 @@ getotherrootkeys(char *name) while (fgets_ignorenul(line, MAXROOTKEY_LINE_LEN, rootkey)) { debug(KEYSERV_DEBUG0, ("ROOTKEY %d: %s\n", count, line)); count++; - sscanf(line, "%s %d", key, &algtype); - + if (sscanf(line, "%s %d", key, &algtype) < 2) { + /* + * No encryption algorithm found in the file + * (algtype) so default to DES. + */ + algtype = AUTH_DES_ALGTYPE; + } if (!strlen(key)) continue; addmasterkey(key, name, algtype); -- cgit v1.2.3