deprecate minimum-timeout in longin time, now minimum_timeout
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 2 Jul 2013 17:41:35 +0000 (18:41 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 2 Jul 2013 17:41:35 +0000 (18:41 +0100)
raddb/mods-available/logintime
src/modules/rlm_logintime/rlm_logintime.c

index 26691a9..9cec60b 100644 (file)
 # calculated based on the remaining time.  See "doc/README".
 #
 logintime {
-       #
-       # The Reply-Message which will be sent back in case
-       # the account is calling outside of the allowed
-       # timespan. Dynamic substitution is supported.
-       #
-       reply-message = "You are calling outside your allowed timespan\r\n"
-       #reply-message = "Outside allowed timespan (%{control:Login-Time}), %{User-Name}\r\n"
-
        # The minimum timeout (in seconds) a user is allowed
        # to have. If the calculated timeout is lower we don't
        # allow the logon. Some NASes do not handle values
        # lower than 60 seconds well.
-       minimum-timeout = 60
+       minimum_timeout = 60
 }
 
index 48ff683..15ac67e 100644 (file)
@@ -52,7 +52,8 @@ typedef struct rlm_logintime_t {
  *     buffer over-flows.
  */
 static const CONF_PARSER module_config[] = {
-  { "minimum-timeout", PW_TYPE_INTEGER, offsetof(rlm_logintime_t,min_time), NULL, "60" },
+  { "minimum-timeout", PW_TYPE_INTEGER | PW_TYPE_DEPRECATED, offsetof(rlm_logintime_t,min_time), NULL, "60" },
+  { "minimum_timeout", PW_TYPE_INTEGER, offsetof(rlm_logintime_t,min_time), NULL, "60" },
   
   { NULL, -1, 0, NULL, NULL }
 };
@@ -222,7 +223,7 @@ static int mod_instantiate(CONF_SECTION *conf, void *instance)
        rlm_logintime_t *inst = instance;
 
        if (inst->min_time == 0) {
-               cf_log_err_cs(conf, "Invalid value '0' for minimum-timeout");
+               cf_log_err_cs(conf, "Invalid value '0' for minimum_timeout");
                return -1;
        }