summaryrefslogtreecommitdiff
path: root/package/ipsec-tools/patches/patch-src_racoon_privsep_c
blob: e8f6781860f6402649957cd63d8300114e1542e6 (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
--- ipsec-tools-0.8.0.orig/src/racoon/privsep.c	2011-03-06 09:28:10.000000000 +0100
+++ ipsec-tools-0.8.0/src/racoon/privsep.c	2011-03-31 13:24:07.981813178 +0200
@@ -359,7 +359,7 @@ privsep_init(void)
 			    strerror(errno));
 			goto out;
 		}
-		bzero(reply, sizeof(*reply));
+		memset(reply, 0, sizeof(*reply));
 		reply->hdr.ac_cmd = combuf->hdr.ac_cmd;
 		reply->hdr.ac_len = sizeof(*reply);
 
@@ -457,7 +457,7 @@ privsep_init(void)
 				    strerror(errno));
 				goto out;
 			}
-			bzero(envp, (envc + 1) * sizeof(char *));
+			memset(envp, 0, (envc + 1) * sizeof(char *));
 
 	
 			/*
@@ -903,7 +903,7 @@ privsep_eay_get_pkcs1privkey(path) 
 		    "Cannot allocate memory: %s\n", strerror(errno));
 		return NULL;
 	}
-	bzero(msg, len);
+	memset(msg, 0, len);
 	msg->hdr.ac_cmd = PRIVSEP_EAY_GET_PKCS1PRIVKEY;
 	msg->hdr.ac_len = len;
 	msg->bufs.buflen[0] = len - sizeof(*msg);
@@ -953,7 +953,7 @@ privsep_script_exec(script, name, envp)
 		return -1;
 	}
 
-	bzero(msg, sizeof(*msg));
+	memset(msg, 0, sizeof(*msg));
 	msg->hdr.ac_cmd = PRIVSEP_SCRIPT_EXEC;
 	msg->hdr.ac_len = sizeof(*msg);
 
@@ -1062,7 +1062,7 @@ privsep_getpsk(str, keylen)
 		    "Cannot allocate memory: %s\n", strerror(errno));
 		return NULL;
 	}
-	bzero(msg, len);
+	memset(msg, 0, len);
 	msg->hdr.ac_cmd = PRIVSEP_GETPSK;
 	msg->hdr.ac_len = len;
 
@@ -1334,7 +1334,7 @@ privsep_xauth_login_system(usr, pwd)
 		    "Cannot allocate memory: %s\n", strerror(errno));
 		return -1;
 	}
-	bzero(msg, len);
+	memset(msg, 0, len);
 	msg->hdr.ac_cmd = PRIVSEP_XAUTH_LOGIN_SYSTEM;
 	msg->hdr.ac_len = len;
 
@@ -1389,7 +1389,7 @@ privsep_accounting_system(port, raddr, u
 		    "Cannot allocate memory: %s\n", strerror(errno));
 		return -1;
 	}
-	bzero(msg, len);
+	memset(msg, 0, len);
 	msg->hdr.ac_cmd = PRIVSEP_ACCOUNTING_SYSTEM;
 	msg->hdr.ac_len = len;
 	msg->bufs.buflen[0] = sizeof(port);
@@ -1643,7 +1643,7 @@ privsep_accounting_pam(port, inout)
 		    "Cannot allocate memory: %s\n", strerror(errno));
 		return -1;
 	}
-	bzero(msg, len);
+	memset(msg, 0, len);
 	msg->hdr.ac_cmd = PRIVSEP_ACCOUNTING_PAM;
 	msg->hdr.ac_len = len;
 	msg->bufs.buflen[0] = sizeof(port);
@@ -1705,7 +1705,7 @@ privsep_xauth_login_pam(port, raddr, usr
 		    "Cannot allocate memory: %s\n", strerror(errno));
 		return -1;
 	}
-	bzero(msg, len);
+	memset(msg, 0, len);
 	msg->hdr.ac_cmd = PRIVSEP_XAUTH_LOGIN_PAM;
 	msg->hdr.ac_len = len;
 	msg->bufs.buflen[0] = sizeof(port);
@@ -1770,7 +1770,7 @@ privsep_cleanup_pam(port)
 		    "Cannot allocate memory: %s\n", strerror(errno));
 		return;
 	}
-	bzero(msg, len);
+	memset(msg, 0, len);
 	msg->hdr.ac_cmd = PRIVSEP_CLEANUP_PAM;
 	msg->hdr.ac_len = len;
 	msg->bufs.buflen[0] = sizeof(port);