Changeset 1369
- Timestamp:
- 09/30/08 05:15:44 (4 years ago)
- Location:
- trunk/wifidog
- Files:
-
- 3 modified
-
src/conf.c (modified) (5 diffs)
-
src/conf.h (modified) (1 diff)
-
wifidog.conf (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wifidog/src/conf.c
r1346 r1369 85 85 oHTTPDMaxConn, 86 86 oHTTPDName, 87 oHTTPDRealm, 88 oHTTPDUsername, 89 oHTTPDPassword, 87 90 oClientTimeout, 88 91 oCheckInterval, … … 112 115 { "httpdmaxconn", oHTTPDMaxConn }, 113 116 { "httpdname", oHTTPDName }, 117 { "httpdrealm", oHTTPDRealm }, 118 { "httpdusername", oHTTPDUsername }, 119 { "httpdpassword", oHTTPDPassword }, 114 120 { "clienttimeout", oClientTimeout }, 115 121 { "checkinterval", oCheckInterval }, … … 166 172 config.auth_servers = NULL; 167 173 config.httpdname = NULL; 174 config.httpdrealm = DEFAULT_HTTPDNAME; 175 config.httpdusername = NULL; 176 config.httpdpassword = NULL; 168 177 config.clienttimeout = DEFAULT_CLIENTTIMEOUT; 169 178 config.checkinterval = DEFAULT_CHECKINTERVAL; … … 706 715 sscanf(p1, "%d", &config.httpdmaxconn); 707 716 break; 717 case oHTTPDRealm: 718 config.httpdrealm = safe_strdup(p1); 719 break; 720 case oHTTPDUsername: 721 config.httpdusername = safe_strdup(p1); 722 break; 723 case oHTTPDPassword: 724 config.httpdpassword = safe_strdup(p1); 725 break; 708 726 case oBadOption: 709 727 debug(LOG_ERR, "Bad option on line %d " … … 733 751 } 734 752 } 753 } 754 755 if (config.httpdusername && !config.httpdpassword) { 756 debug(LOG_ERR, "HTTPDUserName requires a HTTPDPassword to be set."); 757 exit(-1); 735 758 } 736 759 -
trunk/wifidog/src/conf.h
r1346 r1369 142 142 int httpdmaxconn; /**< @brief Used by libhttpd, not sure what it 143 143 does */ 144 char *httpdrealm; /**< @brief HTTP Authentication realm */ 145 char *httpdusername; /**< @brief Username for HTTP authentication */ 146 char *httpdpassword; /**< @brief Password for HTTP authentication */ 144 147 int clienttimeout; /**< @brief How many CheckIntervals before a client 145 148 must be re-authenticated */ -
trunk/wifidog/wifidog.conf
r1346 r1369 110 110 # How many sockets to listen to 111 111 # HTTPDMaxConn 10 112 113 # Parameter: HTTPDRealm 114 # Default: WiFiDog 115 # Optional 116 # 117 # The name of the HTTP authentication realm. This only used when a user 118 # tries to access a protected WiFiDog internal page. See HTTPUserName. 119 # HTTPDRealm WiFiDog 120 121 # Parameter: HTTPDUserName / HTTPDPassword 122 # Default: unset 123 # Optional 124 # 125 # The gateway exposes some information such as the status page through its web 126 # interface. This information can be protected with a username and password, 127 # which can be set through the HTTPDUserName and HTTPDPassword parameters. 128 # HTTPDUserName admin 129 # HTTPDPassword secret 112 130 113 131 # Parameter: CheckInterval
