samhain: update to 2.1.3

This commit is contained in:
Juergen Daubert 2006-03-20 07:36:06 +00:00
parent 7b09b69c4a
commit ff58839991
3 changed files with 3 additions and 77 deletions

View File

@ -1,2 +1 @@
1324b8b519587d9abfebf469c4deaa11 samhain_hide.patch
9e009035d7a04a6203a6b0ce404c385c samhain_signed-2.1.2.tar.gz
bc85d4ce0d92cea47eab3e355bb0341f samhain_signed-2.1.3.tar.gz

View File

@ -3,15 +3,13 @@
# Maintainer: Jürgen Daubert, juergen dot daubert at t-online dot de
name=samhain
version=2.1.2
version=2.1.3
release=1
source=(http://la-samhna.de/$name/${name}_signed-$version.tar.gz
samhain_hide.patch)
source=(http://la-samhna.de/$name/${name}_signed-$version.tar.gz)
build () {
tar xfz $name-$version.tar.gz
cd $name-$version
patch -p1 < $SRC/samhain_hide.patch
./configure --prefix=/usr \
--mandir=/usr/man \
--localstatedir=/var \

View File

@ -1,71 +0,0 @@
Index: trunk/src/samhain_hide.c
===================================================================
--- trunk/src/samhain_hide.c (revision 1)
+++ trunk/src/samhain_hide.c (revision 6)
@@ -318,4 +318,5 @@
int status = 0; /* Return value from original getdents */
struct inode * dir_inode;
+ struct file * fd_file;
int dir_is_proc = 0;
@@ -337,5 +338,5 @@
printk("STATUS %d\n", status);
#endif
-
+
/* 0: end of directory.
* -1: some error
@@ -346,11 +347,22 @@
return (status);
}
-
+
/* Handle directory caching. dir_inode is the inode of the directory.
*/
+#if defined(files_fdtable)
+ {
+ struct fdtable *fdt = files_fdtable(current->files);
+ fd_file = rcu_dereference(fdt->fd[fd]);
+ }
+#else
+ {
+ fd_file = current->files->fd[fd];
+ }
+#endif
+
#if defined(__LINUX_DCACHE_H)
- dir_inode = current->files->fd[fd]->f_dentry->d_inode;
+ dir_inode = fd_file->f_dentry->d_inode;
#else
- dir_inode = current->files->fd[fd]->f_inode;
+ dir_inode = fd_file->f_inode;
#endif
@@ -499,4 +511,5 @@
long status = 0; /* Return value from original getdents */
struct inode * dir_inode;
+ struct file * fd_file;
int dir_is_proc = 0;
@@ -530,8 +543,19 @@
/* Handle directory caching. dir_inode is the inode of the directory.
*/
+#if defined(files_fdtable)
+ {
+ struct fdtable *fdt = files_fdtable(current->files);
+ fd_file = rcu_dereference(fdt->fd[fd]);
+ }
+#else
+ {
+ fd_file = current->files->fd[fd];
+ }
+#endif
+
#if defined(__LINUX_DCACHE_H)
- dir_inode = current->files->fd[fd]->f_dentry->d_inode;
+ dir_inode = fd_file->f_dentry->d_inode;
#else
- dir_inode = current->files->fd[fd]->f_inode;
+ dir_inode = fd_file->f_inode;
#endif