Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 658907 Details for
Bug 836984
/var/log/osad is created with wrong permission
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch proposed
0001-836984-fixes-the-permissions-on-var-log-osad-log-fil.patch (text/plain), 1.52 KB, created by
Marcelo Moreira de Mello
on 2012-12-06 17:46:09 UTC
(
hide
)
Description:
Patch proposed
Filename:
MIME Type:
Creator:
Marcelo Moreira de Mello
Created:
2012-12-06 17:46:09 UTC
Size:
1.52 KB
patch
obsolete
>From: Marcelo Moreira de Mello <mmello@redhat.com> >Date: Thu, 6 Dec 2012 15:33:55 -0200 >Subject: [PATCH] 836984 - fixes the permissions on /var/log/osad log file > >--- > client/tools/osad/osad.spec | 7 +++++++ > client/tools/osad/src/rhn_log.py | 7 +++---- > 2 files changed, 10 insertions(+), 4 deletions(-) > >diff --git a/client/tools/osad/osad.spec b/client/tools/osad/osad.spec >index 57014b7..eaa0a8e 100644 >--- a/client/tools/osad/osad.spec >+++ b/client/tools/osad/osad.spec >@@ -276,6 +276,13 @@ rpm -ql osa-dispatcher | xargs -n 1 /sbin/restorecon -rvi {} > /sbin/restorecon -vvi /var/log/rhn/osa-dispatcher.log > %endif > >+# Fix the /var/log/osad permission BZ 836984 >+%post >+if [ -f %{_var}/log/osad ]; then >+ /bin/chmod 600 %{_var}/log/osad >+fi >+%endif >+ > %files > %dir %{rhnroot}/osad > %attr(755,root,root) %{_sbindir}/osad >diff --git a/client/tools/osad/src/rhn_log.py b/client/tools/osad/src/rhn_log.py >index 7b23501..0b1f85d 100644 >--- a/client/tools/osad/src/rhn_log.py >+++ b/client/tools/osad/src/rhn_log.py >@@ -39,10 +39,9 @@ class Logger: > > if not Logger.logfile is None: > try: >- file = open( Logger.logfile, 'a' ) >- os.chmod(Logger.logfile, 0600) >- file.write( outstring ) >- file.close() >+ fd = os.open(Logger.logfile, os.O_APPEND | os.O_RDWR | os.O_CREAT, 0600) >+ os.write(fd, outstring) >+ os.close() > except IOError: > raise > >-- >1.8.0.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 836984
:
658907
|
658931
|
659532