rpms/logrotate/devel logrotate-3.7.7-curdir.patch, NONE, 1.1 logrotate.spec, 1.74, 1.75
Daniel Novotny
dnovotny at fedoraproject.org
Thu Nov 20 13:56:23 UTC 2008
- Previous message (by thread): rpms/obexd/devel .cvsignore, 1.4, 1.5 obexd.spec, 1.3, 1.4 sources, 1.4, 1.5
- Next message (by thread): rpms/obexd/F-10 .cvsignore, 1.4, 1.5 obexd.spec, 1.3, 1.4 sources, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: dnovotny
Update of /cvs/extras/rpms/logrotate/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv31366
Modified Files:
logrotate.spec
Added Files:
logrotate-3.7.7-curdir.patch
Log Message:
fix #471463
logrotate-3.7.7-curdir.patch:
--- NEW FILE logrotate-3.7.7-curdir.patch ---
diff -up logrotate-3.7.7/config.c.curdir logrotate-3.7.7/config.c
--- logrotate-3.7.7/config.c.curdir 2008-11-20 14:50:29.000000000 +0100
+++ logrotate-3.7.7/config.c 2008-11-20 14:51:35.000000000 +0100
@@ -301,7 +301,7 @@ static void freeTailLogs(int num)
static int readConfigPath(const char *path, struct logInfo *defConfig)
{
struct stat sb;
- int here, oldnumlogs, result = 1;
+ int oldnumlogs, result = 1;
struct logInfo defConfigBackup;
if (stat(path, &sb)) {
@@ -315,17 +315,10 @@ static int readConfigPath(const char *pa
int files_count, i;
DIR *dirp;
- here = open(".", O_RDONLY);
- if (here < 0) {
- message(MESS_ERROR, "cannot open current directory: %s\n",
- strerror(errno));
- return 1;
- }
if ((dirp = opendir(path)) == NULL) {
message(MESS_ERROR, "cannot open directory %s: %s\n", path,
strerror(errno));
- close(here);
return 1;
}
files_count = 0;
@@ -344,7 +337,6 @@ static int readConfigPath(const char *pa
} else {
free_2d_array(namelist, files_count);
closedir(dirp);
- close(here);
message(MESS_ERROR, "cannot realloc: %s\n",
strerror(errno));
return 1;
@@ -358,7 +350,6 @@ static int readConfigPath(const char *pa
} else {
free_2d_array(namelist, files_count);
closedir(dirp);
- close(here);
message(MESS_ERROR, "cannot realloc: %s\n",
strerror(errno));
return 1;
@@ -370,14 +361,12 @@ static int readConfigPath(const char *pa
if (files_count > 0) {
qsort(namelist, files_count, sizeof(char *), compar);
} else {
- close(here);
return 0;
}
if (chdir(path)) {
message(MESS_ERROR, "error in chdir(\"%s\"): %s\n", path,
strerror(errno));
- close(here);
free_2d_array(namelist, files_count);
return 1;
}
@@ -399,8 +388,7 @@ static int readConfigPath(const char *pa
freeLogInfo(&defConfigBackup);
}
- fchdir(here);
- close(here);
+ chdir(".");
free_2d_array(namelist, files_count);
} else {
oldnumlogs = numLogs;
Index: logrotate.spec
===================================================================
RCS file: /cvs/extras/rpms/logrotate/devel/logrotate.spec,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -r1.74 -r1.75
--- logrotate.spec 19 May 2008 10:30:05 -0000 1.74
+++ logrotate.spec 20 Nov 2008 13:55:53 -0000 1.75
@@ -1,10 +1,11 @@
Summary: Rotates, compresses, removes and mails system log files
Name: logrotate
Version: 3.7.7
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPL+
Group: System Environment/Base
Source: https://fedorahosted.org/releases/l/o/logrotate/logrotate-%{version}.tar.gz
+Patch1: logrotate-3.7.7-curdir.patch
Requires: coreutils >= 5.92 libsepol libselinux popt
BuildRequires: libselinux-devel popt-devel
@@ -23,6 +24,7 @@
%prep
%setup -q
+%patch1 -p1 -b .curdir
%build
make %{?_smp_mflags} RPM_OPT_FLAGS="$RPM_OPT_FLAGS" WITH_SELINUX=yes
@@ -52,6 +54,9 @@
%attr(0644, root, root) %verify(not size md5 mtime) %config(noreplace) %{_localstatedir}/lib/logrotate.status
%changelog
+* Thu Nov 20 2008 Daniel Novotny <dnovotny at redhat.com> 3.7.7-2
+- fix #471463 (selinux problems with logrotate)
+
* Mon May 19 2008 Tomas Smetana <tsmetana at redhat.com> 3.7.7-1
- new upstream version
- Previous message (by thread): rpms/obexd/devel .cvsignore, 1.4, 1.5 obexd.spec, 1.3, 1.4 sources, 1.4, 1.5
- Next message (by thread): rpms/obexd/F-10 .cvsignore, 1.4, 1.5 obexd.spec, 1.3, 1.4 sources, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list