Changeset 51 for trunk/src


Ignore:
Timestamp:
Jul 17, 2006, 10:31:56 PM (18 years ago)
Author:
rainer
Message:

Fix problems with linux kernel 2.6.17

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kern_head.c

    r49 r51  
    354354
    355355
    356 struct inode_operations {
    357   int (*create) (int *,int *,int);
    358   int * (*lookup) (int *,int *);
    359   int (*link) (int *,int *,int *);
    360   int (*unlink) (int *,int *);
    361   int (*symlink) (int *,int *,const char *);
    362   int (*mkdir) (int *,int *,int);
    363   int (*rmdir) (int *,int *);
    364   int (*mknod) (int *,int *,int,int);
    365   int (*rename) (int *, int *,
    366                  int *, int *);
    367   int (*readlink) (int *, char *,int);
    368   int (*follow_link) (int *, int *);
    369   void (*truncate) (int *);
    370   int (*permission) (int *, int);
    371   int (*revalidate) (int *);
    372   /*
    373     int (*setattr) (int *, int *);
    374     int (*getattr) (int *, int *);
    375     int (*setxattr) (int *, const char *, void *, size_t, int);
    376     ssize_t (*getxattr) (int *, const char *, void *, size_t);
    377     ssize_t (*listxattr) (int *, char *, size_t);
    378     int (*removexattr) (int *, const char *);
    379   */
    380 };
    381 
    382 struct file_operations {
    383   int (*create) (int *,int *,int);
    384 };
    385 
    386 struct proc_dir_entry {
    387   unsigned short low_ino;
    388   unsigned short namelen;
    389   const char * name;
    390   mode_t mode;
    391   nlink_t nlink;
    392   uid_t uid;
    393   gid_t gid;
    394   unsigned long size;
    395   struct inode_operations * proc_iops;
    396   struct file_operations * proc_fops;
    397   /*
    398   get_info_t *get_info;
    399   struct module *owner;
    400   struct proc_dir_entry *next, *parent, *subdir;
    401   void *data;
    402   read_proc_t *read_proc;
    403   write_proc_t *write_proc;
    404   atomic_t count;         
    405   int deleted; 
    406   */         
    407 };
    408 
    409 
    410 
    411356int main(int argc, char * argv[])
    412357{
    413358  int i, count, maxcall, qq;
    414359  int which = 4;
     360  int two_six_seventeen_plus = 0;
    415361  smap_entry sh_smap[SH_MAXCALLS];
    416362  struct utsname utbuf;
     
    455401    which = 4;
    456402  else if (strncmp(p, "2.6", 3) == 0)
    457     which = 6;
     403    {
     404      which = 6;
     405      if (17 >= atoi (&p[4]))
     406        {
     407          two_six_seventeen_plus = 1;
     408        }
     409    }
    458410  else
    459411    {
     
    668620  if (proc_root_iops != 0) {
    669621    printf("#define PROC_ROOT_IOPS_LOC %#lx\n\n", proc_root_iops);
     622  }
     623
     624  if (two_six_seventeen_plus == 1) {
     625    printf("#define TWO_SIX_SEVENTEEN_PLUS 1\n\n");
    670626  }
    671627
  • trunk/src/samhain_hide.c

    r6 r51  
    214214static int removeme = 1;
    215215
     216#ifdef MODULE_PARM
    216217MODULE_PARM (removeme, "i");
     218#else
     219module_param(removeme, int, 0444);
     220#endif
     221
     222#ifdef MODULE_PARM_DESC
     223MODULE_PARM_DESC(removeme, "Choose zero for not hiding.");
     224#endif
     225
     226/* LINUX26 */
    217227#endif
    218228
  • trunk/src/sh_kern.c

    r41 r51  
    448448};
    449449
     450/* this one is just for dummy purposes
     451 */
    450452struct file_operations {
    451453  int (*create) (int *,int *,int);
     
    460462  uid_t uid;
    461463  gid_t gid;
    462   unsigned long size;
     464#if defined  TWO_SIX_SEVENTEEN_PLUS
     465  /* size is loff_t in 2.6.17+ kernels */
     466  unsigned long dummy;
     467#endif
     468  unsigned long size;
    463469  struct inode_operations * proc_iops;
    464470  struct file_operations * proc_fops;
     
    892898                       _("proc_root_inode_operations.lookup != proc_root_lookup"));
    893899    }
    894   else if ( ( ((unsigned int) * &proc_root_dir.proc_iops) != proc_root_iops) &&
    895       (proc_root_dir.size != proc_root_iops))
     900  else if ( ( ((unsigned int) * &proc_root_dir.proc_iops) != proc_root_iops)
     901            && (proc_root_dir.size != proc_root_iops))
    896902    {
    897903      sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_KERN_PROC,
Note: See TracChangeset for help on using the changeset viewer.