[Pkg-privacy-commits] [onioncat] 193/241: syslog behavior slightly modified

Intrigeri intrigeri at moszumanska.debian.org
Wed Aug 26 16:17:06 UTC 2015


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to branch upstream-master
in repository onioncat.

commit af5cd409fb55f1542cbf1c25b73d5d6ab7741d60
Author: eagle <eagle at 58e1ccc2-750e-0410-8d0d-f93ca75ab447>
Date:   Thu Sep 17 17:55:06 2009 +0000

    syslog behavior slightly modified
    
    git-svn-id: https://www.cypherpunk.at/svn/onioncat/trunk@514 58e1ccc2-750e-0410-8d0d-f93ca75ab447
---
 configure       | 22 +++++++++++-----------
 man/ocat.1      | 12 +++++++-----
 src/ocat.c      |  7 +++++--
 src/ocat.h      |  1 +
 src/ocatsetup.c |  1 +
 5 files changed, 25 insertions(+), 18 deletions(-)

diff --git a/configure b/configure
index 9f115e4..5f4bd8a 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62 for onioncat 0.2.0.r513.
+# Generated by GNU Autoconf 2.62 for onioncat 0.2.0.r514.
 #
 # Report bugs to <rahra at cypherpunk.at>.
 #
@@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='onioncat'
 PACKAGE_TARNAME='onioncat'
-PACKAGE_VERSION='0.2.0.r513'
-PACKAGE_STRING='onioncat 0.2.0.r513'
+PACKAGE_VERSION='0.2.0.r514'
+PACKAGE_STRING='onioncat 0.2.0.r514'
 PACKAGE_BUGREPORT='rahra at cypherpunk.at'
 
 ac_subst_vars='SHELL
@@ -1259,7 +1259,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures onioncat 0.2.0.r513 to adapt to many kinds of systems.
+\`configure' configures onioncat 0.2.0.r514 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1329,7 +1329,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of onioncat 0.2.0.r513:";;
+     short | recursive ) echo "Configuration of onioncat 0.2.0.r514:";;
    esac
   cat <<\_ACEOF
 
@@ -1421,7 +1421,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-onioncat configure 0.2.0.r513
+onioncat configure 0.2.0.r514
 generated by GNU Autoconf 2.62
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1435,7 +1435,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by onioncat $as_me 0.2.0.r513, which was
+It was created by onioncat $as_me 0.2.0.r514, which was
 generated by GNU Autoconf 2.62.  Invocation command line was
 
   $ $0 $@
@@ -2084,7 +2084,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='onioncat'
- VERSION='0.2.0.r513'
+ VERSION='0.2.0.r514'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2235,7 +2235,7 @@ ac_config_headers="$ac_config_headers config.h"
 
 
 cat >>confdefs.h <<\_ACEOF
-#define SVN_REVISION "513"
+#define SVN_REVISION "514"
 _ACEOF
 
 
@@ -5208,7 +5208,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by onioncat $as_me 0.2.0.r513, which was
+This file was extended by onioncat $as_me 0.2.0.r514, which was
 generated by GNU Autoconf 2.62.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -5261,7 +5261,7 @@ Report bugs to <bug-autoconf at gnu.org>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-onioncat config.status 0.2.0.r513
+onioncat config.status 0.2.0.r514
 configured by $0, generated by GNU Autoconf 2.62,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
 
diff --git a/man/ocat.1 b/man/ocat.1
index d74d5e2..4118dad 100644
--- a/man/ocat.1
+++ b/man/ocat.1
@@ -64,7 +64,7 @@ Run OnionCat in background. This is default. OnionCat will detach from a running
 shell and close standard IO if no log file is given with option -L.
 .TP
 \fB\-B\fP
-Run OnionCat in foreground.
+Run OnionCat in foreground. OnionCat will log to stderr by default.
 .TP
 \fB\-C\fP
 Disable the local controller interface. The controller interfaces listens on
@@ -94,7 +94,9 @@ multiple times. IPv6 addresses must be given in square brackets.
 .TP
 \fB\-L\fP \fIlog_file\fP
 Log output to \fIlog_file\fP. If option is omitted, OnionCat logs to syslog if
-running in background or to stderr if running in foreground.
+running in background or to stderr if running in foreground. If syslogging is
+desired while running in foreground, specify the special file name "syslog" as
+log file.
 .TP
 \fB\-o\fP \fIIPv6 address\fP
 Convert \fIIPv6 address\fP to \fIonion_id\fP and exit program.
@@ -104,9 +106,9 @@ Use TAP device instead of TUN device. There are a view differences. See \fBTAP
 DEVICE\fP later.
 .TP
 \fB\-P\fP \fI[pid file]\fP
-Create \fIpid file\fP at \fIpid_file\fP. If the parameter is omitted OC will
-create a pid file at \fB/var/run/ocat.pid\fP. If this option is set without
-parameter it MUST NOT be the last option in the list of options.
+Create \fIpid file\fP at \fIpid_file\fP. If the option parameter is omitted OC
+will create a pid file at \fB/var/run/ocat.pid\fP. In the latter case it MUST
+NOT be the last option in the list of options.
 .TP
 \fB\-r\fP
 Run OnionCat as root and do not change user id (see option \fB\-u\fP).
diff --git a/src/ocat.c b/src/ocat.c
index 89cbbf5..2c8e21a 100644
--- a/src/ocat.c
+++ b/src/ocat.c
@@ -280,7 +280,10 @@ int main(int argc, char *argv[])
             break;
 
          case 'L':
-            CNF(logfn) = optarg;
+            if (!strcmp(optarg, "syslog"))
+               CNF(use_syslog) = 1;
+            else
+               CNF(logfn) = optarg;
             break;
 
          case 'o':
@@ -344,7 +347,7 @@ int main(int argc, char *argv[])
       CNF(daemon) = 0;
 
    // log to stderr if in foreground
-   if (!CNF(daemon))
+   if (!CNF(daemon) && !CNF(use_syslog))
       CNF(logf) = stderr;
  
    if ((open_logfile() == -1) && !CNF(logf))
diff --git a/src/ocat.h b/src/ocat.h
index ea990c3..bd8e918 100644
--- a/src/ocat.h
+++ b/src/ocat.h
@@ -279,6 +279,7 @@ struct OcatSetup
    int create_pid_file;
    char *logfn;
    FILE *logf;
+   int use_syslog;
    int daemon;
    //! hardcoded permanent peers
 #define ROOT_PEERS 1
diff --git a/src/ocatsetup.c b/src/ocatsetup.c
index efc68a4..0278a0c 100644
--- a/src/ocatsetup.c
+++ b/src/ocatsetup.c
@@ -63,6 +63,7 @@ struct OcatSetup setup_ =
    PID_FILE,                               // pid_file
    0,                                      // create_pid_file
    NULL, NULL,                             // logfile
+   0,                                      // use_syslog
 #ifdef __CYGWIN__
    0,
 #else

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onioncat.git



More information about the Pkg-privacy-commits mailing list