miniroon

Simplistic macaroon-based authorization for Unix systems
git clone https://ccx.te2000.cz/git/miniroon
Log | Files | Refs

errors.h (1789B)


      1 #ifndef MINIROON_ERRORS_H
      2 #define MINIROON_ERRORS_H
      3 
      4 // implementation:
      5 // {IMP} errors.c
      6 
      7 typedef enum miniroon_error_e {
      8   MINIROON_OK = 0,
      9 
     10   MINIROON_ENST_NO_COLON,
     11   MINIROON_ENST_NO_COMMA,
     12   MINIROON_ENST_TRUNCATED,
     13 
     14   MINIROON_EENM_INV_VAR_NAME,
     15   MINIROON_EENM_INV_VAR_VALUE,
     16   MINIROON_EENM_EXEC,
     17 
     18   MINIROON_EHDR_INV_VERSION,
     19   MINIROON_EHDR_INV_ACTION,
     20   MINIROON_EHDR_NO_VERSION,
     21   MINIROON_EHDR_NO_ID,
     22   MINIROON_EHDR_NO_ACTION,
     23   MINIROON_EHDR_EXTRA,
     24 
     25   MINIROON_EDEC_NO_HEADER,
     26   MINIROON_EDEC_NO_BODY,
     27   MINIROON_EDEC_MANY_CAVEATS,
     28   MINIROON_EDEC_NO_SIGNATURE,
     29   MINIROON_EDEC_INV_SIGNATURE,
     30   MINIROON_EDEC_EXTRA,
     31   MINIROON_EDEC_BAD_SIGNATURE,
     32 
     33   MINIROON_EMAX
     34 } miniroon_error;
     35 
     36 extern miniroon_error miniroon_current_error;
     37 extern char const *miniroon_errmsg[8];
     38 extern unsigned char miniroon_errmsg_count;
     39 
     40 miniroon_error miniroon_err1(miniroon_error e, char const* const m1);
     41 miniroon_error miniroon_err2(miniroon_error e, char const* const m1, char const* const m2);
     42 miniroon_error miniroon_err3(miniroon_error e, char const* const m1, char const* const m2, char const* const m3);
     43 miniroon_error miniroon_err4(miniroon_error e, char const* const m1, char const* const m2, char const* const m3, char const* const m4);
     44 miniroon_error miniroon_err5(miniroon_error e, char const* const m1, char const* const m2, char const* const m3, char const* const m4, char const* const m5);
     45 miniroon_error miniroon_err6(miniroon_error e, char const* const m1, char const* const m2, char const* const m3, char const* const m4, char const* const m5, char const* const m6);
     46 miniroon_error miniroon_err7(miniroon_error e, char const* const m1, char const* const m2, char const* const m3, char const* const m4, char const* const m5, char const* const m6, char const* const m7);
     47 
     48 #endif