shell.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #ifndef _SHELL_H
  2. #define _SHELL_H
  3. #ifdef HAVE_CONFIG_H
  4. #include "config.h"
  5. #endif /* HAVE_CONFIG_H */
  6. #define ERR_BINSTAT 1
  7. #define ERR_BINMOD 2
  8. #define ERR_PASSWD 3
  9. #define ERR_WRONGBINDIR 4
  10. #define ERR_TMPSTAT 6
  11. #define ERR_TMPMOD 9
  12. #define ERR_WRONGUID 12
  13. #define ERR_WRONGUNAME 13
  14. #define ERR_BADCONF 14
  15. #define ERR_BADBOT 15
  16. #define ERR_BADPASS 16
  17. #define ERR_BOTDISABLED 17
  18. #define ERR_NOBOTS 18
  19. #define ERR_NOBOT 19
  20. #define ERR_NOUSERNAME 20
  21. #define ERR_NOHOMEDIR 21
  22. #define ERR_MAX 22
  23. #define EMAIL_OWNERS BIT0
  24. #define EMAIL_TEAM BIT1
  25. #define DETECT_LOGIN 1
  26. #define DETECT_TRACE 2
  27. #define DETECT_PROMISC 3
  28. #define DETECT_PROCESS 4
  29. #define DETECT_SIGCONT 5
  30. #define DET_IGNORE 0
  31. #define DET_WARN 1
  32. #define DET_REJECT 2
  33. #define DET_DIE 3
  34. #define DET_SUICIDE 4
  35. #define DETECTED_LEN 8 /* 'suicide' is longest word */
  36. void check_maxfiles();
  37. void check_mypid();
  38. void clear_tmp();
  39. char *homedir(bool = 1);
  40. char *my_username();
  41. char *my_uname();
  42. #ifndef CYGWIN_HACKS
  43. char *move_bin(const char *, const char *, bool);
  44. #endif /* !CYGWIN_HACKS */
  45. void expand_tilde(char **);
  46. void baduname(char *, char *);
  47. int email(char *, char *, int);
  48. int shell_exec(char *, char *, char **, char **);
  49. #ifndef CYGWIN_HACKS
  50. void check_last();
  51. void check_promisc();
  52. void check_trace(int);
  53. void check_processes();
  54. void check_crontab();
  55. void crontab_del();
  56. int crontab_exists();
  57. void crontab_create(int);
  58. void detected(int, char *);
  59. #endif /* !CYGWIN_HACKS */
  60. void suicide(const char *);
  61. void werr(int) __attribute__((noreturn));
  62. char *werr_tostr(int);
  63. int det_translate(const char *);
  64. const char *det_translate_num(int);
  65. char *shell_escape(const char *);
  66. void mkdir_p(const char *);
  67. extern bool clear_tmpdir;
  68. #endif /* _SHELL_H */