Changeset 294 for trunk/src/sh_kern.c


Ignore:
Timestamp:
Oct 31, 2010, 10:26:42 AM (14 years ago)
Author:
katerina
Message:

Tikets #213 and #214 (Use auditd to determine who changed a file, Windows registry check).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_kern.c

    r286 r294  
    169169
    170170char * sh_kern_db_syscall (int num, char * prefix,
    171                    void * in_name, unsigned long * addr,
     171                           void * in_name, unsigned long * addr,
    172172                           unsigned int * code1, unsigned int * code2,
    173173                           int * size, int direction)
     
    177177  unsigned long   x1 = 0, x2 = 0;
    178178  unsigned char * name = (unsigned char *) in_name;
     179  struct store2db save;
    179180
    180181  sl_snprintf(path, 128, "K_%s_%04d", prefix, num);
    181182
     183  memset(save, '\0', sizeof(struct store2db));
     184
    182185  if (direction == SH_KERN_DBPUSH)
    183186    {
    184       x1 = *code1;
    185       x2 = *code2;
    186 
    187       sh_hash_push2db (path, *addr, x1, x2,
    188                        name, (name == NULL) ? 0 : (*size));
     187      save.val0 = *addr;
     188      save.val1 = *code1;
     189      save.val2 = *code2;
     190      save.str  = name;
     191      save.size = (name == NULL) ? 0 : (*size);
     192
     193      sh_hash_push2db (path, &save);
    189194    }
    190195  else
    191196    {
    192       p = sh_hash_db2pop (path, addr,  &x1, &x2, size);
    193       *code1 = (unsigned int) x1;
    194       *code2 = (unsigned int) x2;
     197      p = sh_hash_db2pop (path, &save);
     198
     199      *addr  = (unsigned long) save.val0;
     200      *code1 = (unsigned int)  save.val1;
     201      *code2 = (unsigned int)  save.val2;
     202
     203      *size  = (int)           save.size;
    195204    }
    196205  return p;
Note: See TracChangeset for help on using the changeset viewer.