13 |
fs/fcntl.c | 5 +++++ |
fs/fcntl.c | 5 +++++ |
14 |
fs/ioctl.c | 5 +++++ |
fs/ioctl.c | 5 +++++ |
15 |
fs/namei.c | 35 +++++++++++++++++++++++++++++++++++ |
fs/namei.c | 35 +++++++++++++++++++++++++++++++++++ |
16 |
fs/namespace.c | 26 ++++++++++++++++++++++++++ |
fs/namespace.c | 24 ++++++++++++++++++++++++ |
17 |
fs/open.c | 15 +++++++++++++++ |
fs/open.c | 15 +++++++++++++++ |
18 |
fs/proc/proc_misc.c | 1 + |
fs/proc/proc_misc.c | 1 + |
19 |
include/linux/init_task.h | 2 ++ |
include/linux/init_task.h | 2 ++ |
39 |
net/unix/af_unix.c | 4 ++++ |
net/unix/af_unix.c | 4 ++++ |
40 |
security/Kconfig | 2 ++ |
security/Kconfig | 2 ++ |
41 |
security/Makefile | 3 +++ |
security/Makefile | 3 +++ |
42 |
37 files changed, 240 insertions(+), 2 deletions(-) |
37 files changed, 238 insertions(+), 2 deletions(-) |
43 |
|
|
44 |
--- linux-2.6.25.20-0.4.orig/arch/ia64/ia32/sys_ia32.c |
--- linux-2.6.25.20-0.4.orig/arch/ia64/ia32/sys_ia32.c |
45 |
+++ linux-2.6.25.20-0.4/arch/ia64/ia32/sys_ia32.c |
+++ linux-2.6.25.20-0.4/arch/ia64/ia32/sys_ia32.c |
458 |
|
|
459 |
newmnt->mnt_flags = mnt_flags; |
newmnt->mnt_flags = mnt_flags; |
460 |
if ((err = graft_tree(newmnt, nd))) |
if ((err = graft_tree(newmnt, nd))) |
461 |
@@ -1412,6 +1427,13 @@ long do_mount(char *dev_name, char *dir_ |
@@ -1412,6 +1427,11 @@ long do_mount(char *dev_name, char *dir_ |
462 |
if (data_page) |
if (data_page) |
463 |
((char *)data_page)[PAGE_SIZE - 1] = 0; |
((char *)data_page)[PAGE_SIZE - 1] = 0; |
464 |
|
|
|
+ if (!ccs_capable(CCS_SYS_MOUNT)) |
|
|
+ return -EPERM; |
|
465 |
+ retval = ccs_check_mount_permission(dev_name, dir_name, type_page, |
+ retval = ccs_check_mount_permission(dev_name, dir_name, type_page, |
466 |
+ &flags); |
+ &flags); |
467 |
+ if (retval) |
+ if (retval) |
470 |
/* Separate the per-mountpoint flags */ |
/* Separate the per-mountpoint flags */ |
471 |
if (flags & MS_NOSUID) |
if (flags & MS_NOSUID) |
472 |
mnt_flags |= MNT_NOSUID; |
mnt_flags |= MNT_NOSUID; |
473 |
@@ -1680,6 +1702,8 @@ asmlinkage long sys_pivot_root(const cha |
@@ -1680,6 +1700,8 @@ asmlinkage long sys_pivot_root(const cha |
474 |
|
|
475 |
if (!capable(CAP_SYS_ADMIN)) |
if (!capable(CAP_SYS_ADMIN)) |
476 |
return -EPERM; |
return -EPERM; |
479 |
|
|
480 |
lock_kernel(); |
lock_kernel(); |
481 |
|
|
482 |
@@ -1696,6 +1720,8 @@ asmlinkage long sys_pivot_root(const cha |
@@ -1696,6 +1718,8 @@ asmlinkage long sys_pivot_root(const cha |
483 |
goto out1; |
goto out1; |
484 |
|
|
485 |
error = security_sb_pivotroot(&old_nd, &new_nd); |
error = security_sb_pivotroot(&old_nd, &new_nd); |