Ignore:
Timestamp:
Jul 18, 2015, 5:06:52 PM (10 years ago)
Author:
katerina
Message:

Enhancements and fixes for tickets #374, #375, #376, #377, #378, and #379.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_database.c

    r454 r481  
    180180  { NULL, N_("link_old"),    0,  49, MAX_PATH_STORE+1, 0, offsetof(struct dbins_, link_old)},
    181181  { NULL, N_("link_new"),    0,  50, MAX_PATH_STORE+1, 0, offsetof(struct dbins_, link_new)},
    182                                            
     182
     183  /* These go into  dbins.ulong_data[n - START_SEC_LONGS] */                                               
    183184  { NULL, N_("size_old"),     0,  51,    0, 0, 0  },
    184185  { NULL, N_("size_new"),     0,  52,    0, 0, 0  },
     
    201202  { NULL, N_("port"),         0,  67,    0, 0, 0  },
    202203  { NULL, N_("return_code"),  0,  68,    0, 0, 0  },
    203   /* { NULL, N_("userid"),        0,  69,    0, 0  }, old 'userid', 1.8.1 */
    204 
    205   { NULL, N_("host"),         0,  70,   64, 0, offsetof(struct dbins_, fromhost)},
    206   { NULL, N_("attr_old"),     0,  71,   16, 0, offsetof(struct dbins_, attr_old)},
    207   { NULL, N_("attr_new"),     0,  72,   16, 0, offsetof(struct dbins_, attr_new)},
    208   { NULL, N_("acl_old"),      0,  73, 1024, 0, offsetof(struct dbins_, acl_old)},
    209   { NULL, N_("acl_new"),      0,  74, 1024, 0, offsetof(struct dbins_, acl_new)},
     204
     205  { NULL, N_("checkflags_old"), 0,  69,    0, 0, 0  },
     206  { NULL, N_("checkflags_new"), 0,  70,    0, 0, 0  },
     207
     208  /* END_SEC_LONGS                                         */
     209
     210  { NULL, N_("host"),         0,  71,   64, 0, offsetof(struct dbins_, fromhost)},
     211  { NULL, N_("attr_old"),     0,  72,   16, 0, offsetof(struct dbins_, attr_old)},
     212  { NULL, N_("attr_new"),     0,  73,   16, 0, offsetof(struct dbins_, attr_new)},
     213  { NULL, N_("acl_old"),      0,  74, 1024, 0, offsetof(struct dbins_, acl_old)},
     214  { NULL, N_("acl_new"),      0,  75, 1024, 0, offsetof(struct dbins_, acl_new)},
    210215
    211216  { NULL, NULL,      0,  0, 0, 0, 0 }
    212217};
    213218
    214 #define SH_SLOT_HOST    70
     219#define SH_SLOT_CHECKFLAGS 69
     220
     221/* need special attention b/o reserved SQL words    */
     222#define SH_SLOT_HOST    71
    215223#define SH_SLOT_GROUP    7
     224
     225/* these go into dbins.ulong_data[n-START_SEC_LONGS */
    216226#define START_SEC_LONGS 51
    217 #define END_SEC_LONGS   68
     227#define END_SEC_LONGS   70
    218228
    219229#if defined(HAVE_INT_32)
     
    11631173    }
    11641174
    1165   if (flag_err_debug == SL_TRUE)
     1175  if (flag_err_debug == S_TRUE)
    11661176    {
    11671177      p = mysql_info (db_conn);
     
    13601370  while (attr_tab[i].attr != NULL)
    13611371    {
     1372      if (SH_SLOT_CHECKFLAGS == attr_tab[i].val) {
     1373        if (db_entry->ulong_data[attr_tab[i].val-START_SEC_LONGS] == 0 &&
     1374            db_entry->ulong_data[attr_tab[i+1].val-START_SEC_LONGS] == 0)
     1375          { i+= 2; continue; }
     1376      }
     1377
    13621378      if (attr_tab[i].size != 0)
    13631379        {
     
    17281744                                       (size_t) res->size);
    17291745                  }
    1730                 else if (res->val >= START_SEC_LONGS)
     1746                else if (res->val >= START_SEC_LONGS && res->val <= END_SEC_LONGS)
    17311747                  {
    17321748                    db_entry->ulong_data[res->val-START_SEC_LONGS]
    1733                       = strtoul(&p[j+2], (char **) NULL, 10);
    1734                     /* atol(&p[j+2]); */
     1749                      = strtoul(&p[j+2], (char **) NULL, 0);
    17351750                  }
    17361751
Note: See TracChangeset for help on using the changeset viewer.