about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-01-12 18:37:32 -0500
committerJune McEnroe <june@causal.agency>2020-01-12 18:40:28 -0500
commitd24f385f9979c6c8a2e7bc0bc5f0b8bf5b659433 (patch)
tree2aa3cbc9d05a46d8bbc2a5fa9f0a7724a81e3cb5
parentUse the CAP_PREAD right (diff)
downloadpounce-d24f385f9979c6c8a2e7bc0bc5f0b8bf5b659433.tar.gz
pounce-d24f385f9979c6c8a2e7bc0bc5f0b8bf5b659433.zip
Rename all local-related options to local-
This disambiguates client-ca and client-pass from client-cert and
client-key, which apply to opposite sides of the program.

The old option names will continue to work.
-rw-r--r--bounce.c24
-rw-r--r--pounce.116
2 files changed, 25 insertions, 15 deletions
diff --git a/bounce.c b/bounce.c
index ac30cd9..ebd39ba 100644
--- a/bounce.c
+++ b/bounce.c
@@ -236,14 +236,14 @@ int main(int argc, char *argv[]) {
 	const char *Opts = "!A:C:H:K:NP:U:W:a:c:ef:g:h:j:k:n:p:q:r:s:u:vw:xy:";
 	const struct option LongOpts[] = {
 		{ "insecure", no_argument, NULL, '!' },
-		{ "client-ca", required_argument, NULL, 'A' },
-		{ "cert", required_argument, NULL, 'C' },
-		{ "bind-host", required_argument, NULL, 'H' },
-		{ "priv", required_argument, NULL, 'K' },
+		{ "local-ca", required_argument, NULL, 'A' },
+		{ "local-cert", required_argument, NULL, 'C' },
+		{ "local-host", required_argument, NULL, 'H' },
+		{ "local-priv", required_argument, NULL, 'K' },
 		{ "no-names", no_argument, NULL, 'N' },
-		{ "bind-port", required_argument, NULL, 'P' },
-		{ "bind-path", required_argument, NULL, 'U' },
-		{ "client-pass", required_argument, NULL, 'W' },
+		{ "local-port", required_argument, NULL, 'P' },
+		{ "local-path", required_argument, NULL, 'U' },
+		{ "local-pass", required_argument, NULL, 'W' },
 		{ "sasl-plain", required_argument, NULL, 'a' },
 		{ "client-cert", required_argument, NULL, 'c' },
 		{ "sasl-external", no_argument, NULL, 'e' },
@@ -260,6 +260,16 @@ int main(int argc, char *argv[]) {
 		{ "verbose", no_argument, NULL, 'v' },
 		{ "pass", required_argument, NULL, 'w' },
 		{ "away", required_argument, NULL, 'y' },
+
+		// Deprecated:
+		{ "client-ca", required_argument, NULL, 'A' },
+		{ "cert", required_argument, NULL, 'C' },
+		{ "bind-host", required_argument, NULL, 'H' },
+		{ "priv", required_argument, NULL, 'K' },
+		{ "bind-port", required_argument, NULL, 'P' },
+		{ "bind-path", required_argument, NULL, 'U' },
+		{ "client-pass", required_argument, NULL, 'W' },
+
 		{0},
 	};
 
diff --git a/pounce.1 b/pounce.1
index 3aed409..ee3f686 100644
--- a/pounce.1
+++ b/pounce.1
@@ -69,7 +69,7 @@ following their corresponding flags.
 The arguments are as follows:
 .
 .Bl -tag -width Ds
-.It Fl A Ar path , Cm client-ca = Ar path
+.It Fl A Ar path , Cm local-ca = Ar path
 Load the TLS client certificate authority (CA) from
 .Ar path .
 If
@@ -83,7 +83,7 @@ is also set,
 clients may either connect using the password
 or a client certificate.
 .
-.It Fl C Ar path , Cm cert = Ar path
+.It Fl C Ar path , Cm local-cert = Ar path
 Load TLS certificate from
 .Ar path .
 The default path is the
@@ -93,12 +93,12 @@ path for the
 set by
 .Fl H .
 .
-.It Fl H Ar host , Cm bind-host = Ar host
+.It Fl H Ar host , Cm local-host = Ar host
 Bind to
 .Ar host .
 The default host is localhost.
 .
-.It Fl K Ar path , Cm priv = Ar path
+.It Fl K Ar path , Cm local-priv = Ar path
 Load TLS private key from
 .Ar path .
 The default path is the
@@ -116,12 +116,12 @@ This avoids already connected clients
 receiving unsolicited responses
 but prevents new clients from populating user lists.
 .
-.It Fl P Ar port , Cm bind-port = Ar port
+.It Fl P Ar port , Cm local-port = Ar port
 Bind to
 .Ar port .
 The default port is 6697.
 .
-.It Fl U Ar path , Cm bind-path = Ar path
+.It Fl U Ar path , Cm local-path = Ar path
 Bind to a UNIX-domain socket at
 .Ar path .
 Clients are accepted as sent by
@@ -139,7 +139,7 @@ This option takes precedence over
 and
 .Fl P .
 .
-.It Fl W Ar pass , Cm client-pass = Ar pass
+.It Fl W Ar pass , Cm local-pass = Ar pass
 Require the server password
 .Ar pass
 for clients to connect.
@@ -437,7 +437,7 @@ pounce -H pounce.example.org -h chat.freenode.net -j '#ascii.town'
 .Pp
 Configuration in a file:
 .Bd -literal -offset indent
-bind-host = pounce.example.org
+local-host = pounce.example.org
 host = chat.freenode.net
 join = #ascii.town
 .Ed