Move to root
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
Submitted By: Mario Fetka (mario-fetka at gmx dot at)
|
||||
Date: 2007-09-30
|
||||
Initial Package Version: 2.0.0
|
||||
Origin: me
|
||||
Upstream Status: unknown
|
||||
Description:
|
||||
Fix section warning:
|
||||
WARNING: /var/tmp/portage/net-fs/novell-novfs-2.0.0_p22/work/novfs-2.0.0/src/novfs.o(.text+0xa5a5): Section mismatch: reference to .init.text:init_novfs (between '__cyg_profile_func_enter' and 'profile_task_exit_callback')
|
||||
WARNING: /var/tmp/portage/net-fs/novell-novfs-2.0.0_p22/work/novfs-2.0.0/src/novfs.o(.data+0x7fc): Section mismatch: reference to .init.text:init_novfs (between 'SymbolTable' and 'Malloc_Lock')
|
||||
WARNING: /var/tmp/portage/net-fs/novell-novfs-2.0.0_p22/work/novfs-2.0.0/src/novfs.o(.text+0xa511): Section mismatch: reference to .exit.text:exit_novfs (between '__cyg_profile_func_exit' and '__cyg_profile_func_enter')
|
||||
WARNING: /var/tmp/portage/net-fs/novell-novfs-2.0.0_p22/work/novfs-2.0.0/src/novfs.o(.data+0x6b4): Section mismatch: reference to .exit.text:exit_novfs (between 'SymbolTable' and 'Malloc_Lock')
|
||||
|
||||
diff -Naur novfs-2.0.0.orig/src/inode.c novfs-2.0.0/src/inode.c
|
||||
--- novfs-2.0.0.orig/src/inode.c 2007-08-09 10:56:06.000000000 +0000
|
||||
+++ novfs-2.0.0/src/inode.c 2007-09-30 10:55:45.000000000 +0000
|
||||
@@ -271,8 +271,8 @@
|
||||
|
||||
int Novfs_Control_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg);
|
||||
|
||||
-int __init init_novfs(void);
|
||||
-void __exit exit_novfs(void);
|
||||
+int __devinit init_novfs(void);
|
||||
+void __devexit exit_novfs(void);
|
||||
|
||||
int Novfs_lock_inode_cache( struct inode *i );
|
||||
void Novfs_unlock_inode_cache( struct inode *i );
|
||||
@@ -4898,7 +4898,7 @@
|
||||
}
|
||||
|
||||
/*++======================================================================*/
|
||||
-int __init init_novfs (void)
|
||||
+int __devinit init_novfs (void)
|
||||
/*
|
||||
* Arguments:
|
||||
*
|
||||
@@ -4941,7 +4941,7 @@
|
||||
}
|
||||
|
||||
/*++======================================================================*/
|
||||
-void __exit exit_novfs(void)
|
||||
+void __devexit exit_novfs(void)
|
||||
/*
|
||||
* Arguments:
|
||||
*
|
||||
11
net-fs/novell-novfs/files/novell-novfs-2.0.0-vfs.patch
Normal file
11
net-fs/novell-novfs/files/novell-novfs-2.0.0-vfs.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- novfs-2.0.0/src/daemon.c.orig 2007-05-11 08:55:19.000000000 +0200
|
||||
+++ novfs-2.0.0/src/daemon.c 2007-05-17 20:37:00.000000000 +0200
|
||||
@@ -2780,7 +2780,7 @@
|
||||
{
|
||||
atomic_inc(&inode->i_count);
|
||||
}
|
||||
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,25)
|
||||
// Version of 2.6.20 changed the number of
|
||||
// parameters passed to vfs_unlink.
|
||||
error = vfs_unlink(nd.dentry->d_inode, dentry, nd.mnt);
|
||||
46
net-fs/novell-novfs/files/novfs-2.0.0-2.6.25.patch
Normal file
46
net-fs/novell-novfs/files/novfs-2.0.0-2.6.25.patch
Normal file
@@ -0,0 +1,46 @@
|
||||
--- src/daemon.c
|
||||
+++ src/daemon.c
|
||||
@@ -2783,7 +2783,7 @@
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
|
||||
// Version of 2.6.20 changed the number of
|
||||
// parameters passed to vfs_unlink.
|
||||
- error = vfs_unlink(nd.dentry->d_inode, dentry, nd.mnt);
|
||||
+ error = vfs_unlink(nd.path.dentry->d_inode, dentry, nd.path.mnt);
|
||||
#else
|
||||
error = vfs_unlink(nd.dentry->d_inode, dentry);
|
||||
#endif
|
||||
@@ -2791,10 +2791,10 @@
|
||||
}
|
||||
dput(dentry);
|
||||
}
|
||||
- mutex_unlock(&nd.dentry->d_inode->i_mutex);
|
||||
+ mutex_unlock(&nd.path.dentry->d_inode->i_mutex);
|
||||
|
||||
}
|
||||
- path_release(&nd);
|
||||
+ path_put(&nd.path);
|
||||
}
|
||||
|
||||
if (inode)
|
||||
--- src/inode.c
|
||||
+++ src/inode.c
|
||||
@@ -376,7 +376,6 @@
|
||||
};
|
||||
|
||||
static struct super_operations Novfs_ops = {
|
||||
- .read_inode = Novfs_read_inode,
|
||||
.statfs = Novfs_statfs,
|
||||
.clear_inode = Novfs_clear_inode,
|
||||
.drop_inode = generic_delete_inode,
|
||||
@@ -4596,7 +4595,10 @@
|
||||
buf = (char *)Novfs_Malloc(PATH_LENGTH_BUFFER, GFP_KERNEL);
|
||||
if (buf)
|
||||
{
|
||||
- path = d_path(m->mnt_root, m, buf, PATH_LENGTH_BUFFER);
|
||||
+ struct path my_path;
|
||||
+ my_path.mnt = m;
|
||||
+ my_path.dentry= m->mnt_root;
|
||||
+ path = d_path(&my_path, buf, PATH_LENGTH_BUFFER);
|
||||
if (path)
|
||||
{
|
||||
if ( !Novfs_CurrentMount || (Novfs_CurrentMount && strcmp(Novfs_CurrentMount, path)))
|
||||
48
net-fs/novell-novfs/files/novfs-2.0.0.444-2.6.28-1.patch
Normal file
48
net-fs/novell-novfs/files/novfs-2.0.0.444-2.6.28-1.patch
Normal file
@@ -0,0 +1,48 @@
|
||||
Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
|
||||
Date: 2009-01-27
|
||||
Initial Package Version: 2.0.0.444
|
||||
Origin: me
|
||||
Upstream Status: unknown
|
||||
Description: support >= 2.6.28
|
||||
|
||||
diff -Naur novfs-2.0.0.444.orig/inode.c novfs-2.0.0.444/inode.c
|
||||
--- novfs-2.0.0.444.orig/inode.c 2009-01-27 20:19:47.375095216 +0000
|
||||
+++ novfs-2.0.0.444/inode.c 2009-01-27 20:18:27.000000000 +0000
|
||||
@@ -246,8 +246,13 @@
|
||||
.readpages = novfs_a_readpages,
|
||||
.writepage = novfs_a_writepage,
|
||||
.writepages = novfs_a_writepages,
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28))
|
||||
+ .write_begin = novfs_a_prepare_write,
|
||||
+ .write_end = novfs_a_commit_write,
|
||||
+#else
|
||||
.prepare_write = novfs_a_prepare_write,
|
||||
.commit_write = novfs_a_commit_write,
|
||||
+#endif
|
||||
.set_page_dirty = __set_page_dirty_nobuffers,
|
||||
.direct_IO = novfs_a_direct_IO,
|
||||
};
|
||||
@@ -1887,7 +1892,11 @@
|
||||
SetPageUptodate(page);
|
||||
unlock_page(page);
|
||||
if (!pagevec_add(plru_pvec, page))
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
|
||||
+ __pagevec_lru_add_file(plru_pvec);
|
||||
+ #else
|
||||
__pagevec_lru_add(plru_pvec);
|
||||
+ #endif
|
||||
data += PAGE_CACHE_SIZE;
|
||||
}
|
||||
return;
|
||||
@@ -2383,7 +2392,11 @@
|
||||
page_cache_release(page);
|
||||
}
|
||||
|
||||
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,28)
|
||||
+ pagevec_lru_add_file(&lru_pvec);
|
||||
+ #else
|
||||
pagevec_lru_add(&lru_pvec);
|
||||
+ #endif
|
||||
kfree(rbuf);
|
||||
} else {
|
||||
retCode = -ENOMEM;
|
||||
148
net-fs/novell-novfs/files/novfs-2.0.0.444-2.6.29-1.patch
Normal file
148
net-fs/novell-novfs/files/novfs-2.0.0.444-2.6.29-1.patch
Normal file
@@ -0,0 +1,148 @@
|
||||
Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
|
||||
Date: 2009-04-09
|
||||
Initial Package Version: 2.0.0.444
|
||||
Origin: me
|
||||
Upstream Status: unknown
|
||||
Description: make it compile with 2.6.29
|
||||
|
||||
diff -Naur novfs-2.0.0.444.orig/file.c novfs-2.0.0.444/file.c
|
||||
--- novfs-2.0.0.444.orig/file.c 2009-04-09 14:15:42.656043713 +0000
|
||||
+++ novfs-2.0.0.444/file.c 2009-04-09 14:22:00.067362069 +0000
|
||||
@@ -185,8 +185,13 @@
|
||||
DbgPrint("novfs_Get_File_Info: Path = %s\n", Path);
|
||||
|
||||
Info->mode = S_IFDIR | 0700;
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
|
||||
+ Info->uid = current_uid();
|
||||
+ Info->gid = current_gid();
|
||||
+#else
|
||||
Info->uid = current->uid;
|
||||
Info->gid = current->gid;
|
||||
+#endif
|
||||
Info->size = 0;
|
||||
Info->atime = Info->mtime = Info->ctime = CURRENT_TIME;
|
||||
|
||||
@@ -230,8 +235,13 @@
|
||||
Info->mode &= ~(S_IWUSR);
|
||||
}
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
|
||||
+ Info->uid = current_euid();
|
||||
+ Info->gid = current_egid();
|
||||
+#else
|
||||
Info->uid = current->euid;
|
||||
Info->gid = current->egid;
|
||||
+#endif
|
||||
Info->size = reply->fileSize;
|
||||
Info->atime.tv_sec =
|
||||
reply->lastAccessTime;
|
||||
@@ -717,8 +727,13 @@
|
||||
info->mode |= S_IXUSR;
|
||||
}
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
|
||||
+ info->uid = current_euid();
|
||||
+ info->gid = current_egid();
|
||||
+#else
|
||||
info->uid = current->euid;
|
||||
info->gid = current->egid;
|
||||
+#endif
|
||||
info->size = data->size;
|
||||
info->atime.tv_sec =
|
||||
data->lastAccessTime;
|
||||
diff -Naur novfs-2.0.0.444.orig/inode.c novfs-2.0.0.444/inode.c
|
||||
--- novfs-2.0.0.444.orig/inode.c 2009-04-09 14:15:42.650832058 +0000
|
||||
+++ novfs-2.0.0.444/inode.c 2009-04-09 14:35:51.150978797 +0000
|
||||
@@ -1216,7 +1216,11 @@
|
||||
uid = novfs_scope_get_uid(((struct inode_data *) inode->i_private)->Scope);
|
||||
} else {
|
||||
SC_INITIALIZE(sessionId);
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
|
||||
+ uid = current_euid();
|
||||
+#else
|
||||
uid = current->euid;
|
||||
+#endif
|
||||
}
|
||||
|
||||
if (IS_ROOT(file->f_dentry) || // Root
|
||||
@@ -2707,7 +2711,11 @@
|
||||
struct novfs_entry_info *info = NULL;
|
||||
struct inode_data *id;
|
||||
struct inode *inode = NULL;
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
|
||||
+ uid_t uid = current_euid();
|
||||
+#else
|
||||
uid_t uid = current->euid;
|
||||
+#endif
|
||||
ino_t ino = 0;
|
||||
struct qstr name;
|
||||
char *buf;
|
||||
diff -Naur novfs-2.0.0.444.orig/scope.c novfs-2.0.0.444/scope.c
|
||||
--- novfs-2.0.0.444.orig/scope.c 2009-04-09 14:15:42.692656325 +0000
|
||||
+++ novfs-2.0.0.444/scope.c 2009-04-09 14:45:04.925672739 +0000
|
||||
@@ -92,11 +92,20 @@
|
||||
|
||||
task = current;
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
|
||||
+ DbgPrint("Scope_Find_Scope: %d %d %d %d\n", current_uid(),
|
||||
+ current_euid(), current_suid(), current_fsuid());
|
||||
+
|
||||
+ //scopeId = task->euid;
|
||||
+ UID_TO_SCHANDLE(scopeId, current_euid());
|
||||
+#else
|
||||
DbgPrint("Scope_Find_Scope: %d %d %d %d\n", task->uid, task->euid,
|
||||
task->suid, task->fsuid);
|
||||
|
||||
//scopeId = task->euid;
|
||||
UID_TO_SCHANDLE(scopeId, task->euid);
|
||||
+#endif
|
||||
+
|
||||
|
||||
scope = Scope_Search4Scope(scopeId, 0, 0);
|
||||
|
||||
@@ -108,17 +117,30 @@
|
||||
scope->ScopePid = task->pid;
|
||||
scope->ScopeTask = task;
|
||||
scope->ScopeHash = 0;
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
|
||||
+ scope->ScopeUid = current_euid();
|
||||
+#else
|
||||
scope->ScopeUid = task->euid;
|
||||
+#endif
|
||||
scope->ScopeUserName[0] = '\0';
|
||||
|
||||
if (!novfs_daemon_create_sessionId(&scope->SessionId)) {
|
||||
DbgPrint("Scope_Find_Scope2: %d %d %d %d\n",
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
|
||||
+ current_uid(), current_euid(),
|
||||
+ current_suid(), current_fsuid());
|
||||
+#else
|
||||
task->uid, task->euid, task->suid,
|
||||
task->fsuid);
|
||||
+#endif
|
||||
memset(scope->ScopeUserName, 0,
|
||||
sizeof(scope->ScopeUserName));
|
||||
scope->ScopeUserNameLength = 0;
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
|
||||
+ novfs_daemon_getpwuid(current_euid(),
|
||||
+#else
|
||||
novfs_daemon_getpwuid(task->euid,
|
||||
+#endif
|
||||
sizeof(scope->ScopeUserName),
|
||||
scope->ScopeUserName);
|
||||
scope->ScopeUserNameLength =
|
||||
@@ -477,8 +499,13 @@
|
||||
rscope = NULL;
|
||||
rcu_read_lock();
|
||||
for_each_process(task) {
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
|
||||
+ if ((task->cred->uid == scope->ScopeUid)
|
||||
+ || (task->cred->euid == scope->ScopeUid)) {
|
||||
+#else
|
||||
if ((task->uid == scope->ScopeUid)
|
||||
|| (task->euid == scope->ScopeUid)) {
|
||||
+#endif
|
||||
rscope = scope;
|
||||
break;
|
||||
}
|
||||
22
net-fs/novell-novfs/files/novfs-2.0.0.444-apparmor-1.patch
Normal file
22
net-fs/novell-novfs/files/novfs-2.0.0.444-apparmor-1.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
|
||||
Date: 2008-11-16
|
||||
Initial Package Version: 2.0.0.444
|
||||
Origin: opensuse kernel
|
||||
Upstream Status: unknown
|
||||
Description: add apparmor
|
||||
|
||||
diff -Naur novfs-2.0.0.444.orig/daemon.c novfs-2.0.0.444/daemon.c
|
||||
--- novfs-2.0.0.444.orig/daemon.c 2008-11-03 20:34:44.000000000 +0000
|
||||
+++ novfs-2.0.0.444/daemon.c 2008-11-16 10:36:44.190003896 +0000
|
||||
@@ -2090,7 +2090,11 @@
|
||||
if (inode) {
|
||||
atomic_inc(&inode->i_count);
|
||||
}
|
||||
+#ifdef CONFIG_SECURITY_APPARMOR
|
||||
+ error = vfs_unlink(nd.path.dentry->d_inode, dentry, nd.path.mnt);
|
||||
+#else
|
||||
error = vfs_unlink(nd.path.dentry->d_inode, dentry);
|
||||
+#endif
|
||||
DbgPrint
|
||||
("local_unlink: vfs_unlink %d\n",
|
||||
error);
|
||||
Reference in New Issue
Block a user