]> git.pld-linux.org Git - packages/logrotate.git/blame - logrotate-selinux.patch
- patch to fix 'size' directive, which was treated as 'minsize'
[packages/logrotate.git] / logrotate-selinux.patch
CommitLineData
29c27126
ER
1--- logrotate-3.7.4/logrotate.c~ 2006-05-17 10:46:51.000000000 -0400
2+++ logrotate-3.7.4/logrotate.c 2006-08-09 18:27:42.000000000 -0400
3@@ -364,8 +364,8 @@
4 #ifdef WITH_SELINUX
5 if (selinux_enabled) {
6 security_context_t oldContext;
7- if (fgetfilecon(fdcurr, &oldContext) >= 0) {
8- if (getfscreatecon(&prev_context) < 0) {
9+ if (fgetfilecon_raw(fdcurr, &oldContext) >= 0) {
10+ if (getfscreatecon_raw(&prev_context) < 0) {
11 message(MESS_ERROR,
12 "error getting default context: %s\n",
13 strerror(errno));
14@@ -374,7 +374,7 @@
15 return 1;
16 }
17 }
18- if (setfscreatecon(oldContext) < 0) {
19+ if (setfscreatecon_raw(oldContext) < 0) {
20 message(MESS_ERROR,
21 "error setting file context %s to %s: %s\n",
22 saveLog, oldContext, strerror(errno));
23@@ -397,7 +397,7 @@
24 createOutputFile(saveLog, O_WRONLY | O_CREAT | O_TRUNC, sb);
25 #ifdef WITH_SELINUX
26 if (selinux_enabled) {
27- setfscreatecon(prev_context);
28+ setfscreatecon_raw(prev_context);
29 if (prev_context != NULL) {
30 freecon(prev_context);
31 prev_context = NULL;
32@@ -753,8 +753,8 @@
33 #ifdef WITH_SELINUX
34 if (selinux_enabled) {
35 security_context_t oldContext = NULL;
36- if (getfilecon(log->files[logNum], &oldContext) > 0) {
37- if (getfscreatecon(&prev_context) < 0) {
38+ if (getfilecon_raw(log->files[logNum], &oldContext) > 0) {
39+ if (getfscreatecon_raw(&prev_context) < 0) {
40 message(MESS_ERROR,
41 "error getting default context: %s\n",
42 strerror(errno));
43@@ -763,7 +763,7 @@
44 return 1;
45 }
46 }
47- if (setfscreatecon(oldContext) < 0) {
48+ if (setfscreatecon_raw(oldContext) < 0) {
49 message(MESS_ERROR,
50 "error setting file context %s to %s: %s\n",
51 log->files[logNum], oldContext,
52@@ -951,7 +951,7 @@
53
54 #ifdef WITH_SELINUX
55 if (selinux_enabled) {
56- setfscreatecon(prev_context);
57+ setfscreatecon_raw(prev_context);
58 if (prev_context != NULL) {
59 freecon(prev_context);
60 prev_context = NULL;
This page took 0.027637 seconds and 4 git commands to generate.