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 690079 Details for
Bug 881577
SELinux is preventing /usr/lib/systemd/systemd-timedated from 'create' accesses on the file .adjtime72IeZW.
[?]
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]
This patch tells SELinux to create /etc/adjtime with the proper label
timedated-label.patch (text/plain), 2.68 KB, created by
Daniel Walsh
on 2013-01-29 23:30:50 UTC
(
hide
)
Description:
This patch tells SELinux to create /etc/adjtime with the proper label
Filename:
MIME Type:
Creator:
Daniel Walsh
Created:
2013-01-29 23:30:50 UTC
Size:
2.68 KB
patch
obsolete
>commit e229f59e3a6bca70650079fe5dee9a190ce0e339 >Author: Dan Walsh <dwalsh@redhat.com> >Date: Tue Jan 29 18:26:11 2013 -0500 > > Tell SELinux to create /etc/adjtime with the proper label > >diff --git a/Makefile.am b/Makefile.am >index 8d10144..cf6728b 100644 >--- a/Makefile.am >+++ b/Makefile.am >@@ -3364,6 +3364,7 @@ systemd_timedated_CFLAGS = \ > > systemd_timedated_LDADD = \ > libsystemd-shared.la \ >+ libsystemd-label.la \ > libsystemd-daemon.la \ > libsystemd-dbus.la > >diff --git a/src/shared/util.c b/src/shared/util.c >index 04366ff..969ef2b 100644 >--- a/src/shared/util.c >+++ b/src/shared/util.c >@@ -522,16 +522,11 @@ int get_starttime_of_pid(pid_t pid, unsigned long long *st) { > > int write_one_line_file(const char *fn, const char *line) { > _cleanup_fclose_ FILE *f = NULL; >- int r; > > assert(fn); > assert(line); > >- r = label_context_set(fn, S_IFREG); >- if (r < 0) >- return r; > f = fopen(fn, "we"); >- label_context_clear(void); > if (!f) > return -errno; > >@@ -4143,7 +4138,6 @@ int fopen_temporary(const char *path, FILE **_f, char **_temp_path) { > const char *fn; > size_t k; > int fd; >- int r; > > assert(path); > assert(_f); >@@ -4159,13 +4153,7 @@ int fopen_temporary(const char *path, FILE **_f, char **_temp_path) { > t[k] = '.'; > stpcpy(stpcpy(t+k+1, fn), "XXXXXX"); > >- r = label_context_set(path, S_IFREG); >- if (r < 0) { >- free (t); >- return r; >- } > fd = mkostemp(t, O_WRONLY|O_CLOEXEC); >- label_context_clear(); > if (fd < 0) { > free(t); > return -errno; >diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c >index f5430e9..748fdb9 100644 >--- a/src/timedate/timedated.c >+++ b/src/timedate/timedated.c >@@ -35,6 +35,7 @@ > #include "hwclock.h" > #include "conf-files.h" > #include "path-util.h" >+#include "label.h" > > #define NULL_ADJTIME_UTC "0.0 0 0\n0\nUTC\n" > #define NULL_ADJTIME_LOCAL "0.0 0 0\n0\nLOCAL\n" >@@ -270,7 +271,11 @@ static int write_data_local_rtc(void) { > } > } > >- r = write_one_line_file_atomic("/etc/adjtime", w); >+ r = label_context_set("/etc/adjtime", S_IFREG); >+ if (r >= 0) { >+ r = write_one_line_file_atomic("/etc/adjtime", w); >+ label_context_clear(); >+ } > free(w); > > return r; >@@ -959,6 +964,7 @@ int main(int argc, char *argv[]) { > log_open(); > > umask(0022); >+ label_init("/etc"); > > if (argc == 2 && streq(argv[1], "--introspect")) { > fputs(DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE
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 881577
:
654005
|
654006
| 690079 |
690424