1
0

204-radius_config.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. --- a/pppd/plugins/radius/config.c
  2. +++ b/pppd/plugins/radius/config.c
  3. @@ -369,31 +369,37 @@ static int test_config(char *filename)
  4. }
  5. #endif
  6. +#if 0
  7. if (rc_conf_int("login_tries") <= 0)
  8. {
  9. error("%s: login_tries <= 0 is illegal", filename);
  10. return (-1);
  11. }
  12. +#endif
  13. if (rc_conf_str("seqfile") == NULL)
  14. {
  15. error("%s: seqfile not specified", filename);
  16. return (-1);
  17. }
  18. +#if 0
  19. if (rc_conf_int("login_timeout") <= 0)
  20. {
  21. error("%s: login_timeout <= 0 is illegal", filename);
  22. return (-1);
  23. }
  24. +#endif
  25. if (rc_conf_str("mapfile") == NULL)
  26. {
  27. error("%s: mapfile not specified", filename);
  28. return (-1);
  29. }
  30. +#if 0
  31. if (rc_conf_str("nologin") == NULL)
  32. {
  33. error("%s: nologin not specified", filename);
  34. return (-1);
  35. }
  36. +#endif
  37. return 0;
  38. }
  39. --- a/pppd/plugins/radius/options.h
  40. +++ b/pppd/plugins/radius/options.h
  41. @@ -31,24 +31,21 @@ typedef struct _option {
  42. static SERVER acctserver = {0};
  43. static SERVER authserver = {0};
  44. -int default_tries = 4;
  45. -int default_timeout = 60;
  46. -
  47. static OPTION config_options[] = {
  48. /* internally used options */
  49. {"config_file", OT_STR, ST_UNDEF, NULL},
  50. /* General options */
  51. {"auth_order", OT_AUO, ST_UNDEF, NULL},
  52. -{"login_tries", OT_INT, ST_UNDEF, &default_tries},
  53. -{"login_timeout", OT_INT, ST_UNDEF, &default_timeout},
  54. -{"nologin", OT_STR, ST_UNDEF, "/etc/nologin"},
  55. -{"issue", OT_STR, ST_UNDEF, "/etc/radiusclient/issue"},
  56. +{"login_tries", OT_INT, ST_UNDEF, NULL},
  57. +{"login_timeout", OT_INT, ST_UNDEF, NULL},
  58. +{"nologin", OT_STR, ST_UNDEF, NULL},
  59. +{"issue", OT_STR, ST_UNDEF, NULL},
  60. /* RADIUS specific options */
  61. {"authserver", OT_SRV, ST_UNDEF, &authserver},
  62. {"acctserver", OT_SRV, ST_UNDEF, &acctserver},
  63. {"servers", OT_STR, ST_UNDEF, NULL},
  64. {"dictionary", OT_STR, ST_UNDEF, NULL},
  65. -{"login_radius", OT_STR, ST_UNDEF, "/usr/sbin/login.radius"},
  66. +{"login_radius", OT_STR, ST_UNDEF, NULL},
  67. {"seqfile", OT_STR, ST_UNDEF, NULL},
  68. {"mapfile", OT_STR, ST_UNDEF, NULL},
  69. {"default_realm", OT_STR, ST_UNDEF, NULL},