diff cli-runopts.c @ 1212:bf626d259eb1

Support syslog logging in dbclient.
author Konstantin Tokarev <ktokarev@smartlabs.tv>
date Tue, 01 Dec 2015 21:55:34 +0300
parents 64a50eac1030
children 7fd1211a1f63
line wrap: on
line diff
--- a/cli-runopts.c	Tue Dec 01 21:54:03 2015 +0300
+++ b/cli-runopts.c	Tue Dec 01 21:55:34 2015 +0300
@@ -864,6 +864,9 @@
 #ifdef ENABLE_CLI_ANYTCPFWD
 			"\tExitOnForwardFailure\n"
 #endif
+#ifndef DISABLE_SYSLOG
+			"\tUseSyslog\n"
+#endif
 		);
 		exit(EXIT_SUCCESS);
 	}
@@ -875,5 +878,12 @@
 	}
 #endif
 
+#ifndef DISABLE_SYSLOG
+	if (match_extendedopt(&optstr, "UseSyslog") == DROPBEAR_SUCCESS) {
+		opts.usingsyslog = parse_flag_value(optstr);
+		return;
+	}
+#endif
+
 	dropbear_exit("Bad configuration option '%s'", origstr);
 }