"Fossies" - the Fresh Open Source Software Archive

Member "scponly-20110526/scponly.h" (20 Nov 2010, 1945 Bytes) of package /linux/privat/old/scponly-20110526.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "scponly.h": 4.8_vs_20110526.

    1 #include <stdio.h>  /* FILENAME_MAX */
    2 #include "config.h" /* include before most other files */
    3 
    4 #ifdef HAVE_GETOPT_H
    5 #include <getopt.h> /* for struct option for getopt */
    6 #else
    7 #include "scponly_getopt.h"
    8 #endif
    9 
   10 #define MAX_USERNAME 32
   11 #define MAX_REQUEST (1024)      /* any request exceeding this is truncated */
   12 #define MAX_ARGC 100            /* be reasonable */
   13 #define MAX_ENV 50              /* be reasonable */
   14 #define ALLOWABLE "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890 ./-*\\_'\":?()="
   15 #define WHITE " \t"         /* whitespace */
   16 #define exact_match(x,y) (0==strcmp(x,y))   /* we dont want strncpy for this */
   17 #define LOGIDENT "scponly"
   18 
   19 #define WINSCP_EOF_REQ_RETVAL   " ; echo \"WinSCP: this is end-of-file:$?\""
   20 #define WINSCP_EOF_REQ_ZERO " ; echo \"WinSCP: this is end-of-file:0\""
   21 #define WINSCP_EOF_REQ_STATUS " ; echo \"WinSCP: this is end-of-file:$status\""
   22 #define WINSCP_BOF_REQ      "echo \"WinSCP: this is begin-of-file\" ; "
   23 
   24 #define WINSCP_EOF      "WinSCP: this is end-of-file:"
   25 #define WINSCP_BOF      "WinSCP: this is begin-of-file"
   26 
   27 typedef struct
   28 {
   29     char *name;
   30     int argflag;
   31 } cmd_t;
   32 
   33 typedef struct
   34 {
   35     char *name;
   36     int  getoptflag;
   37     int  strict;
   38     char *badarg;
   39     char *opts;
   40     struct option *longopts;
   41 } cmd_arg_t;
   42  
   43 /*
   44  * function prototypes
   45  */
   46 char *strbeg (char *, char *);
   47 char *strend (char *, char *);
   48 int valid_chars(char *);
   49 int get_uservar(void);
   50 void show_usage(void);
   51 char *logstamp();
   52 int cntchr(char *, char);
   53 char **build_arg_vector(char *);
   54 char **expand_wildcards(char **);
   55 int valid_arg_vector(char **);
   56 char *substitute_known_path(char *);
   57 char *flatten_vector(char **);
   58 void discard_vector(char **);
   59 void discard_child_vectors(char **);
   60 int check_dangerous_args(char **av);
   61 int mysetenv(const char *name, const char *value);
   62 int replace_env_entry(const char *name, const char *value);
   63 void filter_allowed_env_vars();
   64 void noop_syslog(int priority, const char* format, ...);
   65 
   66 /* vim: set noet sw=4 ts=4: */