b0VIM 7.3      +RMI/   michele                                 mpro-michele.local                      ~michele/opensource/sshguard/sshguard/sshguard-1.5/src/sshguard_options.c                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          3210    #"! U                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 tp           _                     Q       `                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  ad          _             u  +        S      u  *                    w  c  b  N  M  8  $                  z  y  M  4    
  
  
  
  
  
  h
  ,
  	  	  	  o	  '	  	    ]      t            @                       P              \      i  [  K  9  "  !                                   opts.abuse_threshold = strtol(optarg, (char **)NULL, 10);             case 'a':   /* abuse threshold count */                  break;                 } 					return -1; 					usage();                     fprintf(stderr, "Doesn't make sense to have a stale threshold lower than 1 second. Terminating.\n");                 if (opts.stale_threshold < 1) {                 opts.stale_threshold = strtol(optarg, (char **)NULL, 10);             case 's':   /* stale threshold interval */                  break;                 } 					return -1; 					usage();                     fprintf(stderr, "Doesn't make sense to have a pardon time lower than 1 second. Terminating.\n");                 if (opts.pardon_threshold < 1) {                 opts.pardon_threshold = strtol(optarg, (char **)NULL, 10);             case 'p':   /* pardon threshold interval */                  return -1;                 fprintf(stderr, "Debugging mode now uses environment variable. Run:\n\tenv SSHGUARD_DEBUG=\"\" %s ...\n", argv[0]);             case 'd':   /* (historical) debugging */                  break;                 }                     strcpy(opts.blacklist_filename, optarg);                     /* argument contains only the blacklist filename */                 } else {                     } 						return -1; 						usage();                         fprintf(stderr, "Doesn't make sense to have a blacklist threshold lower than one abuse (%u). Terminating.\n", opts.abuse_threshold);                     if (opts.blacklist_threshold < opts.abuse_threshold) {                     /* custom threshold specified */                 if (sscanf(optarg, "%u:%s", & opts.blacklist_threshold, opts.blacklist_filename) == 2) {                 opts.blacklist_filename = (char *)malloc(strlen(optarg)+1);             case 'b':   /* threshold for blacklisting (num abuses >= this implies permanent block */         switch (optch) {     while ((optch = getopt(argc, argv, "b:p:s:a:w:f:l:i:vdh")) != -1) {     opts.has_polled_files = 0;     opts.abuse_threshold = DEFAULT_ABUSE_THRESHOLD;     opts.stale_threshold = DEFAULT_STALE_THRESHOLD;     opts.pardon_threshold = DEFAULT_PARDON_THRESHOLD;     opts.blacklist_threshold = DEFAULT_BLACKLIST_THRESHOLD;     opts.my_pidfile = NULL;     opts.blacklist_filename = NULL;      int optch; int get_options_cmdline(int argc, char *argv[]) {  static void version(void); /* dumps version message to standard error */ static void usage(void); /* dumps usage message to standard error */  sshg_opts opts;  #include "sshguard_options.h" #include "sshguard_logsuck.h" #include "sshguard_whitelist.h" #include "sshguard_procauth.h" #include "sshguard.h"  #endif #include <getopt.h> #ifdef HAVE_GETOPT_H  #include "config.h"  #include <unistd.h> #include <stdlib.h> #include <string.h> #include <stdio.h>   */  * SSHGuard. See http://www.sshguard.net /*   */  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES  *  * copyright notice and this permission notice appear in all copies.  * purpose with or without fee is hereby granted, provided that the above  * Permission to use, copy, modify, and distribute this software for any  *  * Copyright (c) 2007,2008,2009,2010 Mij <mij@sshguard.net> /* ad                    F                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    } 	fprintf(stderr, "This is free software; see the source for conditions on copying.\n"); 	fprintf(stderr, "Copyright (c) 2007,2008 Mij <mij@sshguard.net>\n"); 	fprintf(stderr, "sshguard %d.%d.%d\n\n", MAJOR_VERSION, MINOR_VERSION, BUILD_VERSION); static void version(void) { 