Author: arekm                        Date: Sun Sep 11 10:58:26 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- add selinux types; fix error path in fsmagic.c and do proper array 
terminating in file.c; add fix from debian

---- Files affected:
SOURCES:
   file-magic.patch (NONE -> 1.1)  (NEW), file-selinux.patch (NONE -> 1.1)  
(NEW), file-debian.patch (1.12 -> 1.13) 

---- Diffs:

================================================================
Index: SOURCES/file-magic.patch
diff -u /dev/null SOURCES/file-magic.patch:1.1
--- /dev/null   Sun Sep 11 12:58:26 2005
+++ SOURCES/file-magic.patch    Sun Sep 11 12:58:21 2005
@@ -0,0 +1,25 @@
+--- file-4.14/src/fsmagic.c.magic      2005-06-25 17:52:14.000000000 +0200
++++ file-4.14/src/fsmagic.c    2005-07-14 09:47:08.000000000 +0200
+@@ -92,7 +92,8 @@
+               if (file_printf(ms, "cannot open `%s' (%s)",
+                   fn, strerror(errno)) == -1)
+                       return -1;
+-              return 1;
++              ms->haderr++;
++              return -1;
+       }
+ 
+       if ((ms->flags & MAGIC_MIME) != 0) {
+--- file-4.14/src/file.c.magic 2005-03-06 06:58:22.000000000 +0100
++++ file-4.14/src/file.c       2005-07-14 09:47:08.000000000 +0200
+@@ -362,7 +362,8 @@
+       }
+ 
+       while (fgets(buf, MAXPATHLEN, f) != NULL) {
+-              buf[file_mbswidth(buf)-1] = '\0';
++              // cut off CR, we _need_ bytes here, not characters
++              buf[strlen(buf)-1] = '\0';
+               process(buf, wid);
+               if(nobuffer)
+                       (void) fflush(stdout);
+

================================================================
Index: SOURCES/file-selinux.patch
diff -u /dev/null SOURCES/file-selinux.patch:1.1
--- /dev/null   Sun Sep 11 12:58:26 2005
+++ SOURCES/file-selinux.patch  Sun Sep 11 12:58:21 2005
@@ -0,0 +1,19 @@
+--- file-4.02/magic/Magdir/policy.selinux      2003-08-28 14:36:54.000000000 
-0400
++++ file-4.02/magic/Magdir/policy      2003-08-28 14:39:35.000000000 -0400
+@@ -0,0 +1,6 @@
++# SE Linux policy database
++0       lelong  0xf97cff8c      SE Linux policy
++>16     lelong  x               v%d
++>20     lelong  1             MLS
++>24     lelong  x             %d symbols
++>28     lelong  x             %d ocons
+--- file-4.02/magic/Makefile.am.selinux        2003-08-28 14:41:58.000000000 
-0400
++++ file-4.02/magic/Makefile.am        2003-08-28 14:45:15.000000000 -0400
+@@ -135,6 +135,7 @@
+ Magdir/pgp \
+ Magdir/pkgadd \
+ Magdir/plus5 \
++Magdir/policy \
+ Magdir/printer \
+ Magdir/project \
+ Magdir/psdbms \

================================================================
Index: SOURCES/file-debian.patch
diff -u SOURCES/file-debian.patch:1.12 SOURCES/file-debian.patch:1.13
--- SOURCES/file-debian.patch:1.12      Sun Aug 28 22:27:00 2005
+++ SOURCES/file-debian.patch   Sun Sep 11 12:58:21 2005
@@ -158,3 +158,23 @@
 +# Magic local data for file(1) command.
 +# Insert here your local magic data. Format is described in magic(5).
 +
+--- file-4.14/src/magic.c.debian       2005-06-25 17:52:14.000000000 +0200
++++ file-4.14/src/magic.c      2005-07-14 09:43:18.000000000 +0200
+@@ -213,7 +213,7 @@
+       int     fd = 0;
+       int     rv = -1;
+       unsigned char *buf;
+-      struct stat     sb;
++      struct stat     sb, *st = &sb;
+       ssize_t nbytes = 0;     /* number of bytes read from a datafile */
+ 
+       /*
+@@ -227,7 +227,7 @@
+       if (file_reset(ms) == -1)
+               goto done;
+ 
+-      switch (file_fsmagic(ms, inname, &sb)) {
++      switch (file_fsmagic(ms, inname, st)) {
+       case -1:
+               goto done;
+       case 0:
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/file-debian.patch?r1=1.12&r2=1.13&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to