~n-muench/ubuntu/oneiric/open-vm-tools/open-vm-tools.fix-836277

« back to all changes in this revision

Viewing changes to debian/patches/ubuntu_toolchain_FTBFS.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2008-10-23 15:32:00 UTC
  • mfrom: (1.1.2 upstream) (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20081023153200-gc1bfx89hj35c799
Tags: 2008.10.10-123053-2
* Correcting typo in dh_installinit call.
* Downgrading depends on module-assistant to recommends.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## ubuntu_toolchain_FTBFS.dpatch by Devid Filoni <d.filoni@techemail.com>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: fix FTBFS caused by -Wformat -Wformat-security and -D_FORTIFY_SOURCE=2.
6
 
 
7
 
@DPATCH@
8
 
diff -urNad open-vm-tools-2008.08.08-109361~/guestd/foundryToolsDaemon.c open-vm-tools-2008.08.08-109361/guestd/foundryToolsDaemon.c
9
 
--- open-vm-tools-2008.08.08-109361~/guestd/foundryToolsDaemon.c        2008-08-08 07:01:56.000000000 +0000
10
 
+++ open-vm-tools-2008.08.08-109361/guestd/foundryToolsDaemon.c 2008-08-15 20:17:39.000000000 +0000
11
 
@@ -1381,7 +1381,7 @@
12
 
     * from the contents of /etc/fstab, and invoke custom mount programs like the
13
 
     * one needed for HGFS.
14
 
     */
15
 
-   system("mount -a -t vmhgfs");
16
 
+   if (system("mount -a -t vmhgfs")) { }
17
 
 #endif
18
 
 
19
 
    /*
20
 
diff -urNad open-vm-tools-2008.08.08-109361~/guestd/main.c open-vm-tools-2008.08.08-109361/guestd/main.c
21
 
--- open-vm-tools-2008.08.08-109361~/guestd/main.c      2008-08-08 07:01:56.000000000 +0000
22
 
+++ open-vm-tools-2008.08.08-109361/guestd/main.c       2008-08-15 20:17:39.000000000 +0000
23
 
@@ -1232,7 +1232,7 @@
24
 
 
25
 
    pidFile = fopen(pidFileName, "r");
26
 
    if (pidFile) {
27
 
-      fscanf(pidFile, "%"FMTPID"\n", &pid);
28
 
+      if (fscanf(pidFile, "%"FMTPID"\n", &pid)) { }
29
 
       fclose(pidFile);
30
 
 
31
 
       /*
32
 
diff -urNad open-vm-tools-2008.08.08-109361~/lib/guestInfo/guestInfoPerfMonLinux.c open-vm-tools-2008.08.08-109361/lib/guestInfo/guestInfoPerfMonLinux.c
33
 
--- open-vm-tools-2008.08.08-109361~/lib/guestInfo/guestInfoPerfMonLinux.c      2008-08-08 07:01:52.000000000 +0000
34
 
+++ open-vm-tools-2008.08.08-109361/lib/guestInfo/guestInfoPerfMonLinux.c       2008-08-15 20:17:39.000000000 +0000
35
 
@@ -180,7 +180,7 @@
36
 
    }
37
 
 
38
 
    while(!feof(fp)) {
39
 
-      fscanf(fp, "%s %"FMT64"u", buf, &value);
40
 
+      if (fscanf(fp, "%s %"FMT64"u", buf, &value)) { }
41
 
       if (StrUtil_StartsWith(buf, "MemTotal")) {
42
 
          vmStats->memTotal = value;
43
 
       }
44
 
diff -urNad open-vm-tools-2008.08.08-109361~/lib/guestInfo/guestInfoPosix.c open-vm-tools-2008.08.08-109361/lib/guestInfo/guestInfoPosix.c
45
 
--- open-vm-tools-2008.08.08-109361~/lib/guestInfo/guestInfoPosix.c     2008-08-08 07:01:52.000000000 +0000
46
 
+++ open-vm-tools-2008.08.08-109361/lib/guestInfo/guestInfoPosix.c      2008-08-15 20:17:39.000000000 +0000
47
 
@@ -199,7 +199,7 @@
48
 
       char macAddress[NICINFO_MAC_LEN];
49
 
       char ipAddress[NICINFO_MAX_IP_LEN];
50
 
 
51
 
-      Str_Sprintf(macAddress, sizeof macAddress,
52
 
+      Str_Sprintf(macAddress, sizeof macAddress, "%s\n",
53
 
                   addr_ntoa(&entry->intf_link_addr));
54
 
       nic = GuestInfoAddNicEntry(nicInfo, macAddress);
55
 
 
56
 
diff -urNad open-vm-tools-2008.08.08-109361~/lib/misc/posixPosix.c open-vm-tools-2008.08.08-109361/lib/misc/posixPosix.c
57
 
--- open-vm-tools-2008.08.08-109361~/lib/misc/posixPosix.c      2008-08-08 07:01:54.000000000 +0000
58
 
+++ open-vm-tools-2008.08.08-109361/lib/misc/posixPosix.c       2008-08-15 20:17:39.000000000 +0000
59
 
@@ -2981,7 +2981,7 @@
60
 
    if (!PosixConvertToCurrent(output, &outCurr)) {
61
 
       return -1;
62
 
    }
63
 
-   numChars = printf(outCurr);
64
 
+   numChars = printf(outCurr,"%s\n");
65
 
 
66
 
    free(output);
67
 
    free(outCurr);
68
 
diff -urNad open-vm-tools-2008.08.08-109361~/lib/panic/panic.c open-vm-tools-2008.08.08-109361/lib/panic/panic.c
69
 
--- open-vm-tools-2008.08.08-109361~/lib/panic/panic.c  2008-08-08 07:01:54.000000000 +0000
70
 
+++ open-vm-tools-2008.08.08-109361/lib/panic/panic.c   2008-08-15 20:17:39.000000000 +0000
71
 
@@ -497,7 +497,7 @@
72
 
    case 0:
73
 
       break;
74
 
    case 1:
75
 
-      Log(buf);
76
 
+      Log(buf,"%s\n");
77
 
       Log("Panic loop\n");
78
 
    default:
79
 
       fprintf(stderr, "Panic loop\n");
80
 
@@ -510,7 +510,7 @@
81
 
     * the log file on exit.
82
 
     */
83
 
 
84
 
-   Log(buf);
85
 
+   Log(buf,"%s\n");
86
 
    Util_Backtrace(0);
87
 
    Log_SetAlwaysKeep(TRUE);
88
 
 
89
 
diff -urNad open-vm-tools-2008.08.08-109361~/lib/system/systemLinux.c open-vm-tools-2008.08.08-109361/lib/system/systemLinux.c
90
 
--- open-vm-tools-2008.08.08-109361~/lib/system/systemLinux.c   2008-08-08 07:01:53.000000000 +0000
91
 
+++ open-vm-tools-2008.08.08-109361/lib/system/systemLinux.c    2008-08-15 20:18:00.000000000 +0000
92
 
@@ -358,7 +358,7 @@
93
 
       cmd = "shutdown -h now";
94
 
 #endif
95
 
    }
96
 
-   system(cmd);
97
 
+   if (system(cmd)) { }
98
 
 }
99
 
 
100
 
 
101
 
@@ -593,7 +593,7 @@
102
 
        * won't treat EPIPE as an error, because we'd like to carry on with
103
 
        * our own life, even if our parent -did- abandon us.  ;_;
104
 
        */
105
 
-      write(fds[1], &buf, sizeof buf);
106
 
+      if (write(fds[1], &buf, sizeof buf)) { }
107
 
       close(fds[1]);
108
 
 
109
 
       if (!nochdir && (chdir("/") == -1)) {
110
 
diff -urNad open-vm-tools-2008.08.08-109361~/vmware-user/foundryToolsDaemon.c open-vm-tools-2008.08.08-109361/vmware-user/foundryToolsDaemon.c
111
 
--- open-vm-tools-2008.08.08-109361~/vmware-user/foundryToolsDaemon.c   2008-08-08 07:01:56.000000000 +0000
112
 
+++ open-vm-tools-2008.08.08-109361/vmware-user/foundryToolsDaemon.c    2008-08-15 20:17:39.000000000 +0000
113
 
@@ -1381,7 +1381,7 @@
114
 
     * from the contents of /etc/fstab, and invoke custom mount programs like the
115
 
     * one needed for HGFS.
116
 
     */
117
 
-   system("mount -a -t vmhgfs");
118
 
+   if (system("mount -a -t vmhgfs")) { }
119
 
 #endif
120
 
 
121
 
    /*
122
 
diff -urNad open-vm-tools-2008.08.08-109361~/xferlogs/xferlogs.c open-vm-tools-2008.08.08-109361/xferlogs/xferlogs.c
123
 
--- open-vm-tools-2008.08.08-109361~/xferlogs/xferlogs.c        2008-08-08 07:01:57.000000000 +0000
124
 
+++ open-vm-tools-2008.08.08-109361/xferlogs/xferlogs.c 2008-08-15 20:17:39.000000000 +0000
125
 
@@ -125,7 +125,7 @@
126
 
    RpcVMX_Log("%s: %s: ver - %d", LOG_START_MARK, filename, LOG_VERSION);
127
 
    while ((readLen = fread(buf, 1, sizeof buf, fp)) > 0 ) {
128
 
       if (Base64_Encode(buf, readLen, base64Buf, sizeof base64B - 1, NULL)) {
129
 
-         RpcVMX_Log(base64B);
130
 
+         RpcVMX_Log(base64B,"%s\n");
131
 
       } else {
132
 
          Warning("Error in Base64_Encode\n");
133
 
          goto exit;
134
 
@@ -261,7 +261,7 @@
135
 
       usage();
136
 
       return -1;
137
 
    } if (argc == 2) {
138
 
-      RpcVMX_Log(argv[1]);
139
 
+      RpcVMX_Log(argv[1],"%s\n");
140
 
       return 0;
141
 
    }
142