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: RHEL4 - fence_apc_snmp: #498983 - affected by symlink vulnerabilities
Date: Fri, 26 Jun 2009 10:52:00 -0000	[thread overview]
Message-ID: <20090626105158.D2CED120380@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=7868c811ac968bc973ab452f5bcf1676d65565bd
Commit:        7868c811ac968bc973ab452f5bcf1676d65565bd
Parent:        e92d478d1d309c329e628997f746e7cda65fd1e6
Author:        Marek 'marx' Grac <mgrac@redhat.com>
AuthorDate:    Fri Jun 26 12:46:21 2009 +0200
Committer:     Marek 'marx' Grac <mgrac@redhat.com>
CommitterDate: Fri Jun 26 12:46:21 2009 +0200

fence_apc_snmp: #498983 - affected by symlink vulnerabilities

Option -v for verbose mode now expects filename
---
 fence/agents/apc_snmp/fence_apc_snmp.py |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/fence/agents/apc_snmp/fence_apc_snmp.py b/fence/agents/apc_snmp/fence_apc_snmp.py
index 9069461..3078a9e 100755
--- a/fence/agents/apc_snmp/fence_apc_snmp.py
+++ b/fence/agents/apc_snmp/fence_apc_snmp.py
@@ -229,7 +229,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)
@@ -237,10 +237,10 @@ def usage():
 
 
 file_log = None
-def set_logging(verbose):
+def set_logging(verbose, verbose_filename):
 	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')
@@ -275,7 +275,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)
@@ -285,6 +285,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
@@ -324,7 +325,7 @@ def main2():
 	    params[o] = a 
 	
     
-  set_logging(verbose)
+  set_logging(verbose, verbose_filename)
   
   
   ### validation ###


                 reply	other threads:[~2009-06-26 10:52 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090626105158.D2CED120380@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: link
Be 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).