public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: "Marek Grác" <marx@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: cluster: RHEL5 - fence_apc_snmp: #498952 - product is affected by symlink attack vulnerabilities Date: Thu, 21 May 2009 15:26:00 -0000 [thread overview] Message-ID: <20090521152629.0F71E1201FA@lists.fedorahosted.org> (raw) Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=3e1ebce12b502170b1de3332cb936da21630d980 Commit: 3e1ebce12b502170b1de3332cb936da21630d980 Parent: 4d9b91ea4c230c9e10d0e510a68b3e3898132de7 Author: Marek 'marx' Grac <mgrac@redhat.com> AuthorDate: Thu May 21 17:21:59 2009 +0200 Committer: Marek 'marx' Grac <mgrac@redhat.com> CommitterDate: Thu May 21 17:21:59 2009 +0200 fence_apc_snmp: #498952 - product is affected by symlink attack vulnerabilities Another apc snmp agent in different location --- fence/agents/apc_snmp/fence_apc_snmp.py | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fence/agents/apc_snmp/fence_apc_snmp.py b/fence/agents/apc_snmp/fence_apc_snmp.py index ec9353a..c16825b 100755 --- a/fence/agents/apc_snmp/fence_apc_snmp.py +++ b/fence/agents/apc_snmp/fence_apc_snmp.py @@ -41,6 +41,8 @@ POWER_REBOOT="outletReboot" # oid defining fence device oid_sysObjectID = '.1.3.6.1.2.1.1.2.0' +verbose_filename = "" + class SNMP: @@ -228,7 +230,7 @@ def usage(): print " -c <community> SNMP community (default 'private')" print " -n <num> Outlet name/number to act on" print " -o <string> Action: Reboot (default), On, Off and Status" - print " -v Verbose mode - write to /tmp/apclog" + print " -v <filename> Verbose mode - write to file" print " -V Version" sys.exit(0) @@ -239,7 +241,7 @@ file_log = None def set_logging(verbose): global file_log if verbose: - file_log = open('/tmp/apclog', 'a') + file_log = open(verbose_filename, 'a') file_log.write('\n----------- ') file_log.write(datetime.datetime.today().ctime()) file_log.write(' -----------\n') @@ -274,7 +276,7 @@ def main2(): if len(sys.argv) > 1: try: - opts, args = getopt.getopt(sys.argv[1:], "ha:u:c:n:o:vV", ["help", "output="]) + opts, args = getopt.getopt(sys.argv[1:], "ha:u:c:n:o:v:V", ["help", "output="]) except getopt.GetoptError: usage() sys.exit(2) @@ -284,6 +286,7 @@ def main2(): a = a.strip() if o == "-v": verbose = True + verbose_filename = a if o == "-V": print "%s\n" % FENCE_RELEASE_NAME print "%s\n" % REDHAT_COPYRIGHT
next reply other threads:[~2009-05-21 15:26 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-05-21 15:26 Marek Grác [this message] -- strict thread matches above, loose matches on Subject: below -- 2009-05-21 15:49 Marek Grác 2009-05-21 14:27 Marek Grác
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090521152629.0F71E1201FA@lists.fedorahosted.org \ --to=marx@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).