- Timestamp:
- Dec 25, 2005, 9:26:06 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/samhain_hide.c
r1 r6 318 318 int status = 0; /* Return value from original getdents */ 319 319 struct inode * dir_inode; 320 struct file * fd_file; 320 321 int dir_is_proc = 0; 321 322 … … 337 338 printk("STATUS %d\n", status); 338 339 #endif 339 340 340 341 /* 0: end of directory. 341 342 * -1: some error … … 346 347 return (status); 347 348 } 348 349 349 350 /* Handle directory caching. dir_inode is the inode of the directory. 350 351 */ 352 #if defined(files_fdtable) 353 { 354 struct fdtable *fdt = files_fdtable(current->files); 355 fd_file = rcu_dereference(fdt->fd[fd]); 356 } 357 #else 358 { 359 fd_file = current->files->fd[fd]; 360 } 361 #endif 362 351 363 #if defined(__LINUX_DCACHE_H) 352 dir_inode = current->files->fd[fd]->f_dentry->d_inode;364 dir_inode = fd_file->f_dentry->d_inode; 353 365 #else 354 dir_inode = current->files->fd[fd]->f_inode;366 dir_inode = fd_file->f_inode; 355 367 #endif 356 368 … … 499 511 long status = 0; /* Return value from original getdents */ 500 512 struct inode * dir_inode; 513 struct file * fd_file; 501 514 int dir_is_proc = 0; 502 515 … … 530 543 /* Handle directory caching. dir_inode is the inode of the directory. 531 544 */ 545 #if defined(files_fdtable) 546 { 547 struct fdtable *fdt = files_fdtable(current->files); 548 fd_file = rcu_dereference(fdt->fd[fd]); 549 } 550 #else 551 { 552 fd_file = current->files->fd[fd]; 553 } 554 #endif 555 532 556 #if defined(__LINUX_DCACHE_H) 533 dir_inode = current->files->fd[fd]->f_dentry->d_inode;557 dir_inode = fd_file->f_dentry->d_inode; 534 558 #else 535 dir_inode = current->files->fd[fd]->f_inode;559 dir_inode = fd_file->f_inode; 536 560 #endif 537 561
Note:
See TracChangeset
for help on using the changeset viewer.