diff options
author | Reyk Floeter <reyk@cvs.openbsd.org> | 2012-09-17 19:00:07 +0000 |
---|---|---|
committer | Reyk Floeter <reyk@cvs.openbsd.org> | 2012-09-17 19:00:07 +0000 |
commit | 2a3f22c53c7911322253014fe44722caed16f0b9 (patch) | |
tree | 9563be1028744d6a302be0fd244cc7d9a82cee8a | |
parent | 18a24d76f35229ff7a09e0491dc6872f4bf69011 (diff) |
let the debug message look like the configuration syntax
-rw-r--r-- | usr.sbin/snmpd/parse.y | 14 | ||||
-rw-r--r-- | usr.sbin/snmpd/usm.c | 7 |
2 files changed, 13 insertions, 8 deletions
diff --git a/usr.sbin/snmpd/parse.y b/usr.sbin/snmpd/parse.y index 3e73ae7452c..878a18eff01 100644 --- a/usr.sbin/snmpd/parse.y +++ b/usr.sbin/snmpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.22 2012/09/17 16:43:59 reyk Exp $ */ +/* $OpenBSD: parse.y,v 1.23 2012/09/17 19:00:06 reyk Exp $ */ /* * Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org> @@ -415,9 +415,11 @@ userspec : AUTHKEY STRING { ; auth : STRING { - if (!strcasecmp($1, "hmac-md5")) + if (strcasecmp($1, "hmac-md5") == 0 || + strcasecmp($1, "hmac-md5-96") == 0) $$ = AUTH_MD5; - else if (!strcasecmp($1, "hmac-sha1")) + else if (strcasecmp($1, "hmac-sha1") == 0 || + strcasecmp($1, "hmac-sha1-96") == 0) $$ = AUTH_SHA1; else { yyerror("syntax error, bad auth hmac"); @@ -429,9 +431,11 @@ auth : STRING { ; enc : STRING { - if (!strcasecmp($1, "des")) + if (strcasecmp($1, "des") == 0 || + strcasecmp($1, "cbc-des") == 0) $$ = PRIV_DES; - else if (!strcasecmp($1, "aes")) + else if (strcasecmp($1, "aes") == 0 || + strcasecmp($1, "cfb128-aes-128") == 0) $$ = PRIV_AES; else { yyerror("syntax error, bad encryption cipher"); diff --git a/usr.sbin/snmpd/usm.c b/usr.sbin/snmpd/usm.c index 2fb4b8d2b01..a9ee9d607f0 100644 --- a/usr.sbin/snmpd/usm.c +++ b/usr.sbin/snmpd/usm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usm.c,v 1.2 2012/09/17 17:35:55 reyk Exp $ */ +/* $OpenBSD: usm.c,v 1.3 2012/09/17 19:00:06 reyk Exp $ */ /* * Copyright (c) 2012 GeNUA mbH @@ -176,7 +176,7 @@ usm_checkuser(struct usmuser *up, const char **errp) auth = "HMAC-MD5-96"; break; case AUTH_SHA1: - auth = "HMAC-SHA-96"; + auth = "HMAC-SHA1-96"; break; } @@ -191,7 +191,8 @@ usm_checkuser(struct usmuser *up, const char **errp) priv = "CFB128-AES-128"; break; } - log_debug("USM user '%s', auth %s, enc %s", up->uu_name, auth, priv); + + log_debug("user \"%s\" auth %s enc %s", up->uu_name, auth, priv); return 0; fail: |