~ubuntu-branches/ubuntu/precise/clamav/precise-security

« back to all changes in this revision

Viewing changes to debian/patches/0004-Stop-using-a-cargo-culted-syscall-table-and-trust-th.patch

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2014-11-21 09:58:30 UTC
  • mfrom: (0.47.10)
  • Revision ID: package-import@ubuntu.com-20141121095830-g7mk3a12cpvbvp5v
Tags: 0.98.5+addedllvm-0ubuntu0.12.04.1
* Updated to 0.98.5 to fix security issues, including CVE-2013-6497.
* Removed patches no longer needed:
  - d/p/0002-Sebastian-Andrzej-Siewior.patch
  - d/p/0003-configure-use-pkg-config-for-check-so-test-is-detect.patch
  - d/p/0004-Stop-using-a-cargo-culted-syscall-table-and-trust-th.patch
  - d/p/0005-configure.ac-patches-to-got-with-autoreconf-and-auto.patch
  - d/p/0006-Fix-STAT64-definition-and-add-missing-includes.patch
* Added patches from vivid to fix FTBFS, .so version and other issues:
  - d/p/0002-Add-an-additional-n-after-the-number-in-the-pidfile.patch
  - d/p/0003-unit_tests-increment-test-timeout-from-40secs-to-5mi.patch
  - d/p/0006-remove-unnecessary-harmful-flags-from-libclamav.pc.patch
  - d/p/0010-hardcode-LLVM-linker-flag-because-llvm-config-return.patch
  - d/p/0017-Bump-.so-version-number.patch
  - d/p/0018-llvm-don-t-use-system-libs.patch
* debian/clamav-docs.docs: use wildcards, as some docs have changed.
* debian/clamav-base.postinst.in: added new options.
* debian/clamav-base.config.in: added new options.
* debian/clamav-base.templates: added new options.
* debian/control: added libssl-dev BuildDepends.
* clamav-testfiles.install: removed rar files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From fa5fdd205e4958c304f3dfd10173eb4e0c35596f Mon Sep 17 00:00:00 2001
2
 
From: Scott Kitterman <scott@kitterman.com>
3
 
Date: Mon, 10 Mar 2014 19:57:02 -0400
4
 
Subject: Stop using a cargo-culted syscall table and trust the glibc headers
5
 
 
6
 
---
7
 
 clamd/fan-syscalllib.h | 17 ++++-------------
8
 
 1 file changed, 4 insertions(+), 13 deletions(-)
9
 
 
10
 
diff --git a/clamd/fan-syscalllib.h b/clamd/fan-syscalllib.h
11
 
index 288cd99..b130635 100644
12
 
--- a/clamd/fan-syscalllib.h
13
 
+++ b/clamd/fan-syscalllib.h
14
 
@@ -2,27 +2,18 @@
15
 
 #define __FANOTIFY_SYSCALL_LIB
16
 
 
17
 
 #include <unistd.h>
18
 
-#include <linux/types.h>
19
 
-
20
 
-#if defined(__x86_64__)
21
 
-# define __NR_fanotify_init    300
22
 
-# define __NR_fanotify_mark    301
23
 
-#elif defined(__i386__)
24
 
-# define __NR_fanotify_init    338
25
 
-# define __NR_fanotify_mark    339
26
 
-#else
27
 
-# error "System call numbers not defined for this architecture"
28
 
-#endif
29
 
+#include <sys/types.h>
30
 
+#include <sys/syscall.h>
31
 
 
32
 
 static inline int fanotify_init(unsigned int flags, unsigned int event_f_flags)
33
 
 {
34
 
-       return syscall(__NR_fanotify_init, flags, event_f_flags);
35
 
+       return syscall(SYS_fanotify_init, flags, event_f_flags);
36
 
 }
37
 
 
38
 
 static inline int fanotify_mark(int fanotify_fd, unsigned int flags, __u64 mask,
39
 
                                int dfd, const char *pathname)
40
 
 {
41
 
-       return syscall(__NR_fanotify_mark, fanotify_fd, flags, mask,
42
 
+       return syscall(SYS_fanotify_mark, fanotify_fd, flags, mask,
43
 
                       dfd, pathname);
44
 
 }
45
 
 #endif