オープンソース・ソフトウェアの開発とダウンロード

Subversion リポジトリの参照

Diff of /trunk/1.8.x/ccs-patch/patches/ccs-patch-2.6.32-ubuntu-10.04.diff

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4048 by kumaneko, Mon Oct 4 00:58:35 2010 UTC revision 4049 by kumaneko, Thu Oct 7 07:14:01 2010 UTC
# Line 5  Source code for this patch is "apt-get i Line 5  Source code for this patch is "apt-get i
5   fs/compat.c                     |    3 ++-   fs/compat.c                     |    3 ++-
6   fs/compat_ioctl.c               |    3 +++   fs/compat_ioctl.c               |    3 +++
7   fs/exec.c                       |    3 ++-   fs/exec.c                       |    3 ++-
8   fs/fcntl.c                      |    4 ++++   fs/fcntl.c                      |    5 +++++
9   fs/ioctl.c                      |    3 +++   fs/ioctl.c                      |    3 +++
10   fs/namei.c                      |   37 +++++++++++++++++++++++++++++++++++++   fs/namei.c                      |   37 +++++++++++++++++++++++++++++++++++++
11   fs/namespace.c                  |    9 +++++++++   fs/namespace.c                  |    9 +++++++++
# Line 34  Source code for this patch is "apt-get i Line 34  Source code for this patch is "apt-get i
34   net/unix/af_unix.c              |   10 ++++++++++   net/unix/af_unix.c              |   10 ++++++++++
35   security/Kconfig                |    2 ++   security/Kconfig                |    2 ++
36   security/Makefile               |    3 +++   security/Makefile               |    3 +++
37   32 files changed, 238 insertions(+), 11 deletions(-)   32 files changed, 239 insertions(+), 11 deletions(-)
38    
39  --- linux-2.6.32-25.44.orig/fs/compat.c  --- linux-2.6.32-25.44.orig/fs/compat.c
40  +++ linux-2.6.32-25.44/fs/compat.c  +++ linux-2.6.32-25.44/fs/compat.c
# Line 103  Source code for this patch is "apt-get i Line 103  Source code for this patch is "apt-get i
103    
104   void set_close_on_exec(unsigned int fd, int flag)   void set_close_on_exec(unsigned int fd, int flag)
105   {   {
106  @@ -156,6 +157,9 @@ static int setfl(int fd, struct file * f  @@ -428,6 +429,8 @@ SYSCALL_DEFINE3(fcntl, unsigned int, fd,
107          if (((arg ^ filp->f_flags) & O_APPEND) && IS_APPEND(inode))                  goto out;
108                  return -EPERM;  
109            err = security_file_fcntl(filp, cmd, arg);
110  +       if (((arg ^ filp->f_flags) & O_APPEND) && ccs_rewrite_permission(filp))  +       if (!err)
111  +               return -EPERM;  +               err = ccs_fcntl_permission(filp, cmd, arg);
112  +          if (err) {
113          /* O_NOATIME can only be set by the owner or superuser */                  fput(filp);
114          if ((arg & O_NOATIME) && !(filp->f_flags & O_NOATIME))                  return err;
115                  if (!is_owner_or_cap(inode))  @@ -453,6 +456,8 @@ SYSCALL_DEFINE3(fcntl64, unsigned int, f
116                    goto out;
117    
118            err = security_file_fcntl(filp, cmd, arg);
119    +       if (!err)
120    +               err = ccs_fcntl_permission(filp, cmd, arg);
121            if (err) {
122                    fput(filp);
123                    return err;
124  --- linux-2.6.32-25.44.orig/fs/ioctl.c  --- linux-2.6.32-25.44.orig/fs/ioctl.c
125  +++ linux-2.6.32-25.44/fs/ioctl.c  +++ linux-2.6.32-25.44/fs/ioctl.c
126  @@ -18,6 +18,7 @@  @@ -18,6 +18,7 @@

Legend:
Removed from v.4048  
changed lines
  Added in v.4049

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26