Changeset 18817
- Timestamp:
- 03/23/12 16:02:07 (14 months ago)
- Location:
- src/router/pppd.new/pppd
- Files:
-
- 8 edited
-
Makefile.linux (modified) (1 diff)
-
plugins/pptp/Makefile (modified) (1 diff)
-
plugins/radius/Makefile.linux (modified) (1 diff)
-
plugins/radius/avpair.c (modified) (5 diffs)
-
plugins/radius/radius.c (modified) (1 diff)
-
plugins/radius/sendserver.c (modified) (5 diffs)
-
plugins/rp-pppoe/Makefile.linux (modified) (1 diff)
-
pppd.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/router/pppd.new/pppd/Makefile.linux
r18816 r18817 95 95 endif 96 96 97 CFLAGS+= $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"'97 CFLAGS+= -ffunction-sections -fdata-sections -Wl,--gc-sections -Wall $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"' 98 98 99 99 -
src/router/pppd.new/pppd/plugins/pptp/Makefile
r17906 r18817 13 13 14 14 PLUGIN=pptp 15 COPTS = -O2 16 CFLAGS=-I. -I../../../ $(COPTS) -fPIC -DRC_LOG_FACILITY=LOG_DAEMON -DNEED_PRINTF 15 CFLAGS=-Wall -ffunction-sections -fdata-sections -Wl,--gc-sections -I. -I../../../ $(COPTS) -fPIC -DRC_LOG_FACILITY=LOG_DAEMON -DNEED_PRINTF 17 16 18 17 -
src/router/pppd.new/pppd/plugins/radius/Makefile.linux
r17901 r18817 14 14 PLUGIN=radius.so radattr.so radrealms.so 15 15 #COPTS = -O2 16 CFLAGS=- I. -I../.. -I../../../include $(COPTS) -fPIC -DRC_LOG_FACILITY=LOG_DAEMON16 CFLAGS=-Wall -ffunction-sections -fdata-sections -Wl,--gc-sections -I. -I../.. -I../../../include $(COPTS) -fPIC -DRC_LOG_FACILITY=LOG_DAEMON 17 17 18 18 -
src/router/pppd.new/pppd/plugins/radius/avpair.c
r6803 r18817 77 77 vp->lvalue = len; 78 78 } else { 79 strncpy ( vp->strvalue, (char *) pval, AUTH_STRING_LEN);79 strncpy ((char*)vp->strvalue, (char *) pval, AUTH_STRING_LEN); 80 80 vp->lvalue = strlen((char *) pval); 81 81 } … … 197 197 x_len--, x_ptr++) 198 198 { 199 sprintf ( hex, "%2.2X", *x_ptr);200 strcat (buffer, hex);199 sprintf ((char*)hex, "%2.2X", *x_ptr); 200 strcat (buffer, (char*)hex); 201 201 } 202 202 warn("rc_avpair_gen: received unknown attribute %d of length %d: 0x%s", … … 598 598 599 599 case PW_TYPE_STRING: 600 strcpy ( pair->strvalue, valstr);600 strcpy ((char*)pair->strvalue, valstr); 601 601 pair->lvalue = strlen(valstr); 602 602 break; … … 722 722 else 723 723 { 724 strncat(value, ptr, 1);724 strncat(value, (char*)ptr, 1); 725 725 lv--; 726 726 if (lv < 0) break; … … 738 738 else 739 739 { 740 sprintf (buffer, "% ld", pair->lvalue);740 sprintf (buffer, "%d", pair->lvalue); 741 741 strncpy(value, buffer, (size_t) lv); 742 742 } -
src/router/pppd.new/pppd/plugins/radius/radius.c
r12192 r18817 634 634 switch (vp->attribute) { 635 635 case PW_MS_CHAP2_SUCCESS: 636 if ((vp->lvalue != 43) || strncmp( vp->strvalue + 1, "S=", 2)) {636 if ((vp->lvalue != 43) || strncmp((char*)vp->strvalue + 1, "S=", 2)) { 637 637 slprintf(msg,BUF_LEN,"RADIUS: bad MS-CHAP2-Success packet"); 638 638 return -1; 639 639 } 640 640 if (message != NULL) 641 strlcpy(message, vp->strvalue + 1, message_space);641 strlcpy(message, (char*)vp->strvalue + 1, message_space); 642 642 ms_chap2_success = 1; 643 643 break; -
src/router/pppd.new/pppd/plugins/radius/sendserver.c
r6803 r18817 105 105 106 106 secretlen = strlen (secret); 107 vector = ( char *)auth->vector;107 vector = (unsigned char *)auth->vector; 108 108 for(i = 0; i < padded_length; i += AUTH_VECTOR_LEN) { 109 109 /* Calculate the MD5 digest*/ … … 201 201 UINT4 auth_ipaddr; 202 202 char *server_name; /* Name of server to query */ 203 int salen;203 unsigned int salen; 204 204 int result; 205 205 int total_length; 206 int length;206 unsigned int length; 207 207 int retry_max; 208 208 int secretlen; … … 273 273 secretlen = strlen (secret); 274 274 memcpy ((char *) auth + total_length, secret, secretlen); 275 rc_md5_calc (vector, ( char *) auth, total_length + secretlen);275 rc_md5_calc (vector, (unsigned char *) auth, total_length + secretlen); 276 276 memcpy ((char *) auth->vector, (char *) vector, AUTH_VECTOR_LEN); 277 277 } … … 363 363 if ((vp = rc_avpair_get(vp, PW_REPLY_MESSAGE))) 364 364 { 365 strcat(msg, vp->strvalue);365 strcat(msg, (char*)vp->strvalue); 366 366 strcat(msg, "\n"); 367 367 vp = vp->next; … … 429 429 memcpy ((char *) auth->vector, (char *) vector, AUTH_VECTOR_LEN); 430 430 memcpy ((char *) auth + totallen, secret, secretlen); 431 rc_md5_calc (calc_digest, ( char *) auth, totallen + secretlen);431 rc_md5_calc (calc_digest, (unsigned char *) auth, totallen + secretlen); 432 432 433 433 #ifdef DIGEST_DEBUG -
src/router/pppd.new/pppd/plugins/rp-pppoe/Makefile.linux
r17756 r18817 26 26 27 27 #COPTS=-O2 -g 28 CFLAGS= $(COPTS) -I../../../include/linux28 CFLAGS= -Wall -ffunction-sections -fdata-sections -Wl,--gc-sections $(COPTS) -I../../../include/linux 29 29 #CFLAGS=$(COPTS) -I$(LINUXDIR)/include/linux 30 30 -
src/router/pppd.new/pppd/pppd.h
r16201 r18817 525 525 526 526 #ifndef NEED_PRINTF 527 #define option_error(fmt,args...) { }528 529 530 #define notice(fmt,...) { }531 #define info(fmt,...) { }532 #define dbglog(fmt,...) { }533 #define warn(fmt,...) { }527 #define option_error(fmt,args...) do { } while(0) 528 529 530 #define notice(fmt,...)do { } while(0) 531 #define info(fmt,...) do { } while(0) 532 #define dbglog(fmt,...) do { } while(0) 533 #define warn(fmt,...) do { } while(0) 534 534 #define error(fmt,...) { ++error_count; } 535 535 #define fatal(fmt,...) { die(1); }
Note: See TracChangeset
for help on using the changeset viewer.
