From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Daniel P. Berrange" Subject: PATCH: Remove execute permission from xend-debug.log Date: Tue, 24 Apr 2007 20:22:11 +0100 Message-ID: <20070424192211.GJ30877@redhat.com> Reply-To: "Daniel P. Berrange" Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="G4iJoqBmSsgzjUCe" Return-path: Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The file /var/log/xen/xend-debug.log is currently being created with executable permission bits set. This is because the os.open() method defaults to using a mode of 0777 if no third parameter is provided. The attached patch changes the mode to 0600 to ensure that the file permissions come out as -rw------- instead of -rwxr-xr-x Signed-off-by: Daniel P. Berrange Regards, Dan. -- |=- Red Hat, Engineering, Emerging Technologies, Boston. +1 978 392 2496 -=| |=- Perl modules: http://search.cpan.org/~danberr/ -=| |=- Projects: http://freshmeat.net/~danielpb/ -=| |=- GnuPG: 7D3B9505 F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 -=| --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="xen-log-perms.patch" diff -r 3afefd64e392 tools/python/xen/xend/server/SrvDaemon.py --- a/tools/python/xen/xend/server/SrvDaemon.py Mon Mar 26 09:13:03 2007 +0000 +++ b/tools/python/xen/xend/server/SrvDaemon.py Tue Apr 24 15:15:52 2007 -0400 @@ -118,7 +118,7 @@ class Daemon: try: parent = os.path.dirname(XEND_DEBUG_LOG) mkdir.parents(parent, stat.S_IRWXU) - fd = os.open(XEND_DEBUG_LOG, os.O_WRONLY|os.O_CREAT|os.O_APPEND) + fd = os.open(XEND_DEBUG_LOG, os.O_WRONLY|os.O_CREAT|os.O_APPEND, 0600) except Exception, exn: print >>sys.stderr, exn print >>sys.stderr, ("Xend failed to open %s. Exiting!" % --G4iJoqBmSsgzjUCe Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --G4iJoqBmSsgzjUCe--