30 |
fs/fcntl.c | 4 +++ |
fs/fcntl.c | 4 +++ |
31 |
fs/ioctl.c | 10 +++++++++ |
fs/ioctl.c | 10 +++++++++ |
32 |
fs/namei.c | 45 +++++++++++++++++++++++++++++++++++++++++++ |
fs/namei.c | 45 +++++++++++++++++++++++++++++++++++++++++++ |
33 |
fs/namespace.c | 33 ++++++++++++++++++++++++++++++- |
fs/namespace.c | 31 ++++++++++++++++++++++++++++- |
34 |
fs/open.c | 15 ++++++++++++++ |
fs/open.c | 15 ++++++++++++++ |
35 |
fs/proc/proc_misc.c | 1 |
fs/proc/proc_misc.c | 1 |
36 |
include/linux/sched.h | 6 +++++ |
include/linux/sched.h | 6 +++++ |
49 |
net/ipv6/udp.c | 8 +++++++ |
net/ipv6/udp.c | 8 +++++++ |
50 |
net/socket.c | 25 +++++++++++++++++++++-- |
net/socket.c | 25 +++++++++++++++++++++-- |
51 |
net/unix/af_unix.c | 4 +++ |
net/unix/af_unix.c | 4 +++ |
52 |
47 files changed, 307 insertions(+), 5 deletions(-) |
47 files changed, 305 insertions(+), 5 deletions(-) |
53 |
|
|
54 |
--- linux-2.4.37.4.orig/arch/alpha/kernel/ptrace.c |
--- linux-2.4.37.4.orig/arch/alpha/kernel/ptrace.c |
55 |
+++ linux-2.4.37.4/arch/alpha/kernel/ptrace.c |
+++ linux-2.4.37.4/arch/alpha/kernel/ptrace.c |
813 |
mnt->mnt_flags = mnt_flags; |
mnt->mnt_flags = mnt_flags; |
814 |
err = graft_tree(mnt, nd); |
err = graft_tree(mnt, nd); |
815 |
unlock: |
unlock: |
816 |
@@ -718,6 +735,13 @@ long do_mount(char * dev_name, char * di |
@@ -718,6 +735,11 @@ long do_mount(char * dev_name, char * di |
817 |
if (data_page) |
if (data_page) |
818 |
((char *)data_page)[PAGE_SIZE - 1] = 0; |
((char *)data_page)[PAGE_SIZE - 1] = 0; |
819 |
|
|
|
+ if (!ccs_capable(CCS_SYS_MOUNT)) |
|
|
+ return -EPERM; |
|
820 |
+ retval = ccs_check_mount_permission(dev_name, dir_name, type_page, |
+ retval = ccs_check_mount_permission(dev_name, dir_name, type_page, |
821 |
+ &flags); |
+ &flags); |
822 |
+ if (retval) |
+ if (retval) |
825 |
/* Separate the per-mountpoint flags */ |
/* Separate the per-mountpoint flags */ |
826 |
if (flags & MS_NOSUID) |
if (flags & MS_NOSUID) |
827 |
mnt_flags |= MNT_NOSUID; |
mnt_flags |= MNT_NOSUID; |
828 |
@@ -911,6 +935,8 @@ asmlinkage long sys_pivot_root(const cha |
@@ -911,6 +933,8 @@ asmlinkage long sys_pivot_root(const cha |
829 |
|
|
830 |
if (!capable(CAP_SYS_ADMIN)) |
if (!capable(CAP_SYS_ADMIN)) |
831 |
return -EPERM; |
return -EPERM; |
834 |
|
|
835 |
lock_kernel(); |
lock_kernel(); |
836 |
|
|
837 |
@@ -925,6 +951,11 @@ asmlinkage long sys_pivot_root(const cha |
@@ -925,6 +949,11 @@ asmlinkage long sys_pivot_root(const cha |
838 |
if (error) |
if (error) |
839 |
goto out1; |
goto out1; |
840 |
|
|