Fossil SCM

Change default values of various settings: admin-log=ON, access-log=ON, authsync=ON, timeline-plaintext=OFF.

drh 2025-03-20 17:34 trunk
Commit bdf12f44e64c02deb3cadf38d5ac54a4fab52a930766560fae5210c18729bd00
+2 -9
--- src/db.c
+++ src/db.c
@@ -3204,23 +3204,16 @@
32043204
32053205
db_unprotect(PROTECT_ALL);
32063206
db_set("content-schema", CONTENT_SCHEMA, 0);
32073207
db_set("aux-schema", AUX_SCHEMA_MAX, 0);
32083208
db_set("rebuilt", get_version(), 0);
3209
- db_set("admin-log", "1", 0);
3210
- db_set("access-log", "1", 0);
32113209
db_multi_exec(
32123210
"INSERT INTO config(name,value,mtime)"
32133211
" VALUES('server-code', lower(hex(randomblob(20))),now());"
32143212
"INSERT INTO config(name,value,mtime)"
32153213
" VALUES('project-code', lower(hex(randomblob(20))),now());"
32163214
);
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
- }
32223215
db_create_default_users(0, zDefaultUser);
32233216
if( zDefaultUser ) g.zLogin = zDefaultUser;
32243217
user_select();
32253218
32263219
if( zTemplate ){
@@ -4570,18 +4563,18 @@
45704563
};
45714564
45724565
#endif /* INTERFACE */
45734566
45744567
/*
4575
-** SETTING: access-log boolean default=off
4568
+** SETTING: access-log boolean default=on
45764569
**
45774570
** When the access-log setting is enabled, all login attempts (successful
45784571
** and unsuccessful) on the web interface are recorded in the "access" table
45794572
** of the repository.
45804573
*/
45814574
/*
4582
-** SETTING: admin-log boolean default=off
4575
+** SETTING: admin-log boolean default=on
45834576
**
45844577
** When the admin-log setting is enabled, configuration changes are recorded
45854578
** in the "admin_log" table of the repository.
45864579
*/
45874580
/*
45884581
--- 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
--- src/security_audit.c
+++ src/security_audit.c
@@ -553,17 +553,17 @@
553553
@ checkbox on the <a href="setup_access">Access Control</a> page.
554554
}
555555
556556
/* Logging should be turned on
557557
*/
558
- if( db_get_boolean("access-log",0)==0 ){
558
+ if( db_get_boolean("access-log",1)==0 ){
559559
@ <li><p>
560560
@ The <a href="access_log">User Log</a> is disabled. The user log
561561
@ keeps a record of successful and unsuccessful login attempts and is
562562
@ useful for security monitoring.
563563
}
564
- if( db_get_boolean("admin-log",0)==0 ){
564
+ if( db_get_boolean("admin-log",1)==0 ){
565565
@ <li><p>
566566
@ The <a href="admin_log">Administrative Log</a> is disabled.
567567
@ The administrative log provides a record of configuration changes
568568
@ and is useful for security monitoring.
569569
}
570570
--- 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 @@
202202
return;
203203
}
204204
style_header("Log Menu");
205205
@ <table border="0" cellspacing="3">
206206
207
- if( db_get_boolean("admin-log",0)==0 ){
207
+ if( db_get_boolean("admin-log",1)==0 ){
208208
blob_appendf(&desc,
209209
"The admin log records configuration changes to the repository.\n"
210210
"<b>Disabled</b>: Turn on the "
211211
" <a href='%R/setup_settings'>admin-log setting</a> to enable."
212212
);
@@ -220,11 +220,11 @@
220220
}
221221
setup_menu_entry("Artifact Log", "rcvfromlist",
222222
"The artifact log records when new content is added in the\n"
223223
"\"rcvfrom\" table.\n"
224224
);
225
- if( db_get_boolean("access-log",0) ){
225
+ if( db_get_boolean("access-log",1) ){
226226
setup_menu_entry("User Log", "user_log",
227227
"Login attempts recorded in the \"accesslog\" table."
228228
);
229229
}else{
230230
blob_appendf(&desc,
@@ -2144,11 +2144,11 @@
21442144
style_header("Admin Log");
21452145
style_submenu_element("Log-Menu", "setup-logmenu");
21462146
create_admin_log_table();
21472147
limit = atoi(PD("n","200"));
21482148
ofst = atoi(PD("x","0"));
2149
- fLogEnabled = db_get_boolean("admin-log", 0);
2149
+ fLogEnabled = db_get_boolean("admin-log", 1);
21502150
@ <div>Admin logging is %s(fLogEnabled?"on":"off").
21512151
@ (Change this on the <a href="setup_settings">settings</a> page.)</div>
21522152
21532153
if( ofst>0 ){
21542154
int prevx = ofst - limit;
21552155
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button