CGI Bash Shell Interface
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

cbsi.h 1.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /**
  2. * @PROJECT CGI Bash Shell Interface
  3. * @COPYRIGHT See COPYING in the top level directory
  4. * @FILE cbsi.h
  5. * @PURPOSE Common CBSI
  6. * @DEVELOPERS Nathan Angelacos <nangel@users.sourceforge.net>
  7. * Rafal Kupiec <belliash@asiotec.eu.org>
  8. */
  9. #ifndef __CBSI_H
  10. #define __CBSI_H
  11. typedef struct {
  12. unsigned long uploadkb;
  13. char* shell;
  14. char* langdir;
  15. char* translation;
  16. char* uploaddir;
  17. char* uploadhandler;
  18. char* file_prefix;
  19. char* filename_prefix;
  20. char* get_prefix;
  21. char* post_prefix;
  22. char* cookie_prefix;
  23. char* null_prefix;
  24. char* cbsi_prefix;
  25. token_t* uploadlist;
  26. int debug;
  27. int acceptall;
  28. int silent;
  29. } cbsi_t;
  30. typedef struct lstr {
  31. char* msgid;
  32. char* msgstr;
  33. struct lstr* next;
  34. } lstr;
  35. cbsi_t global;
  36. char buffer[TRANS_BUF];
  37. char* language;
  38. lstr* ltable[HASH_BUF];
  39. int translations;
  40. int argc_argv(char* instr, argv_t** argv);
  41. void assignGlobalStartupValues(void);
  42. int BecomeUser(uid_t uid, gid_t gid);
  43. void cbsiflags(list_t* env);
  44. void cleanup(void);
  45. void CookieVars(list_t* env);
  46. int count_lines(char* instr, size_t len, char* where);
  47. char* find_whitespace (char* instr);
  48. void free_list_chain(list_t* env);
  49. unsigned short generateHash(char* str);
  50. void loadDictionary(const char* filename);
  51. void lowercase(char* instr);
  52. list_t* myputenv(list_t* cur, char* str, char* prefix);
  53. int parseCommandLine(int argc, char* argv[]);
  54. void prepareDictionary();
  55. int ReadCGIPOSTValues(list_t* env);
  56. int ReadCGIQueryString(list_t* env);
  57. void readenv(list_t* env);
  58. void sessionid(list_t* env);
  59. char* skip_whitespace (char* instr);
  60. char* trim(char* str);
  61. void unescape_url(char* url);
  62. void unlink_uploadlist(void);
  63. void uppercase(char* instr);
  64. list_t* wcversion(list_t* env);
  65. char x2c(char* what);
  66. void* xmalloc(size_t size);
  67. void* xrealloc(void* buf, size_t size);
  68. #endif