- Added -x/--proctitle option, to hide/obfuscate the proxytunnel

command-line in process-listings. This code is disabled by default
  But can be enabled by uncommenting the define in the Makefile.


git-svn-id: https://proxytunnel.svn.sourceforge.net/svnroot/proxytunnel/trunk/proxytunnel@95 bc163920-b10d-0410-b2c5-a5491ca2ceef
This commit is contained in:
Mark Janssen 2006-02-07 12:12:14 +00:00
parent bf693b0afc
commit 86bf937325
8 changed files with 350 additions and 4 deletions

View file

@ -31,6 +31,7 @@
#include <signal.h>
#include <syslog.h>
#include <stdarg.h>
#include <stdlib.h>
#include "io.h"
#include "config.h"
@ -282,7 +283,7 @@ void do_daemon()
/*
* We begin at the beginning
*/
int main( int argc, char *argv[] )
int main( int argc, char *argv[], char *envp[] )
{
program_name = argv[0];
@ -291,6 +292,9 @@ int main( int argc, char *argv[] )
*/
cmdline_parser( argc, argv, &args_info );
#ifdef SETPROCTITLE
initsetproctitle( argc, argv, envp );
#endif
/*
* This is what we do:
@ -348,6 +352,14 @@ int main( int argc, char *argv[] )
if( args_info.encrypt_flag )
do_ssl();
#endif
#ifdef SETPROCTITLE
if( args_info.proctitle_given )
setproctitle( args_info.proctitle_arg );
#else
if( args_info.proctitle_given )
message( "Setting process-title is not supported in this build\n");
#endif
cpio();
}