Fossil SCM
Change default values of various settings: admin-log=ON, access-log=ON, authsync=ON, timeline-plaintext=OFF.
Commit
bdf12f44e64c02deb3cadf38d5ac54a4fab52a930766560fae5210c18729bd00
Parent
74a5e10b9b281f1…
3 files changed
+2
-9
+2
-2
+3
-3
M
src/db.c
+2
-9
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -3204,23 +3204,16 @@ | ||
| 3204 | 3204 | |
| 3205 | 3205 | db_unprotect(PROTECT_ALL); |
| 3206 | 3206 | db_set("content-schema", CONTENT_SCHEMA, 0); |
| 3207 | 3207 | db_set("aux-schema", AUX_SCHEMA_MAX, 0); |
| 3208 | 3208 | db_set("rebuilt", get_version(), 0); |
| 3209 | - db_set("admin-log", "1", 0); | |
| 3210 | - db_set("access-log", "1", 0); | |
| 3211 | 3209 | db_multi_exec( |
| 3212 | 3210 | "INSERT INTO config(name,value,mtime)" |
| 3213 | 3211 | " VALUES('server-code', lower(hex(randomblob(20))),now());" |
| 3214 | 3212 | "INSERT INTO config(name,value,mtime)" |
| 3215 | 3213 | " VALUES('project-code', lower(hex(randomblob(20))),now());" |
| 3216 | 3214 | ); |
| 3217 | - if( !db_is_global("autosync") ) db_set_int("autosync", 1, 0); | |
| 3218 | - if( !db_is_global("localauth") ) db_set_int("localauth", 0, 0); | |
| 3219 | - if( !db_is_global("timeline-plaintext") ){ | |
| 3220 | - db_set_int("timeline-plaintext", 1, 0); | |
| 3221 | - } | |
| 3222 | 3215 | db_create_default_users(0, zDefaultUser); |
| 3223 | 3216 | if( zDefaultUser ) g.zLogin = zDefaultUser; |
| 3224 | 3217 | user_select(); |
| 3225 | 3218 | |
| 3226 | 3219 | if( zTemplate ){ |
| @@ -4570,18 +4563,18 @@ | ||
| 4570 | 4563 | }; |
| 4571 | 4564 | |
| 4572 | 4565 | #endif /* INTERFACE */ |
| 4573 | 4566 | |
| 4574 | 4567 | /* |
| 4575 | -** SETTING: access-log boolean default=off | |
| 4568 | +** SETTING: access-log boolean default=on | |
| 4576 | 4569 | ** |
| 4577 | 4570 | ** When the access-log setting is enabled, all login attempts (successful |
| 4578 | 4571 | ** and unsuccessful) on the web interface are recorded in the "access" table |
| 4579 | 4572 | ** of the repository. |
| 4580 | 4573 | */ |
| 4581 | 4574 | /* |
| 4582 | -** SETTING: admin-log boolean default=off | |
| 4575 | +** SETTING: admin-log boolean default=on | |
| 4583 | 4576 | ** |
| 4584 | 4577 | ** When the admin-log setting is enabled, configuration changes are recorded |
| 4585 | 4578 | ** in the "admin_log" table of the repository. |
| 4586 | 4579 | */ |
| 4587 | 4580 | /* |
| 4588 | 4581 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -3204,23 +3204,16 @@ | |
| 3204 | |
| 3205 | db_unprotect(PROTECT_ALL); |
| 3206 | db_set("content-schema", CONTENT_SCHEMA, 0); |
| 3207 | db_set("aux-schema", AUX_SCHEMA_MAX, 0); |
| 3208 | db_set("rebuilt", get_version(), 0); |
| 3209 | db_set("admin-log", "1", 0); |
| 3210 | db_set("access-log", "1", 0); |
| 3211 | db_multi_exec( |
| 3212 | "INSERT INTO config(name,value,mtime)" |
| 3213 | " VALUES('server-code', lower(hex(randomblob(20))),now());" |
| 3214 | "INSERT INTO config(name,value,mtime)" |
| 3215 | " VALUES('project-code', lower(hex(randomblob(20))),now());" |
| 3216 | ); |
| 3217 | if( !db_is_global("autosync") ) db_set_int("autosync", 1, 0); |
| 3218 | if( !db_is_global("localauth") ) db_set_int("localauth", 0, 0); |
| 3219 | if( !db_is_global("timeline-plaintext") ){ |
| 3220 | db_set_int("timeline-plaintext", 1, 0); |
| 3221 | } |
| 3222 | db_create_default_users(0, zDefaultUser); |
| 3223 | if( zDefaultUser ) g.zLogin = zDefaultUser; |
| 3224 | user_select(); |
| 3225 | |
| 3226 | if( zTemplate ){ |
| @@ -4570,18 +4563,18 @@ | |
| 4570 | }; |
| 4571 | |
| 4572 | #endif /* INTERFACE */ |
| 4573 | |
| 4574 | /* |
| 4575 | ** SETTING: access-log boolean default=off |
| 4576 | ** |
| 4577 | ** When the access-log setting is enabled, all login attempts (successful |
| 4578 | ** and unsuccessful) on the web interface are recorded in the "access" table |
| 4579 | ** of the repository. |
| 4580 | */ |
| 4581 | /* |
| 4582 | ** SETTING: admin-log boolean default=off |
| 4583 | ** |
| 4584 | ** When the admin-log setting is enabled, configuration changes are recorded |
| 4585 | ** in the "admin_log" table of the repository. |
| 4586 | */ |
| 4587 | /* |
| 4588 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -3204,23 +3204,16 @@ | |
| 3204 | |
| 3205 | db_unprotect(PROTECT_ALL); |
| 3206 | db_set("content-schema", CONTENT_SCHEMA, 0); |
| 3207 | db_set("aux-schema", AUX_SCHEMA_MAX, 0); |
| 3208 | db_set("rebuilt", get_version(), 0); |
| 3209 | db_multi_exec( |
| 3210 | "INSERT INTO config(name,value,mtime)" |
| 3211 | " VALUES('server-code', lower(hex(randomblob(20))),now());" |
| 3212 | "INSERT INTO config(name,value,mtime)" |
| 3213 | " VALUES('project-code', lower(hex(randomblob(20))),now());" |
| 3214 | ); |
| 3215 | db_create_default_users(0, zDefaultUser); |
| 3216 | if( zDefaultUser ) g.zLogin = zDefaultUser; |
| 3217 | user_select(); |
| 3218 | |
| 3219 | if( zTemplate ){ |
| @@ -4570,18 +4563,18 @@ | |
| 4563 | }; |
| 4564 | |
| 4565 | #endif /* INTERFACE */ |
| 4566 | |
| 4567 | /* |
| 4568 | ** SETTING: access-log boolean default=on |
| 4569 | ** |
| 4570 | ** When the access-log setting is enabled, all login attempts (successful |
| 4571 | ** and unsuccessful) on the web interface are recorded in the "access" table |
| 4572 | ** of the repository. |
| 4573 | */ |
| 4574 | /* |
| 4575 | ** SETTING: admin-log boolean default=on |
| 4576 | ** |
| 4577 | ** When the admin-log setting is enabled, configuration changes are recorded |
| 4578 | ** in the "admin_log" table of the repository. |
| 4579 | */ |
| 4580 | /* |
| 4581 |
+2
-2
| --- src/security_audit.c | ||
| +++ src/security_audit.c | ||
| @@ -553,17 +553,17 @@ | ||
| 553 | 553 | @ checkbox on the <a href="setup_access">Access Control</a> page. |
| 554 | 554 | } |
| 555 | 555 | |
| 556 | 556 | /* Logging should be turned on |
| 557 | 557 | */ |
| 558 | - if( db_get_boolean("access-log",0)==0 ){ | |
| 558 | + if( db_get_boolean("access-log",1)==0 ){ | |
| 559 | 559 | @ <li><p> |
| 560 | 560 | @ The <a href="access_log">User Log</a> is disabled. The user log |
| 561 | 561 | @ keeps a record of successful and unsuccessful login attempts and is |
| 562 | 562 | @ useful for security monitoring. |
| 563 | 563 | } |
| 564 | - if( db_get_boolean("admin-log",0)==0 ){ | |
| 564 | + if( db_get_boolean("admin-log",1)==0 ){ | |
| 565 | 565 | @ <li><p> |
| 566 | 566 | @ The <a href="admin_log">Administrative Log</a> is disabled. |
| 567 | 567 | @ The administrative log provides a record of configuration changes |
| 568 | 568 | @ and is useful for security monitoring. |
| 569 | 569 | } |
| 570 | 570 |
| --- src/security_audit.c | |
| +++ src/security_audit.c | |
| @@ -553,17 +553,17 @@ | |
| 553 | @ checkbox on the <a href="setup_access">Access Control</a> page. |
| 554 | } |
| 555 | |
| 556 | /* Logging should be turned on |
| 557 | */ |
| 558 | if( db_get_boolean("access-log",0)==0 ){ |
| 559 | @ <li><p> |
| 560 | @ The <a href="access_log">User Log</a> is disabled. The user log |
| 561 | @ keeps a record of successful and unsuccessful login attempts and is |
| 562 | @ useful for security monitoring. |
| 563 | } |
| 564 | if( db_get_boolean("admin-log",0)==0 ){ |
| 565 | @ <li><p> |
| 566 | @ The <a href="admin_log">Administrative Log</a> is disabled. |
| 567 | @ The administrative log provides a record of configuration changes |
| 568 | @ and is useful for security monitoring. |
| 569 | } |
| 570 |
| --- src/security_audit.c | |
| +++ src/security_audit.c | |
| @@ -553,17 +553,17 @@ | |
| 553 | @ checkbox on the <a href="setup_access">Access Control</a> page. |
| 554 | } |
| 555 | |
| 556 | /* Logging should be turned on |
| 557 | */ |
| 558 | if( db_get_boolean("access-log",1)==0 ){ |
| 559 | @ <li><p> |
| 560 | @ The <a href="access_log">User Log</a> is disabled. The user log |
| 561 | @ keeps a record of successful and unsuccessful login attempts and is |
| 562 | @ useful for security monitoring. |
| 563 | } |
| 564 | if( db_get_boolean("admin-log",1)==0 ){ |
| 565 | @ <li><p> |
| 566 | @ The <a href="admin_log">Administrative Log</a> is disabled. |
| 567 | @ The administrative log provides a record of configuration changes |
| 568 | @ and is useful for security monitoring. |
| 569 | } |
| 570 |
+3
-3
| --- src/setup.c | ||
| +++ src/setup.c | ||
| @@ -202,11 +202,11 @@ | ||
| 202 | 202 | return; |
| 203 | 203 | } |
| 204 | 204 | style_header("Log Menu"); |
| 205 | 205 | @ <table border="0" cellspacing="3"> |
| 206 | 206 | |
| 207 | - if( db_get_boolean("admin-log",0)==0 ){ | |
| 207 | + if( db_get_boolean("admin-log",1)==0 ){ | |
| 208 | 208 | blob_appendf(&desc, |
| 209 | 209 | "The admin log records configuration changes to the repository.\n" |
| 210 | 210 | "<b>Disabled</b>: Turn on the " |
| 211 | 211 | " <a href='%R/setup_settings'>admin-log setting</a> to enable." |
| 212 | 212 | ); |
| @@ -220,11 +220,11 @@ | ||
| 220 | 220 | } |
| 221 | 221 | setup_menu_entry("Artifact Log", "rcvfromlist", |
| 222 | 222 | "The artifact log records when new content is added in the\n" |
| 223 | 223 | "\"rcvfrom\" table.\n" |
| 224 | 224 | ); |
| 225 | - if( db_get_boolean("access-log",0) ){ | |
| 225 | + if( db_get_boolean("access-log",1) ){ | |
| 226 | 226 | setup_menu_entry("User Log", "user_log", |
| 227 | 227 | "Login attempts recorded in the \"accesslog\" table." |
| 228 | 228 | ); |
| 229 | 229 | }else{ |
| 230 | 230 | blob_appendf(&desc, |
| @@ -2144,11 +2144,11 @@ | ||
| 2144 | 2144 | style_header("Admin Log"); |
| 2145 | 2145 | style_submenu_element("Log-Menu", "setup-logmenu"); |
| 2146 | 2146 | create_admin_log_table(); |
| 2147 | 2147 | limit = atoi(PD("n","200")); |
| 2148 | 2148 | ofst = atoi(PD("x","0")); |
| 2149 | - fLogEnabled = db_get_boolean("admin-log", 0); | |
| 2149 | + fLogEnabled = db_get_boolean("admin-log", 1); | |
| 2150 | 2150 | @ <div>Admin logging is %s(fLogEnabled?"on":"off"). |
| 2151 | 2151 | @ (Change this on the <a href="setup_settings">settings</a> page.)</div> |
| 2152 | 2152 | |
| 2153 | 2153 | if( ofst>0 ){ |
| 2154 | 2154 | int prevx = ofst - limit; |
| 2155 | 2155 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -202,11 +202,11 @@ | |
| 202 | return; |
| 203 | } |
| 204 | style_header("Log Menu"); |
| 205 | @ <table border="0" cellspacing="3"> |
| 206 | |
| 207 | if( db_get_boolean("admin-log",0)==0 ){ |
| 208 | blob_appendf(&desc, |
| 209 | "The admin log records configuration changes to the repository.\n" |
| 210 | "<b>Disabled</b>: Turn on the " |
| 211 | " <a href='%R/setup_settings'>admin-log setting</a> to enable." |
| 212 | ); |
| @@ -220,11 +220,11 @@ | |
| 220 | } |
| 221 | setup_menu_entry("Artifact Log", "rcvfromlist", |
| 222 | "The artifact log records when new content is added in the\n" |
| 223 | "\"rcvfrom\" table.\n" |
| 224 | ); |
| 225 | if( db_get_boolean("access-log",0) ){ |
| 226 | setup_menu_entry("User Log", "user_log", |
| 227 | "Login attempts recorded in the \"accesslog\" table." |
| 228 | ); |
| 229 | }else{ |
| 230 | blob_appendf(&desc, |
| @@ -2144,11 +2144,11 @@ | |
| 2144 | style_header("Admin Log"); |
| 2145 | style_submenu_element("Log-Menu", "setup-logmenu"); |
| 2146 | create_admin_log_table(); |
| 2147 | limit = atoi(PD("n","200")); |
| 2148 | ofst = atoi(PD("x","0")); |
| 2149 | fLogEnabled = db_get_boolean("admin-log", 0); |
| 2150 | @ <div>Admin logging is %s(fLogEnabled?"on":"off"). |
| 2151 | @ (Change this on the <a href="setup_settings">settings</a> page.)</div> |
| 2152 | |
| 2153 | if( ofst>0 ){ |
| 2154 | int prevx = ofst - limit; |
| 2155 |
| --- src/setup.c | |
| +++ src/setup.c | |
| @@ -202,11 +202,11 @@ | |
| 202 | return; |
| 203 | } |
| 204 | style_header("Log Menu"); |
| 205 | @ <table border="0" cellspacing="3"> |
| 206 | |
| 207 | if( db_get_boolean("admin-log",1)==0 ){ |
| 208 | blob_appendf(&desc, |
| 209 | "The admin log records configuration changes to the repository.\n" |
| 210 | "<b>Disabled</b>: Turn on the " |
| 211 | " <a href='%R/setup_settings'>admin-log setting</a> to enable." |
| 212 | ); |
| @@ -220,11 +220,11 @@ | |
| 220 | } |
| 221 | setup_menu_entry("Artifact Log", "rcvfromlist", |
| 222 | "The artifact log records when new content is added in the\n" |
| 223 | "\"rcvfrom\" table.\n" |
| 224 | ); |
| 225 | if( db_get_boolean("access-log",1) ){ |
| 226 | setup_menu_entry("User Log", "user_log", |
| 227 | "Login attempts recorded in the \"accesslog\" table." |
| 228 | ); |
| 229 | }else{ |
| 230 | blob_appendf(&desc, |
| @@ -2144,11 +2144,11 @@ | |
| 2144 | style_header("Admin Log"); |
| 2145 | style_submenu_element("Log-Menu", "setup-logmenu"); |
| 2146 | create_admin_log_table(); |
| 2147 | limit = atoi(PD("n","200")); |
| 2148 | ofst = atoi(PD("x","0")); |
| 2149 | fLogEnabled = db_get_boolean("admin-log", 1); |
| 2150 | @ <div>Admin logging is %s(fLogEnabled?"on":"off"). |
| 2151 | @ (Change this on the <a href="setup_settings">settings</a> page.)</div> |
| 2152 | |
| 2153 | if( ofst>0 ){ |
| 2154 | int prevx = ofst - limit; |
| 2155 |