- Timestamp:
- Jul 17, 2006, 10:31:56 PM (18 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kern_head.c
r49 r51 354 354 355 355 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 411 356 int main(int argc, char * argv[]) 412 357 { 413 358 int i, count, maxcall, qq; 414 359 int which = 4; 360 int two_six_seventeen_plus = 0; 415 361 smap_entry sh_smap[SH_MAXCALLS]; 416 362 struct utsname utbuf; … … 455 401 which = 4; 456 402 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 } 458 410 else 459 411 { … … 668 620 if (proc_root_iops != 0) { 669 621 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"); 670 626 } 671 627 -
trunk/src/samhain_hide.c
r6 r51 214 214 static int removeme = 1; 215 215 216 #ifdef MODULE_PARM 216 217 MODULE_PARM (removeme, "i"); 218 #else 219 module_param(removeme, int, 0444); 220 #endif 221 222 #ifdef MODULE_PARM_DESC 223 MODULE_PARM_DESC(removeme, "Choose zero for not hiding."); 224 #endif 225 226 /* LINUX26 */ 217 227 #endif 218 228 -
trunk/src/sh_kern.c
r41 r51 448 448 }; 449 449 450 /* this one is just for dummy purposes 451 */ 450 452 struct file_operations { 451 453 int (*create) (int *,int *,int); … … 460 462 uid_t uid; 461 463 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; 463 469 struct inode_operations * proc_iops; 464 470 struct file_operations * proc_fops; … … 892 898 _("proc_root_inode_operations.lookup != proc_root_lookup")); 893 899 } 894 else if ( ( ((unsigned int) * &proc_root_dir.proc_iops) != proc_root_iops) &&895 900 else if ( ( ((unsigned int) * &proc_root_dir.proc_iops) != proc_root_iops) 901 && (proc_root_dir.size != proc_root_iops)) 896 902 { 897 903 sh_error_handle ((-1), FIL__, __LINE__, 0, MSG_KERN_PROC,
Note:
See TracChangeset
for help on using the changeset viewer.