aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoni Sawicki <tenox@google.com>2022-06-25 02:53:49 -0700
committerAntoni Sawicki <tenox@google.com>2022-06-25 02:53:49 -0700
commitac3841dadbb8a193471d0981c5aed2239d9661e7 (patch)
tree85aea9219aac1a0556eb47551b4e3dee0282d5d1
parent28523a9bb05ce2242c9ff2e0d6c40e8c099cb644 (diff)
downloadwfm-ac3841dadbb8a193471d0981c5aed2239d9661e7.tar.gz
add site name flag
-rw-r--r--dir.go2
-rw-r--r--web.go2
-rw-r--r--wfm.go1
3 files changed, 3 insertions, 2 deletions
diff --git a/dir.go b/dir.go
index a7a3906..b659b84 100644
--- a/dir.go
+++ b/dir.go
@@ -133,7 +133,7 @@ func toolbars(w http.ResponseWriter, uDir, user string, sl []string, i map[strin
w.Write([]byte(`
<TABLE WIDTH="100%" BGCOLOR="#FFFFFF" CELLPADDING="0" CELLSPACING="0" BORDER="0" STYLE="height:28px;"><TR>
<TD NOWRAP WIDTH="100%" BGCOLOR="#0072c6" VALIGN="MIDDLE" ALIGN="LEFT" STYLE="color:#FFFFFF; font-weight:bold;">
- <FONT COLOR="#FFFFFF">&nbsp;` + i["tcd"] + eDir + `</FONT>
+ <FONT COLOR="#FFFFFF">&nbsp;` + *siteName + `&nbsp;` + eDir + `</FONT>
</TD>
<TD NOWRAP BGCOLOR="#F1F1F1" VALIGN="MIDDLE" ALIGN="RIGHT" STYLE="color:#000000; white-space:nowrap">
<A HREF="` + *wfmPfx + `?fn=logout">` + i["tid"] + user + `</A>
diff --git a/web.go b/web.go
index a1d745c..3602d73 100644
--- a/web.go
+++ b/web.go
@@ -39,7 +39,7 @@ func header(w http.ResponseWriter, uDir, sort, extraCSS string) {
<META NAME="viewport" CONTENT="width=device-width">
<LINK REL="icon" TYPE="image/x-icon" HREF="/favicon.ico">
<LINK REL="shortcut icon" HREF="/favicon.ico?">
-<TITLE>WFM ` + eDir + `</TITLE>
+<TITLE>` + *siteName + ` ` + eDir + `</TITLE>
<STYLE TYPE="text/css"><!--
A:link {text-decoration: none; color:#0000CE; }
A:visited {text-decoration: none; color:#0000CE; }
diff --git a/wfm.go b/wfm.go
index edaf2a2..122a7fa 100644
--- a/wfm.go
+++ b/wfm.go
@@ -29,6 +29,7 @@ var (
chrootDir = flag.String("chroot", "", "Directory to chroot to")
suidUser = flag.String("setuid", "", "Username to setuid to")
allowRoot = flag.Bool("allow_root", false, "allow to run as uid=0/root without setuid")
+ siteName = flag.String("site_name", "WFM", "local site name to display")
logFile = flag.String("logfile", "", "Log file name (default stdout)")
passwdDb = flag.String("passwd", "", "wfm password file, eg: /usr/local/etc/wfmpw.json")
noPwdDbRW = flag.Bool("nopass_rw", false, "allow read-write access if there is no password file")