patch-src_racoon_privsep_c 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- ipsec-tools-0.7.2.orig/src/racoon/privsep.c 2008-12-08 07:06:24.000000000 +0100
  3. +++ ipsec-tools-0.7.2/src/racoon/privsep.c 2009-05-29 15:55:47.787585131 +0200
  4. @@ -323,7 +323,7 @@ privsep_init(void)
  5. strerror(errno));
  6. goto out;
  7. }
  8. - bzero(reply, sizeof(*reply));
  9. + memset(reply, 0, sizeof(*reply));
  10. reply->hdr.ac_cmd = combuf->hdr.ac_cmd;
  11. reply->hdr.ac_len = sizeof(*reply);
  12. @@ -421,7 +421,7 @@ privsep_init(void)
  13. strerror(errno));
  14. goto out;
  15. }
  16. - bzero(envp, (envc + 1) * sizeof(char *));
  17. + memset(envp, 0, (envc + 1) * sizeof(char *));
  18. /*
  19. @@ -716,7 +716,7 @@ privsep_eay_get_pkcs1privkey(path)
  20. "Cannot allocate memory: %s\n", strerror(errno));
  21. return NULL;
  22. }
  23. - bzero(msg, len);
  24. + memset(msg, 0, len);
  25. msg->hdr.ac_cmd = PRIVSEP_EAY_GET_PKCS1PRIVKEY;
  26. msg->hdr.ac_len = len;
  27. msg->bufs.buflen[0] = len - sizeof(*msg);
  28. @@ -797,7 +797,7 @@ privsep_script_exec(script, name, envp)
  29. return -1;
  30. }
  31. - bzero(msg, sizeof(*msg));
  32. + memset(msg, 0, sizeof(*msg));
  33. msg->hdr.ac_cmd = PRIVSEP_SCRIPT_EXEC;
  34. msg->hdr.ac_len = sizeof(*msg);
  35. @@ -906,7 +906,7 @@ privsep_getpsk(str, keylen)
  36. "Cannot allocate memory: %s\n", strerror(errno));
  37. return NULL;
  38. }
  39. - bzero(msg, len);
  40. + memset(msg, 0, len);
  41. msg->hdr.ac_cmd = PRIVSEP_GETPSK;
  42. msg->hdr.ac_len = len;
  43. @@ -960,7 +960,7 @@ privsep_xauth_login_system(usr, pwd)
  44. "Cannot allocate memory: %s\n", strerror(errno));
  45. return -1;
  46. }
  47. - bzero(msg, len);
  48. + memset(msg, 0, len);
  49. msg->hdr.ac_cmd = PRIVSEP_XAUTH_LOGIN_SYSTEM;
  50. msg->hdr.ac_len = len;
  51. @@ -1014,7 +1014,7 @@ privsep_accounting_system(port, raddr, u
  52. "Cannot allocate memory: %s\n", strerror(errno));
  53. return -1;
  54. }
  55. - bzero(msg, len);
  56. + memset(msg, 0, len);
  57. msg->hdr.ac_cmd = PRIVSEP_ACCOUNTING_SYSTEM;
  58. msg->hdr.ac_len = len;
  59. msg->bufs.buflen[0] = sizeof(port);
  60. @@ -1187,7 +1187,7 @@ privsep_accounting_pam(port, inout)
  61. "Cannot allocate memory: %s\n", strerror(errno));
  62. return -1;
  63. }
  64. - bzero(msg, len);
  65. + memset(msg, 0, len);
  66. msg->hdr.ac_cmd = PRIVSEP_ACCOUNTING_PAM;
  67. msg->hdr.ac_len = len;
  68. msg->bufs.buflen[0] = sizeof(port);
  69. @@ -1248,7 +1248,7 @@ privsep_xauth_login_pam(port, raddr, usr
  70. "Cannot allocate memory: %s\n", strerror(errno));
  71. return -1;
  72. }
  73. - bzero(msg, len);
  74. + memset(msg, 0, len);
  75. msg->hdr.ac_cmd = PRIVSEP_XAUTH_LOGIN_PAM;
  76. msg->hdr.ac_len = len;
  77. msg->bufs.buflen[0] = sizeof(port);
  78. @@ -1312,7 +1312,7 @@ privsep_cleanup_pam(port)
  79. "Cannot allocate memory: %s\n", strerror(errno));
  80. return;
  81. }
  82. - bzero(msg, len);
  83. + memset(msg, 0, len);
  84. msg->hdr.ac_cmd = PRIVSEP_CLEANUP_PAM;
  85. msg->hdr.ac_len = len;
  86. msg->bufs.buflen[0] = sizeof(port);