Fossil SCM

Provide the full pathname of the CGI control file when describing how to activate the error log in the errorlog page, and on the security audit.

drh 2024-03-29 13:15 trunk
Commit 4644ebef642afe3e6369407eb9d5eb9123b8a8b07c9cc9d66bf87485a1ef9831
1 file changed +12 -2
--- src/security_audit.c
+++ src/security_audit.c
@@ -698,10 +698,16 @@
698698
blob_init(&cmd, 0, 0);
699699
for(i=0; g.argvOrig[i]!=0; i++){
700700
blob_append_escaped_arg(&cmd, g.argvOrig[i], 0);
701701
}
702702
@ <li><p>
703
+ if( g.zCgiFile ){
704
+ Blob fullname;
705
+ blob_init(&fullname, 0, 0);
706
+ file_canonical_name(g.zCgiFile, &fullname, 0);
707
+ @ The CGI control file for this page is "%h(blob_str(&fullname))".
708
+ }
703709
@ The command that generated this page:
704710
@ <blockquote>
705711
@ <tt>%h(blob_str(&cmd))</tt>
706712
@ </blockquote></li>
707713
blob_zero(&cmd);
@@ -759,15 +765,19 @@
759765
@ <p>No error log is configured.
760766
if( g.zCgiFile==0 ){
761767
@ To create an error log, add the "--errorlog FILENAME"
762768
@ command-line option to the command that launches the Fossil server.
763769
}else{
764
- @ To create an error log, edit the CGI control file "%h(g.zCgiFile)"
765
- @ to add line like this:
770
+ Blob fullname;
771
+ blob_init(&fullname, 0, 0);
772
+ file_canonical_name(g.zCgiFile, &fullname, 0);
773
+ @ To create an error log, edit the CGI control file
774
+ @ named "%h(blob_str(&fullname))" to add a line like this:
766775
@ <blockquote><pre>
767776
@ errorlog: <i>FILENAME</i>
768777
@ </pre></blockquote>
778
+ blob_reset(&fullname);
769779
}
770780
}
771781
772782
/*
773783
** The maximum number of bytes of the error log to show by default.
774784
--- src/security_audit.c
+++ src/security_audit.c
@@ -698,10 +698,16 @@
698 blob_init(&cmd, 0, 0);
699 for(i=0; g.argvOrig[i]!=0; i++){
700 blob_append_escaped_arg(&cmd, g.argvOrig[i], 0);
701 }
702 @ <li><p>
 
 
 
 
 
 
703 @ The command that generated this page:
704 @ <blockquote>
705 @ <tt>%h(blob_str(&cmd))</tt>
706 @ </blockquote></li>
707 blob_zero(&cmd);
@@ -759,15 +765,19 @@
759 @ <p>No error log is configured.
760 if( g.zCgiFile==0 ){
761 @ To create an error log, add the "--errorlog FILENAME"
762 @ command-line option to the command that launches the Fossil server.
763 }else{
764 @ To create an error log, edit the CGI control file "%h(g.zCgiFile)"
765 @ to add line like this:
 
 
 
766 @ <blockquote><pre>
767 @ errorlog: <i>FILENAME</i>
768 @ </pre></blockquote>
 
769 }
770 }
771
772 /*
773 ** The maximum number of bytes of the error log to show by default.
774
--- src/security_audit.c
+++ src/security_audit.c
@@ -698,10 +698,16 @@
698 blob_init(&cmd, 0, 0);
699 for(i=0; g.argvOrig[i]!=0; i++){
700 blob_append_escaped_arg(&cmd, g.argvOrig[i], 0);
701 }
702 @ <li><p>
703 if( g.zCgiFile ){
704 Blob fullname;
705 blob_init(&fullname, 0, 0);
706 file_canonical_name(g.zCgiFile, &fullname, 0);
707 @ The CGI control file for this page is "%h(blob_str(&fullname))".
708 }
709 @ The command that generated this page:
710 @ <blockquote>
711 @ <tt>%h(blob_str(&cmd))</tt>
712 @ </blockquote></li>
713 blob_zero(&cmd);
@@ -759,15 +765,19 @@
765 @ <p>No error log is configured.
766 if( g.zCgiFile==0 ){
767 @ To create an error log, add the "--errorlog FILENAME"
768 @ command-line option to the command that launches the Fossil server.
769 }else{
770 Blob fullname;
771 blob_init(&fullname, 0, 0);
772 file_canonical_name(g.zCgiFile, &fullname, 0);
773 @ To create an error log, edit the CGI control file
774 @ named "%h(blob_str(&fullname))" to add a line like this:
775 @ <blockquote><pre>
776 @ errorlog: <i>FILENAME</i>
777 @ </pre></blockquote>
778 blob_reset(&fullname);
779 }
780 }
781
782 /*
783 ** The maximum number of bytes of the error log to show by default.
784

Keyboard Shortcuts

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