rpms/logrotate/devel logrotate-selinux.patch, NONE, 1.1 logrotate.spec, 1.49, 1.50
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Aug 10 00:50:13 UTC 2006
- Previous message (by thread): rpms/SysVinit/devel sysvinit-2.86-timeval.patch, NONE, 1.1 SysVinit.spec, 1.48, 1.49
- Next message (by thread): rpms/kernel/devel git-gregkh.patch, 1.2, 1.3 kernel-2.6.spec, 1.2542, 1.2543 linux-2.6-compile-fixes.patch, 1.98, 1.99 linux-2.6-ide-missing-bits.patch, 1.1, NONE linux-2.6-random-patches.patch, 1.19, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: dwalsh
Update of /cvs/dist/rpms/logrotate/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv10637
Modified Files:
logrotate.spec
Added Files:
logrotate-selinux.patch
Log Message:
* Wed Aug 9 2006 Dan Walsh <dwalsh at redhat.com> 3.7.4-5
- Use selinux raw functions
logrotate-selinux.patch:
logrotate.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
--- NEW FILE logrotate-selinux.patch ---
--- 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;
Index: logrotate.spec
===================================================================
RCS file: /cvs/dist/rpms/logrotate/devel/logrotate.spec,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- logrotate.spec 24 Jul 2006 12:18:42 -0000 1.49
+++ logrotate.spec 10 Aug 2006 00:50:09 -0000 1.50
@@ -1,15 +1,14 @@
-%if %{?WITH_SELINUX:0}%{!?WITH_SELINUX:1}
-%define WITH_SELINUX 1
-BuildRequires: libselinux-devel
-%endif
Summary: Rotates, compresses, removes and mails system log files.
Name: logrotate
Version: 3.7.4
-Release: 4
+Release: 5
License: GPL
Group: System Environment/Base
Source: logrotate-%{PACKAGE_VERSION}.tar.gz
+Patch: logrotate-selinux.patch
+
BuildRoot: %{_tmppath}/%{name}-%{version}.root
+BuildRequires: libselinux-devel
%description
The logrotate utility is designed to simplify the administration of
@@ -24,12 +23,11 @@
%prep
%setup
+%patch -p1 -b .rhat
%build
make RPM_OPT_FLAGS="$RPM_OPT_FLAGS -g" \
-%if %{WITH_SELINUX}
WITH_SELINUX=yes
-%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -56,6 +54,9 @@
%attr(0644, root, root) %verify(not size md5 mtime) %config(noreplace) /var/lib/logrotate.status
%changelog
+* Wed Aug 9 2006 Dan Walsh <dwalsh at redhat.com> 3.7.4-5
+- Use selinux raw functions
+
* Mon Jul 24 2006 Peter Vrabec <pvrabec at redhat.com> 3.7.4-4
- make error message, about ignoring certain config files,
a debug message instead (#196052)
- Previous message (by thread): rpms/SysVinit/devel sysvinit-2.86-timeval.patch, NONE, 1.1 SysVinit.spec, 1.48, 1.49
- Next message (by thread): rpms/kernel/devel git-gregkh.patch, 1.2, 1.3 kernel-2.6.spec, 1.2542, 1.2543 linux-2.6-compile-fixes.patch, 1.98, 1.99 linux-2.6-ide-missing-bits.patch, 1.1, NONE linux-2.6-random-patches.patch, 1.19, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list