summaryrefslogtreecommitdiff
path: root/usr/src/cmd/keyserv/keyserv.c
diff options
context:
space:
mode:
authorpeteh <none@none>2006-03-09 02:30:03 -0800
committerpeteh <none@none>2006-03-09 02:30:03 -0800
commita0368f78728e5fb66c5c72ecc0b76905897ca79d (patch)
tree50a1992144848a63e8d4186150fa3b898c02dbec /usr/src/cmd/keyserv/keyserv.c
parent141ae8360b129ba4ff145d9c7fd3353cc2a300f6 (diff)
downloadillumos-joyent-a0368f78728e5fb66c5c72ecc0b76905897ca79d.tar.gz
6342022 keyserv does not use /etc/.rootkey on x86
Diffstat (limited to 'usr/src/cmd/keyserv/keyserv.c')
-rw-r--r--usr/src/cmd/keyserv/keyserv.c16
1 files changed, 10 insertions, 6 deletions
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);