patch-src_racoon_privsep_c 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. --- ipsec-tools-0.8.0.orig/src/racoon/privsep.c 2011-03-06 09:28:10.000000000 +0100
  2. +++ ipsec-tools-0.8.0/src/racoon/privsep.c 2011-03-31 13:24:07.981813178 +0200
  3. @@ -359,7 +359,7 @@ privsep_init(void)
  4. strerror(errno));
  5. goto out;
  6. }
  7. - bzero(reply, sizeof(*reply));
  8. + memset(reply, 0, sizeof(*reply));
  9. reply->hdr.ac_cmd = combuf->hdr.ac_cmd;
  10. reply->hdr.ac_len = sizeof(*reply);
  11. @@ -457,7 +457,7 @@ privsep_init(void)
  12. strerror(errno));
  13. goto out;
  14. }
  15. - bzero(envp, (envc + 1) * sizeof(char *));
  16. + memset(envp, 0, (envc + 1) * sizeof(char *));
  17. /*
  18. @@ -903,7 +903,7 @@ privsep_eay_get_pkcs1privkey(path)
  19. "Cannot allocate memory: %s\n", strerror(errno));
  20. return NULL;
  21. }
  22. - bzero(msg, len);
  23. + memset(msg, 0, len);
  24. msg->hdr.ac_cmd = PRIVSEP_EAY_GET_PKCS1PRIVKEY;
  25. msg->hdr.ac_len = len;
  26. msg->bufs.buflen[0] = len - sizeof(*msg);
  27. @@ -953,7 +953,7 @@ privsep_script_exec(script, name, envp)
  28. return -1;
  29. }
  30. - bzero(msg, sizeof(*msg));
  31. + memset(msg, 0, sizeof(*msg));
  32. msg->hdr.ac_cmd = PRIVSEP_SCRIPT_EXEC;
  33. msg->hdr.ac_len = sizeof(*msg);
  34. @@ -1062,7 +1062,7 @@ privsep_getpsk(str, keylen)
  35. "Cannot allocate memory: %s\n", strerror(errno));
  36. return NULL;
  37. }
  38. - bzero(msg, len);
  39. + memset(msg, 0, len);
  40. msg->hdr.ac_cmd = PRIVSEP_GETPSK;
  41. msg->hdr.ac_len = len;
  42. @@ -1334,7 +1334,7 @@ privsep_xauth_login_system(usr, pwd)
  43. "Cannot allocate memory: %s\n", strerror(errno));
  44. return -1;
  45. }
  46. - bzero(msg, len);
  47. + memset(msg, 0, len);
  48. msg->hdr.ac_cmd = PRIVSEP_XAUTH_LOGIN_SYSTEM;
  49. msg->hdr.ac_len = len;
  50. @@ -1389,7 +1389,7 @@ privsep_accounting_system(port, raddr, u
  51. "Cannot allocate memory: %s\n", strerror(errno));
  52. return -1;
  53. }
  54. - bzero(msg, len);
  55. + memset(msg, 0, len);
  56. msg->hdr.ac_cmd = PRIVSEP_ACCOUNTING_SYSTEM;
  57. msg->hdr.ac_len = len;
  58. msg->bufs.buflen[0] = sizeof(port);
  59. @@ -1643,7 +1643,7 @@ privsep_accounting_pam(port, inout)
  60. "Cannot allocate memory: %s\n", strerror(errno));
  61. return -1;
  62. }
  63. - bzero(msg, len);
  64. + memset(msg, 0, len);
  65. msg->hdr.ac_cmd = PRIVSEP_ACCOUNTING_PAM;
  66. msg->hdr.ac_len = len;
  67. msg->bufs.buflen[0] = sizeof(port);
  68. @@ -1705,7 +1705,7 @@ privsep_xauth_login_pam(port, raddr, usr
  69. "Cannot allocate memory: %s\n", strerror(errno));
  70. return -1;
  71. }
  72. - bzero(msg, len);
  73. + memset(msg, 0, len);
  74. msg->hdr.ac_cmd = PRIVSEP_XAUTH_LOGIN_PAM;
  75. msg->hdr.ac_len = len;
  76. msg->bufs.buflen[0] = sizeof(port);
  77. @@ -1770,7 +1770,7 @@ privsep_cleanup_pam(port)
  78. "Cannot allocate memory: %s\n", strerror(errno));
  79. return;
  80. }
  81. - bzero(msg, len);
  82. + memset(msg, 0, len);
  83. msg->hdr.ac_cmd = PRIVSEP_CLEANUP_PAM;
  84. msg->hdr.ac_len = len;
  85. msg->bufs.buflen[0] = sizeof(port);