Commit 7618db64 authored by Mike Hibler's avatar Mike Hibler

Don't print out passwords or community strings in our debug output.

This output might wind up in a logfile somewhere.
parent 8dae5147
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2015, 2017 University of Utah and the Flux Group.
# Copyright (c) 2000-2019 University of Utah and the Flux Group.
#
# {{{EMULAB-LGPL
#
......@@ -1198,6 +1198,10 @@ sub getDeviceOptions($) {
if ($debug) {
print "Options for $switch:\n";
while (my ($key,$value) = each %options) {
# let's not willingly spit out authentication info
if ($key =~ /^(snmp_community|username|password)$/) {
$value = "<hidden>";
}
$value = "undef"
if (!defined($value));
print "$key = $value\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment