Package: axiom / 20170501-6

bind_patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 axiom (20170501-1) unstable; urgency=medium
 .
   * New upstream release
   * Bug fix: "[src:axiom] Please purge zips subdirectory and repack",
     thanks to bastien ROUCARIES (Closes: #752222).
Author: Camm Maguire <camm@debian.org>
Bug-Debian: https://bugs.debian.org/752222

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: 2017-09-05

--- axiom-20170501.orig/books/bookvol8.pamphlet
+++ axiom-20170501/books/bookvol8.pamphlet
@@ -27024,6 +27024,8 @@ make_server_name(char *name,char * base)
 
 /* client Spad server sockets.  Two sockets are created: server[0]
    is the internet server socket, and server[1] is a UNIX domain socket. */
+#include <sys/un.h>
+
 int 
 open_server(char *server_name)
 {
@@ -27066,12 +27068,11 @@ open_server(char *server_name)
     server[1].socket = 0;
     return -2;
   } else {
-    server[1].addr.u_addr.sa_family = AF_UNIX;
-    memset(server[1].addr.u_addr.sa_data, 0,
-           sizeof(server[1].addr.u_addr.sa_data));
-    strcpy(server[1].addr.u_addr.sa_data, name);
-    if (bind(server[1].socket, &server[1].addr.u_addr,
-             sizeof(server[1].addr.u_addr))) {
+    struct sockaddr_un nn;
+    memset(&nn, 0, sizeof(nn));
+    nn.sun_family = AF_UNIX;
+    strncpy(nn.sun_path, name, sizeof(nn.sun_path) - 1);
+    if (bind(server[1].socket,(const struct sockaddr *) &nn,sizeof(nn))) {
       perror("binding UNIX server socket");
       server[1].socket = 0;
       return -2;