]> git.pld-linux.org Git - packages/logrotate.git/commitdiff
- from logrotate-3.7.4-5
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 13 Sep 2006 09:32:23 +0000 (09:32 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    logrotate-selinux.patch -> 1.1

logrotate-selinux.patch [new file with mode: 0644]

diff --git a/logrotate-selinux.patch b/logrotate-selinux.patch
new file mode 100644 (file)
index 0000000..eadcdf9
--- /dev/null
@@ -0,0 +1,60 @@
+--- logrotate-3.7.4/logrotate.c~       2006-05-17 10:46:51.000000000 -0400
++++ logrotate-3.7.4/logrotate.c        2006-08-09 18:27:42.000000000 -0400
+@@ -364,8 +364,8 @@
+ #ifdef WITH_SELINUX
+       if (selinux_enabled) {
+           security_context_t oldContext;
+-          if (fgetfilecon(fdcurr, &oldContext) >= 0) {
+-              if (getfscreatecon(&prev_context) < 0) {
++          if (fgetfilecon_raw(fdcurr, &oldContext) >= 0) {
++              if (getfscreatecon_raw(&prev_context) < 0) {
+                   message(MESS_ERROR,
+                           "error getting default context: %s\n",
+                           strerror(errno));
+@@ -374,7 +374,7 @@
+                       return 1;
+                   }
+               }
+-              if (setfscreatecon(oldContext) < 0) {
++              if (setfscreatecon_raw(oldContext) < 0) {
+                   message(MESS_ERROR,
+                           "error setting file context %s to %s: %s\n",
+                           saveLog, oldContext, strerror(errno));
+@@ -397,7 +397,7 @@
+           createOutputFile(saveLog, O_WRONLY | O_CREAT | O_TRUNC, sb);
+ #ifdef WITH_SELINUX
+       if (selinux_enabled) {
+-          setfscreatecon(prev_context);
++          setfscreatecon_raw(prev_context);
+           if (prev_context != NULL) {
+               freecon(prev_context);
+               prev_context = NULL;
+@@ -753,8 +753,8 @@
+ #ifdef WITH_SELINUX
+       if (selinux_enabled) {
+           security_context_t oldContext = NULL;
+-          if (getfilecon(log->files[logNum], &oldContext) > 0) {
+-              if (getfscreatecon(&prev_context) < 0) {
++          if (getfilecon_raw(log->files[logNum], &oldContext) > 0) {
++              if (getfscreatecon_raw(&prev_context) < 0) {
+                   message(MESS_ERROR,
+                           "error getting default context: %s\n",
+                           strerror(errno));
+@@ -763,7 +763,7 @@
+                       return 1;
+                   }
+               }
+-              if (setfscreatecon(oldContext) < 0) {
++              if (setfscreatecon_raw(oldContext) < 0) {
+                   message(MESS_ERROR,
+                           "error setting file context %s to %s: %s\n",
+                           log->files[logNum], oldContext,
+@@ -951,7 +951,7 @@
+ #ifdef WITH_SELINUX
+     if (selinux_enabled) {
+-      setfscreatecon(prev_context);
++      setfscreatecon_raw(prev_context);
+       if (prev_context != NULL) {
+           freecon(prev_context);
+           prev_context = NULL;
This page took 0.0297 seconds and 4 git commands to generate.