/[radius]/radius/lib/radpdu.c
ViewVC logotype

Diff of /radius/lib/radpdu.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by gray, Sat Nov 8 09:48:09 2003 UTC revision 1.18 by gray, Tue Dec 2 12:05:19 2003 UTC
# Line 82  rad_pdu_finish(void **ptr, struct radius Line 82  rad_pdu_finish(void **ptr, struct radius
82          size_t len = sizeof(AUTH_HDR) + pdu->size;          size_t len = sizeof(AUTH_HDR) + pdu->size;
83          u_char digest[AUTH_DIGEST_LEN];          u_char digest[AUTH_DIGEST_LEN];
84                    
85          if (code != RT_AUTHENTICATION_REQUEST && code != RT_STATUS_SERVER) {          if (code != RT_ACCESS_REQUEST && code != RT_STATUS_SERVER) {
86                  secretlen = strlen(secret);                  secretlen = strlen(secret);
87                  obstack_grow(&pdu->st, secret, secretlen);                  obstack_grow(&pdu->st, secret, secretlen);
88          }          }
# Line 98  rad_pdu_finish(void **ptr, struct radius Line 98  rad_pdu_finish(void **ptr, struct radius
98          /* Seal the message properly. Note that the secret has already been          /* Seal the message properly. Note that the secret has already been
99             appended to the pdu wherever necessary */             appended to the pdu wherever necessary */
100          switch (code) {          switch (code) {
101          case RT_AUTHENTICATION_REQUEST:          case RT_ACCESS_REQUEST:
102          case RT_STATUS_SERVER:          case RT_STATUS_SERVER:
103                  memcpy(hdr->vector, vector, AUTH_VECTOR_LEN);                  memcpy(hdr->vector, vector, AUTH_VECTOR_LEN);
104                  break;                  break;
# Line 113  rad_pdu_finish(void **ptr, struct radius Line 113  rad_pdu_finish(void **ptr, struct radius
113                  memset((char*)hdr + len, 0, secretlen);                  memset((char*)hdr + len, 0, secretlen);
114                  break;                  break;
115                                    
116          case RT_AUTHENTICATION_ACK:          case RT_ACCESS_ACCEPT:
117          case RT_AUTHENTICATION_REJECT:          case RT_ACCESS_REJECT:
118          case RT_ACCOUNTING_RESPONSE:          case RT_ACCOUNTING_RESPONSE:
119          case RT_ACCESS_CHALLENGE:          case RT_ACCESS_CHALLENGE:
120                  memcpy(hdr->vector, vector, AUTH_VECTOR_LEN);                  memcpy(hdr->vector, vector, AUTH_VECTOR_LEN);

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26