<p>Jenkins2 <strong>merged</strong> this change.</p><p><a href="https://gerrit.asterisk.org/7444">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Joshua Colp: Looks good to me, but someone else must approve
  Michael L. Young: Looks good to me, but someone else must approve
  Sean Bright: Looks good to me, approved
  Jenkins2: Approved for Submit

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">security-events: Fix SuccessfulAuth using_password declaration.<br><br>The SuccessfulAuth using_password field was declared as a pointer to a<br>uint32_t when the field was later read as a uint32_t value.  This resulted<br>in unnecessary casts and a non-portable field value reinterpret in<br>main/security_events.c:add_json_object().  i.e., It would work on a 32 bit<br>architecture but not on a 64 bit big endian architecture.<br><br>Change-Id: Ia08bc797613a62f07e5473425f9ccd8d77c80935<br>---<br>M channels/sip/include/security_events.h<br>M channels/sip/security_events.c<br>M include/asterisk/security_events_defs.h<br>M res/res_pjsip/security_events.c<br>4 files changed, 8 insertions(+), 7 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">diff --git a/channels/sip/include/security_events.h b/channels/sip/include/security_events.h<br>index 1d0f58b..9f4bb2e 100644<br>--- a/channels/sip/include/security_events.h<br>+++ b/channels/sip/include/security_events.h<br>@@ -32,7 +32,7 @@<br> void sip_report_invalid_peer(const struct sip_pvt *p);<br> void sip_report_failed_acl(const struct sip_pvt *p, const char *aclname);<br> void sip_report_inval_password(const struct sip_pvt *p, const char *responsechallenge, const char *responsehash);<br>-void sip_report_auth_success(const struct sip_pvt *p, uint32_t *using_password);<br>+void sip_report_auth_success(const struct sip_pvt *p, uint32_t using_password);<br> void sip_report_session_limit(const struct sip_pvt *p);<br> void sip_report_failed_challenge_response(const struct sip_pvt *p, const char *response, const char *expected_response);<br> void sip_report_chal_sent(const struct sip_pvt *p);<br>diff --git a/channels/sip/security_events.c b/channels/sip/security_events.c<br>index b51c473..86ab6c2f 100644<br>--- a/channels/sip/security_events.c<br>+++ b/channels/sip/security_events.c<br>@@ -120,7 +120,7 @@<br>         ast_security_event_report(AST_SEC_EVT(&inval_password));<br> }<br> <br>-void sip_report_auth_success(const struct sip_pvt *p, uint32_t *using_password)<br>+void sip_report_auth_success(const struct sip_pvt *p, uint32_t using_password)<br> {<br>         char session_id[32];<br> <br>@@ -269,7 +269,8 @@<br> }<br> <br> int sip_report_security_event(const char *peer, struct ast_sockaddr *addr, const struct sip_pvt *p,<br>-                       const struct sip_request *req, const int res) {<br>+    const struct sip_request *req, const int res)<br>+{<br> <br>      struct sip_peer *peer_report;<br>         enum check_auth_result res_report = res;<br>@@ -295,9 +296,9 @@<br>         case AUTH_SUCCESSFUL:<br>                 if (peer_report) {<br>                    if (ast_strlen_zero(peer_report->secret) && ast_strlen_zero(peer_report->md5secret)) {<br>-                 sip_report_auth_success(p, (uint32_t *) 0);<br>+                          sip_report_auth_success(p, 0);<br>                        } else {<br>-                             sip_report_auth_success(p, (uint32_t *) 1);<br>+                          sip_report_auth_success(p, 1);<br>                        }<br>             }<br>             break;<br>diff --git a/include/asterisk/security_events_defs.h b/include/asterisk/security_events_defs.h<br>index 30a7136..1cae046 100644<br>--- a/include/asterisk/security_events_defs.h<br>+++ b/include/asterisk/security_events_defs.h<br>@@ -394,7 +394,7 @@<br>       * \brief Using password - if a password was used or not<br>       * \note required, 0 = no, 1 = yes<br>     */<br>-  uint32_t *using_password;<br>+    uint32_t using_password;<br> };<br> <br> /*!<br>diff --git a/res/res_pjsip/security_events.c b/res/res_pjsip/security_events.c<br>index ea3810b..b31445b 100644<br>--- a/res/res_pjsip/security_events.c<br>+++ b/res/res_pjsip/security_events.c<br>@@ -186,7 +186,7 @@<br>                                      .transport  = transport,<br>                      },<br>                    .common.session_id  = call_id,<br>-                       .using_password     = auth ? (uint32_t *)1 : (uint32_t *)0,<br>+                  .using_password     = auth ? 1 : 0,<br>   };<br> <br>         security_event_populate(rdata, call_id, sizeof(call_id), &local, &remote);<br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/7444">change 7444</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7444"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 15 </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: Ia08bc797613a62f07e5473425f9ccd8d77c80935 </div>
<div style="display:none"> Gerrit-Change-Number: 7444 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Richard Mudgett <rmudgett@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Michael L. Young <elgueromexicano@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>