Package: trousers / 0.3.13-3

06-host_name_max.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
Index: trousers-0.3.13/src/tspi/tsp_tcsi_param.c
===================================================================
--- trousers-0.3.13.orig/src/tspi/tsp_tcsi_param.c
+++ trousers-0.3.13/src/tspi/tsp_tcsi_param.c
@@ -11,7 +11,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
-#include <bits/local_lim.h>
+#include <bits/posix1_lim.h>
 #include "trousers/tss.h"
 #include "trousers/trousers.h"
 #include "trousers_types.h"
@@ -85,7 +85,7 @@ get_tcsd_port(char port_str[TCP_PORT_STR
 }
 
 /**
- *  Allocates a string with up to HOST_NAME_MAX chars which contains
+ *  Allocates a string with up to _POSIX_HOST_NAME_MAX chars which contains
  *  the hostname extracted from the env var
  */
 int
@@ -109,8 +109,8 @@ get_hostname_from_env(char **host_str, u
 
 	LogDebug("Environment var %s got value: %s", HOSTNAME_ENV_VAR, tmp_str);
 	env_len = strlen(tmp_str);
-	if (env_len > HOST_NAME_MAX) {
-		*len = HOST_NAME_MAX + 1;
+	if (env_len > _POSIX_HOST_NAME_MAX) {
+		*len = _POSIX_HOST_NAME_MAX + 1;
 	} else {
 		*len = env_len + 1;
 	}