Your message dated Thu, 28 Jul 2005 02:47:13 -0700
with message-id <[EMAIL PROTECTED]>
and subject line Bug#193601: fixed in logrotate 3.7.1-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 16 May 2003 21:32:07 +0000
>From [EMAIL PROTECTED] Fri May 16 16:32:05 2003
Return-path: <[EMAIL PROTECTED]>
Received: from dsl-213-023-218-087.arcor-ip.net (datas-world.dyndns.org) 
[213.23.218.87] 
        by master.debian.org with esmtp (Exim 3.12 1 (Debian))
        id 19Gmo8-0007AW-00; Fri, 16 May 2003 16:32:04 -0500
Received: from localhost (localhost [127.0.0.1])
  (uid 1000)
  by datas-world.dyndns.org with local; Fri, 16 May 2003 23:31:32 +0200
Content-Type: multipart/mixed; boundary="===============4544083340831917=="
MIME-Version: 1.0
From: Torsten Knodt <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: Please apply this SE Linux patch
X-Mailer: reportbug 2.10.1
Date: Fri, 16 May 2003 23:31:32 +0200
Message-ID: <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
X-Spam-Status: No, hits=-18.0 required=4.0
        tests=BAYES_01,HAS_PACKAGE,PATCH_UNIFIED_DIFF,PGP_SIGNATURE
        autolearn=ham version=2.53-bugs.debian.org_2003_05_09
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_05_09 
(1.174.2.15-2003-03-30-exp)

This is a multi-part MIME message sent by reportbug.

--===============4544083340831917==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: logrotate
Version: unavailable; reported 2003-05-16
Severity: wishlist
Tags: upstream sid patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,
please apply this patch for SE Linux support. It is based on the patch of
Russell Coker <[EMAIL PROTECTED]>. It has support to only use
libselinux-dev for i386, as it is the only architecture so far, for which it
is avalaible.
It also corrects all lintian errors.
Until you apply it, I will keep the package apt-getable via
deb http://www.datas-world.de/linux/debian/apt $DIST main non-free contrib

With kind regards
        Torsten

- -- System Information:
Debian Release: testing/unstable
Architecture: sh: line 1: /usr/bin/dpkg: Permission denied
Kernel: Linux tk-hybrid-1 2.4.20 #4 Son Mai 4 12:23:33 CEST 2003 i586
Locale: LANG=C, LC_CTYPE=C

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE+xVi0X1/CjdwsodIRApRJAKCTHxAsMZSPuMbrZu8ObmaTDIdlKACfXMzl
KpisluJ8nakw3qOGZRMvOnM=
=+0lg
-----END PGP SIGNATURE-----

--===============4544083340831917==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="logrotate-3.6.5.diff"

diff -uiwbBrN plain/logrotate-3.6.5/debian/control 
included/logrotate-3.6.5/debian/control
--- plain/logrotate-3.6.5/debian/control        2003-05-16 21:06:53.000000000 
+0200
+++ included/logrotate-3.6.5/debian/control     2003-05-16 21:23:44.000000000 
+0200
@@ -2,8 +2,8 @@
 Section: admin
 Priority: important
 Maintainer: Paul Martin <[EMAIL PROTECTED]>
-Build-Depends: libpopt-dev, debhelper (>> 3.0.0)
-Standards-Version: 3.5.6
+Build-Depends: libpopt-dev, debhelper (>> 3.0.0), libselinux-dev [ i386 ]
+Standards-Version: 3.5.9
 
 Package: logrotate
 Architecture: any
diff -uiwbBrN plain/logrotate-3.6.5/debian/logrotate.copyright 
included/logrotate-3.6.5/debian/logrotate.copyright
--- plain/logrotate-3.6.5/debian/logrotate.copyright    2003-05-16 
21:06:53.000000000 +0200
+++ included/logrotate-3.6.5/debian/logrotate.copyright 2003-05-16 
21:23:37.000000000 +0200
@@ -10,3 +10,5 @@
 Upstream Authors are various RedHat people.
 
 Copyright: GPL
+
+For the full text see /usr/share/common-licenses/GPL
diff -uiwbBrN plain/logrotate-3.6.5/logrotate.c 
included/logrotate-3.6.5/logrotate.c
--- plain/logrotate-3.6.5/logrotate.c   2003-05-16 21:06:53.000000000 +0200
+++ included/logrotate-3.6.5/logrotate.c        2003-05-16 21:02:03.000000000 
+0200
@@ -11,6 +11,11 @@
 #include <time.h>
 #include <unistd.h>
 
+#ifdef CONFIG_FLASK
+#include <flask_util.h>
+#include <fs_secure.h>
+#endif
+
 #include "basenames.h"
 #include "log.h"
 #include "logrotate.h"
@@ -20,6 +25,9 @@
     struct tm lastRotated;     /* only tm.mon, tm_mday, tm_year are good! */
     struct stat sb;
     int doRotate;
+#ifdef CONFIG_FLASK
+     security_id_t sid;
+#endif
 } logState;
 
 #define NO_MODE ((mode_t) -1)
@@ -47,6 +55,9 @@
        states[i].fn = strdup(fn);
        memset(&states[i].lastRotated, 0, sizeof(states[i].lastRotated));
        states[i].doRotate = 0;
+#ifdef CONFIG_FLASK
+       states[i].sid = 0;
+#endif
 
        states[i].lastRotated.tm_mon = now.tm_mon;
        states[i].lastRotated.tm_mday = now.tm_mday;
@@ -111,7 +122,11 @@
     return rc;
 }
 
+#ifdef CONFIG_FLASK
+static int copyTruncate(char * currLog, char * saveLog, struct stat * sb, int 
flags, security_id_t oldSid) {
+#else
 static int copyTruncate(char * currLog, char * saveLog, struct stat * sb, int 
flags) {
+#endif
     char buf[BUFSIZ];
     int fdcurr = -1, fdsave = -1;
     ssize_t cnt;
@@ -124,8 +139,18 @@
                strerror(errno));
            return 1;
        }
+#ifdef CONFIG_FLASK
+       if (is_flask_enabled())
+               fdsave = open_secure(saveLog, O_WRONLY | O_CREAT | O_TRUNC,
+                                    sb->st_mode, oldSid);
+       else
+               fdsave = open(saveLog, O_WRONLY | O_CREAT | O_TRUNC,
+                             sb->st_mode);
+       if (fdsave < 0) {
+#else
        if ((fdsave = open(saveLog, O_WRONLY | O_CREAT | O_TRUNC,
                sb->st_mode)) < 0) {
+#endif
            message(MESS_ERROR, "error creating %s: %s\n", saveLog,
                strerror(errno));
            close(fdcurr);
@@ -199,10 +224,22 @@
     struct stat sb;
     logState * state = NULL;
     struct tm now = *localtime(&nowSecs);
+#ifdef CONFIG_FLASK
+    security_id_t oldSid;
+    int rc;
+#endif
     
     message(MESS_DEBUG, "considering log %s\n", log->files[logNum]);
     
+#ifdef CONFIG_FLASK
+    if (is_flask_enabled())
+           rc = stat_secure(log->files[logNum], &sb, &oldSid);
+    else
+           rc = stat(log->files[logNum], &sb);
+    if (rc) {
+#else    
     if (stat(log->files[logNum], &sb)) {
+#endif
         if ((log->flags & LOG_FLAG_MISSINGOK) && (errno == ENOENT)) {
             message(MESS_DEBUG, "  log %s does not exist -- skipping\n", 
                     log->files[logNum]);
@@ -216,6 +253,9 @@
     state = findState(log->files[logNum], statesPtr, numStatesPtr);
     state->doRotate = 0;
     state->sb = sb;
+#ifdef CONFIG_FLASK
+    state->sid = oldSid;
+#endif
 
     if (log->criterium == ROT_SIZE) {
         state->doRotate = (sb.st_size >= log->threshhold);
@@ -375,7 +415,7 @@
     sprintf(firstRotated, "%s/%s.%d%s%s", dirName, baseName,
             logStart, fileext, compext);
     
-    for (i = rotateCount + logStart; (i >= 0) && !hasErrors; i--) {
+    for (i = rotateCount + logStart - 1; (i >= 0) && !hasErrors; i--) {
         tmp = newName;
         newName = oldName;
         oldName = tmp;
@@ -461,7 +501,14 @@
                     "gid = %d\n", createMode, createUid, createGid);
            
             if (!debug) {
+#ifdef CONFIG_FLASK
+                   if (is_flask_enabled())
+                           fd = open_secure(log->files[logNum], O_CREAT | 
O_RDWR, createMode, state->sid);
+                   else
+                           fd = open(log->files[logNum], O_CREAT | O_RDWR, 
createMode);
+#else
                 fd = open(log->files[logNum], O_CREAT | O_RDWR, createMode);
+#endif
                 if (fd < 0) {
                     message(MESS_ERROR, "error creating %s: %s\n", 
                             log->files[logNum], strerror(errno));
@@ -492,8 +539,13 @@
         }
        
         if (!hasErrors && log->flags & (LOG_FLAG_COPYTRUNCATE|LOG_FLAG_COPY))
+#ifdef CONFIG_FLASK
+            hasErrors = copyTruncate(log->files[logNum], finalName,
+                                     &state->sb, log->flags, state->sid);
+#else
             hasErrors = copyTruncate(log->files[logNum], finalName,
                                      &state->sb, log->flags);
+#endif
        
         if (!hasErrors && log->post && 
            !(log->flags & LOG_FLAG_SHAREDSCRIPTS)) {
diff -uiwbBrN plain/logrotate-3.6.5/Makefile included/logrotate-3.6.5/Makefile
--- plain/logrotate-3.6.5/Makefile      2002-08-03 11:47:41.000000000 +0200
+++ included/logrotate-3.6.5/Makefile   2003-05-16 21:20:52.000000000 +0200
@@ -1,3 +1,4 @@
+LIBSEC = $(shell ls /usr/lib/libsecure.a 2>/dev/null)
 VERSION = $(shell awk '/Version:/ { print $$2 }' logrotate.spec)
 CVSROOT = $(shell cat CVS/Root)
 CVSTAG = r$(subst .,-,$(VERSION))
@@ -8,6 +9,11 @@
 MAN = logrotate.8
 LOADLIBES = -lpopt
 
+ifeq ($(LIBSEC),/usr/lib/libsecure.a)
+       CFLAGS += -DCONFIG_FLASK -I/usr/include/selinux
+       LOADLIBES += -lsecure
+endif
+
 # HP-UX using GCC
 ifeq ($(OS_NAME),HP-UX)
     ifeq ($(RPM_OPT_FLAGS),)
@@ -52,7 +58,7 @@
 
 ifeq ($(RPM_OPT_FLAGS),)
 CFLAGS += -g
-LDFLAGS = -g
+LDFLAGS += -g
 endif
 
 ifeq (.depend,$(wildcard .depend))

--===============4544083340831917==--

---------------------------------------
Received: (at 193601-close) by bugs.debian.org; 28 Jul 2005 09:56:11 +0000
>From [EMAIL PROTECTED] Thu Jul 28 02:56:11 2005
Return-path: <[EMAIL PROTECTED]>
Received: from katie by spohr.debian.org with local (Exim 3.36 1 (Debian))
        id 1Dy4yv-0002rK-00; Thu, 28 Jul 2005 02:47:13 -0700
From: Paul Martin <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
X-Katie: $Revision: 1.56 $
Subject: Bug#193601: fixed in logrotate 3.7.1-1
Message-Id: <[EMAIL PROTECTED]>
Sender: Archive Administrator <[EMAIL PROTECTED]>
Date: Thu, 28 Jul 2005 02:47:13 -0700
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-CrossAssassin-Score: 2

Source: logrotate
Source-Version: 3.7.1-1

We believe that the bug you reported is fixed in the latest version of
logrotate, which is due to be installed in the Debian FTP archive:

logrotate_3.7.1-1.diff.gz
  to pool/main/l/logrotate/logrotate_3.7.1-1.diff.gz
logrotate_3.7.1-1.dsc
  to pool/main/l/logrotate/logrotate_3.7.1-1.dsc
logrotate_3.7.1-1_i386.deb
  to pool/main/l/logrotate/logrotate_3.7.1-1_i386.deb
logrotate_3.7.1.orig.tar.gz
  to pool/main/l/logrotate/logrotate_3.7.1.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Paul Martin <[EMAIL PROTECTED]> (supplier of updated logrotate package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon, 25 Jul 2005 22:15:18 +0100
Source: logrotate
Binary: logrotate
Architecture: source i386
Version: 3.7.1-1
Distribution: unstable
Urgency: low
Maintainer: Paul Martin <[EMAIL PROTECTED]>
Changed-By: Paul Martin <[EMAIL PROTECTED]>
Description: 
 logrotate  - Log rotation utility
Closes: 178526 188198 193601 226061 257685 306304 315514
Changes: 
 logrotate (3.7.1-1) unstable; urgency=low
 .
   * New upstream release (based on upstream 3.7.1-11)
 .
   * This upload enables selinux code. (Closes: #193601, #315514)
 .
   * Updated dpatches:
     + 30-config-h: upstream has changed to using "/bin/mail" instead of
       "/bin/mail -s"
     + No need for 41-execlp-fix or 42-execlp-bin-sh.
     + Upstream fix obsoletes 60-compressowner.
 .
   * Upstream uses a patch system, too. Patches from upstream:
     + 01-rh-dateext (logrotate-3.7.1-dateext.patch)
     + 01-rh-maxage (logrotate-3.7.1-maxage.patch)
       dateext and maxage (Closes: #178526, #188198, #226061, #257685,
       #306304)
     + 01-rh-noTMPDIR (logrotate-3.7.1-noTMPDIR.patch)
       This has the effect of never requiring a tempdir for scripts.
       There's the possibility of large scripts running into stack
       limits.
     + 01-rh-selinux (logrotate-3.7.1-selinux.patch)
       Updates to selinux code.
     + 52-man-rh-1 (based on logrotate-3-man.patch)
       Explains a bit more about postrotate scripts and updates the
       sharedscripts entry.
 .
   * Update Standards-Version (no changes needed).
   * Update copyright file with current upstream location.
Files: 
 fa079e0e74a05e6757788575dc8dc23b 610 admin important logrotate_3.7.1-1.dsc
 552639142e163745f6bcd4f1f3816d8a 36176 admin important 
logrotate_3.7.1.orig.tar.gz
 ec9d308cb97cf96a58a812e93cf9a761 20262 admin important 
logrotate_3.7.1-1.diff.gz
 bea3744aef42316d6d3b581ff7554f03 34132 admin important 
logrotate_3.7.1-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFC5Vaq+gi+rt7UWRIRAp5TAJ4ml0q69WN2reQ+faP3LPEQarv1bQCfSJb8
L0p6LbETsYqqYRH1PzP5J9U=
=ky0i
-----END PGP SIGNATURE-----


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to