[Pkg-privacy-commits] [onioncat] 40/340: semaphore/shared mem/message queue example imported

Ximin Luo infinity0 at moszumanska.debian.org
Sat Aug 22 13:04:23 UTC 2015


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

infinity0 pushed a commit to branch debian
in repository onioncat.

commit fc93dac5f8e7ab3b275fd68f69e0122edd7826b2
Author: eagle <eagle at 58e1ccc2-750e-0410-8d0d-f93ca75ab447>
Date:   Fri Apr 11 16:29:57 2008 +0000

    semaphore/shared mem/message queue example imported
    
    git-svn-id: http://www.cypherpunk.at/svn/onioncat/trunk@189 58e1ccc2-750e-0410-8d0d-f93ca75ab447
---
 ocat.c | 14 ++++++++++----
 ocat.h |  4 ++++
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/ocat.c b/ocat.c
index d8de2d1..fb8f27d 100644
--- a/ocat.c
+++ b/ocat.c
@@ -29,6 +29,7 @@ void usage(const char *s)
          "usage: %s [OPTIONS] <onion_hostname>\n"
          "   -h                    display usage message\n"
          "   -d <n>                set debug level to n, default = %d\n"
+         "   -g <group>            change GID to group, default = \"%s\"\n"
          "   -i <onion_hostname>   convert onion hostname to IPv6 and exit\n"
          "   -l <port>             set ocat listen port, default = %d\n"
          "   -o <ipv6_addr>        convert IPv6 address to onion url and exit\n"
@@ -37,10 +38,15 @@ void usage(const char *s)
          "   -t <port>             set tor SOCKS port, default = %d\n"
 #ifndef WITHOUT_TUN
          "   -p                    test tun header and exit\n"
-         "   -T <tun_device>       path to tun character device\n"
+         "   -T <tun_device>       path to tun character device, default = \"%s\"\n"
 #endif
+         "   -u <user>             change UID to user, default = \"%s\"\n"
          "   -v                    validate packets from sockets, default = %d\n"
-         , __DATE__, __TIME__, s, debug_level_, ocat_listen_port_, ocat_dest_port_, tor_socks_port_, vrec_);
+         , __DATE__, __TIME__, s, debug_level_, OCAT_GNAME, ocat_listen_port_, ocat_dest_port_, tor_socks_port_, 
+#ifndef WITHOUT_TUN
+         TUN_DEV,
+#endif
+         OCAT_UNAME, vrec_);
 }
 
 
@@ -49,8 +55,8 @@ int main(int argc, char *argv[])
    char tunname[IFNAMSIZ] = "", onion[ONION_NAME_SIZE], *s, ip6addr[INET6_ADDRSTRLEN];
    struct in6_addr addr;
    int c, runasroot = 0;
-   uid_t uid = 504;
-   gid_t gid = 504;
+   uid_t uid = OCAT_UID;
+   gid_t gid = OCAT_GID;
    int urlconv = 0, test_only = 0;
 
    if (argc < 2)
diff --git a/ocat.h b/ocat.h
index 91ee352..f528edf 100644
--- a/ocat.h
+++ b/ocat.h
@@ -22,6 +22,10 @@
 #define OCAT_CTRL_PORT 8001
 #define OCAT_DEST_PORT 80
 #define TOR_SOCKS_PORT 9050
+#define OCAT_UNAME "tor"
+#define OCAT_UID 112
+#define OCAT_GNAME "tor"
+#define OCAT_GID 116
 
 
 //#define FRAME_SIZE 1504

-- 
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