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

Subversion リポジトリの参照

Diff of /trunk/1.8.x/ccs-patch/patches/ccs-patch-2.6.18-debian-etch.diff

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

revision 2869 by kumaneko, Sat Aug 8 02:47:05 2009 UTC revision 2922 by kumaneko, Wed Aug 19 04:26:56 2009 UTC
# Line 15  Source code for this patch is "apt-get i Line 15  Source code for this patch is "apt-get i
15   fs/attr.c                       |    5 +++++   fs/attr.c                       |    5 +++++
16   fs/compat.c                     |    9 ++++++++-   fs/compat.c                     |    9 ++++++++-
17   fs/exec.c                       |   12 +++++++++++-   fs/exec.c                       |   12 +++++++++++-
18   fs/fcntl.c                      |    5 +++++   fs/fcntl.c                      |    4 ++++
19   fs/ioctl.c                      |    5 +++++   fs/ioctl.c                      |    5 +++++
20   fs/namei.c                      |   38 ++++++++++++++++++++++++++++++++++++++   fs/namei.c                      |   32 ++++++++++++++++++++++++++++++++
21   fs/namespace.c                  |   25 ++++++++++++++++++++++++-   fs/namespace.c                  |   24 +++++++++++++++++++++++-
22   fs/open.c                       |   28 ++++++++++++++++++++++++++++   fs/open.c                       |   27 +++++++++++++++++++++++++++
23   fs/proc/proc_misc.c             |    1 +   fs/proc/proc_misc.c             |    1 +
24   include/linux/init_task.h       |    2 ++   include/linux/init_task.h       |    2 ++
25   include/linux/sched.h           |    4 ++++   include/linux/sched.h           |    4 ++++
# Line 44  Source code for this patch is "apt-get i Line 44  Source code for this patch is "apt-get i
44   net/unix/af_unix.c              |    4 ++++   net/unix/af_unix.c              |    4 ++++
45   security/Kconfig                |    2 ++   security/Kconfig                |    2 ++
46   security/Makefile               |    3 +++   security/Makefile               |    3 +++
47   42 files changed, 290 insertions(+), 9 deletions(-)   42 files changed, 281 insertions(+), 9 deletions(-)
48    
49  --- linux-2.6.18-24etch2.orig/arch/alpha/kernel/ptrace.c  --- linux-2.6.18-24etch2.orig/arch/alpha/kernel/ptrace.c
50  +++ linux-2.6.18-24etch2/arch/alpha/kernel/ptrace.c  +++ linux-2.6.18-24etch2/arch/alpha/kernel/ptrace.c
# Line 254  Source code for this patch is "apt-get i Line 254  Source code for this patch is "apt-get i
254          if (inode->i_op && inode->i_op->setattr) {          if (inode->i_op && inode->i_op->setattr) {
255                  error = security_inode_setattr(dentry, attr);                  error = security_inode_setattr(dentry, attr);
256                  if (!error)                  if (!error)
257  +                       error = ccs_check_setattr_permission(dentry, attr);  +                       error = ccs_setattr_permission(dentry, attr);
258  +               if (!error)  +               if (!error)
259                          error = inode->i_op->setattr(dentry, attr);                          error = inode->i_op->setattr(dentry, attr);
260          } else {          } else {
# Line 262  Source code for this patch is "apt-get i Line 262  Source code for this patch is "apt-get i
262                  if (!error)                  if (!error)
263                          error = security_inode_setattr(dentry, attr);                          error = security_inode_setattr(dentry, attr);
264  +               if (!error)  +               if (!error)
265  +                       error = ccs_check_setattr_permission(dentry, attr);  +                       error = ccs_setattr_permission(dentry, attr);
266                  if (!error) {                  if (!error) {
267                          if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) ||                          if ((ia_valid & ATTR_UID && attr->ia_uid != inode->i_uid) ||
268                              (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid))                              (ia_valid & ATTR_GID && attr->ia_gid != inode->i_gid))
# Line 320  Source code for this patch is "apt-get i Line 320  Source code for this patch is "apt-get i
320          if (error)          if (error)
321                  goto exit;                  goto exit;
322    
323  +       error = ccs_check_uselib_permission(nd.dentry, nd.mnt);  +       error = ccs_uselib_permission(nd.dentry, nd.mnt);
324  +       if (error)  +       if (error)
325  +               goto exit;  +               goto exit;
326  +  +
# Line 332  Source code for this patch is "apt-get i Line 332  Source code for this patch is "apt-get i
332                      S_ISREG(inode->i_mode)) {                      S_ISREG(inode->i_mode)) {
333                          int err = vfs_permission(&nd, MAY_EXEC);                          int err = vfs_permission(&nd, MAY_EXEC);
334  +                       if (!err)  +                       if (!err)
335  +                               err = ccs_check_open_exec_permission(nd.dentry,  +                               err = ccs_open_exec_permission(nd.dentry,
336  +                                                                    nd.mnt);  +                                                                    nd.mnt);
337                          file = ERR_PTR(err);                          file = ERR_PTR(err);
338                          if (!err) {                          if (!err) {
# Line 357  Source code for this patch is "apt-get i Line 357  Source code for this patch is "apt-get i
357    
358   void fastcall set_close_on_exec(unsigned int fd, int flag)   void fastcall set_close_on_exec(unsigned int fd, int flag)
359   {   {
360  @@ -214,6 +215,10 @@ static int setfl(int fd, struct file * f  @@ -214,6 +215,9 @@ static int setfl(int fd, struct file * f
361          if (((arg ^ filp->f_flags) & O_APPEND) && IS_APPEND(inode))          if (((arg ^ filp->f_flags) & O_APPEND) && IS_APPEND(inode))
362                  return -EPERM;                  return -EPERM;
363    
364  +       if (((arg ^ filp->f_flags) & O_APPEND) &&  +       if (((arg ^ filp->f_flags) & O_APPEND) && ccs_rewrite_permission(filp))
 +           ccs_check_rewrite_permission(filp))  
365  +               return -EPERM;  +               return -EPERM;
366  +  +
367          /* O_NOATIME can only be set by the owner or superuser */          /* O_NOATIME can only be set by the owner or superuser */
# Line 392  Source code for this patch is "apt-get i Line 391  Source code for this patch is "apt-get i
391    
392          error = security_file_ioctl(filp, cmd, arg);          error = security_file_ioctl(filp, cmd, arg);
393  +       if (!error)  +       if (!error)
394  +               error = ccs_check_ioctl_permission(filp, cmd, arg);  +               error = ccs_ioctl_permission(filp, cmd, arg);
395          if (error)          if (error)
396                  goto out_fput;                  goto out_fput;
397    
# Line 412  Source code for this patch is "apt-get i Line 411  Source code for this patch is "apt-get i
411                          return -EPERM;                          return -EPERM;
412    
413  +       /* includes O_APPEND and O_TRUNC checks */  +       /* includes O_APPEND and O_TRUNC checks */
414  +       error = ccs_check_open_permission(dentry, nd->mnt, flag);  +       error = ccs_open_permission(dentry, nd->mnt, flag);
415  +       if (error)  +       if (error)
416  +               return error;  +               return error;
417  +  +
# Line 431  Source code for this patch is "apt-get i Line 430  Source code for this patch is "apt-get i
430          if (!path.dentry->d_inode) {          if (!path.dentry->d_inode) {
431                  if (!IS_POSIXACL(dir->d_inode))                  if (!IS_POSIXACL(dir->d_inode))
432                          mode &= ~current->fs->umask;                          mode &= ~current->fs->umask;
433  +               error = ccs_check_mknod_permission(dir->d_inode, path.dentry,  +               error = ccs_mknod_permission(dir->d_inode, path.dentry,
434  +                                                  nd->mnt, mode, 0);  +                                            nd->mnt, mode, 0);
435  +               if (!error)  +               if (!error)
436                  error = vfs_create(dir->d_inode, path.dentry, mode, nd);                  error = vfs_create(dir->d_inode, path.dentry, mode, nd);
437                  mutex_unlock(&dir->d_inode->i_mutex);                  mutex_unlock(&dir->d_inode->i_mutex);
438                  dput(nd->dentry);                  dput(nd->dentry);
439  @@ -1848,6 +1859,10 @@ asmlinkage long sys_mknodat(int dfd, con  @@ -1848,6 +1859,9 @@ asmlinkage long sys_mknodat(int dfd, con
440          if (!IS_POSIXACL(nd.dentry->d_inode))          if (!IS_POSIXACL(nd.dentry->d_inode))
441                  mode &= ~current->fs->umask;                  mode &= ~current->fs->umask;
442          if (!IS_ERR(dentry)) {          if (!IS_ERR(dentry)) {
443  +               error = ccs_check_mknod_permission(nd.dentry->d_inode, dentry,  +               error = ccs_mknod_permission(nd.dentry->d_inode, dentry,
444  +                                                  nd.mnt, mode,  +                                            nd.mnt, mode, dev);
 +                                                  new_decode_dev(dev));  
445  +               if (!error)  +               if (!error)
446                  switch (mode & S_IFMT) {                  switch (mode & S_IFMT) {
447                  case 0: case S_IFREG:                  case 0: case S_IFREG:
448                          error = vfs_create(nd.dentry->d_inode,dentry,mode,&nd);                          error = vfs_create(nd.dentry->d_inode,dentry,mode,&nd);
449  @@ -1921,6 +1936,10 @@ asmlinkage long sys_mkdirat(int dfd, con  @@ -1921,6 +1935,9 @@ asmlinkage long sys_mkdirat(int dfd, con
450                  if (!IS_ERR(dentry)) {                  if (!IS_ERR(dentry)) {
451                          if (!IS_POSIXACL(nd.dentry->d_inode))                          if (!IS_POSIXACL(nd.dentry->d_inode))
452                                  mode &= ~current->fs->umask;                                  mode &= ~current->fs->umask;
453  +                       error = ccs_check_mkdir_permission(nd.dentry->d_inode,  +                       error = ccs_mkdir_permission(nd.dentry->d_inode,
454  +                                                          dentry, nd.mnt,  +                                                    dentry, nd.mnt, mode);
 +                                                          mode);  
455  +                       if (!error)  +                       if (!error)
456                          error = vfs_mkdir(nd.dentry->d_inode, dentry, mode);                          error = vfs_mkdir(nd.dentry->d_inode, dentry, mode);
457                          dput(dentry);                          dput(dentry);
458                  }                  }
459  @@ -2029,6 +2048,9 @@ static long do_rmdir(int dfd, const char  @@ -2029,6 +2046,9 @@ static long do_rmdir(int dfd, const char
460          dentry = lookup_hash(&nd);          dentry = lookup_hash(&nd);
461          error = PTR_ERR(dentry);          error = PTR_ERR(dentry);
462          if (!IS_ERR(dentry)) {          if (!IS_ERR(dentry)) {
463  +               error = ccs_check_rmdir_permission(nd.dentry->d_inode, dentry,  +               error = ccs_rmdir_permission(nd.dentry->d_inode, dentry,
464  +                                                  nd.mnt);  +                                            nd.mnt);
465  +               if (!error)  +               if (!error)
466                  error = vfs_rmdir(nd.dentry->d_inode, dentry);                  error = vfs_rmdir(nd.dentry->d_inode, dentry);
467                  dput(dentry);                  dput(dentry);
468          }          }
469  @@ -2109,6 +2131,9 @@ static long do_unlinkat(int dfd, const c  @@ -2109,6 +2129,9 @@ static long do_unlinkat(int dfd, const c
470                  inode = dentry->d_inode;                  inode = dentry->d_inode;
471                  if (inode)                  if (inode)
472                          atomic_inc(&inode->i_count);                          atomic_inc(&inode->i_count);
473  +               error = ccs_check_unlink_permission(nd.dentry->d_inode, dentry,  +               error = ccs_unlink_permission(nd.dentry->d_inode, dentry,
474  +                                                   nd.mnt);  +                                             nd.mnt);
475  +               if (!error)  +               if (!error)
476                  error = vfs_unlink(nd.dentry->d_inode, dentry);                  error = vfs_unlink(nd.dentry->d_inode, dentry);
477          exit2:          exit2:
478                  dput(dentry);                  dput(dentry);
479  @@ -2187,6 +2212,10 @@ asmlinkage long sys_symlinkat(const char  @@ -2187,6 +2210,9 @@ asmlinkage long sys_symlinkat(const char
480                  dentry = lookup_create(&nd, 0);                  dentry = lookup_create(&nd, 0);
481                  error = PTR_ERR(dentry);                  error = PTR_ERR(dentry);
482                  if (!IS_ERR(dentry)) {                  if (!IS_ERR(dentry)) {
483  +                       error = ccs_check_symlink_permission(nd.dentry->d_inode,  +                       error = ccs_symlink_permission(nd.dentry->d_inode,
484  +                                                            dentry, nd.mnt,  +                                                      dentry, nd.mnt, from);
 +                                                            from);  
485  +                       if (!error)  +                       if (!error)
486                          error = vfs_symlink(nd.dentry->d_inode, dentry, from, S_IALLUGO);                          error = vfs_symlink(nd.dentry->d_inode, dentry, from, S_IALLUGO);
487                          dput(dentry);                          dput(dentry);
488                  }                  }
489  @@ -2281,6 +2310,10 @@ asmlinkage long sys_linkat(int olddfd, c  @@ -2281,6 +2307,9 @@ asmlinkage long sys_linkat(int olddfd, c
490          new_dentry = lookup_create(&nd, 0);          new_dentry = lookup_create(&nd, 0);
491          error = PTR_ERR(new_dentry);          error = PTR_ERR(new_dentry);
492          if (!IS_ERR(new_dentry)) {          if (!IS_ERR(new_dentry)) {
493  +               error = ccs_check_link_permission(old_nd.dentry,  +               error = ccs_link_permission(old_nd.dentry, nd.dentry->d_inode,
494  +                                                 nd.dentry->d_inode,  +                                           new_dentry, nd.mnt);
 +                                                 new_dentry, nd.mnt);  
495  +               if (!error)  +               if (!error)
496                  error = vfs_link(old_nd.dentry, nd.dentry->d_inode, new_dentry);                  error = vfs_link(old_nd.dentry, nd.dentry->d_inode, new_dentry);
497                  dput(new_dentry);                  dput(new_dentry);
498          }          }
499  @@ -2507,6 +2540,11 @@ static int do_rename(int olddfd, const c  @@ -2507,6 +2536,9 @@ static int do_rename(int olddfd, const c
500          if (new_dentry == trap)          if (new_dentry == trap)
501                  goto exit5;                  goto exit5;
502    
503  +       error = ccs_check_rename_permission(old_dir->d_inode, old_dentry,  +       error = ccs_rename_permission(old_dir->d_inode, old_dentry,
504  +                                           new_dir->d_inode, new_dentry,  +                                     new_dir->d_inode, new_dentry, newnd.mnt);
 +                                           newnd.mnt);  
505  +       if (!error)  +       if (!error)
 +  
506          error = vfs_rename(old_dir->d_inode, old_dentry,          error = vfs_rename(old_dir->d_inode, old_dentry,
507                                     new_dir->d_inode, new_dentry);                                     new_dir->d_inode, new_dentry);
508   exit5:   exit5:
# Line 573  Source code for this patch is "apt-get i Line 566  Source code for this patch is "apt-get i
566    
567          newmnt->mnt_flags = mnt_flags;          newmnt->mnt_flags = mnt_flags;
568          if ((err = graft_tree(newmnt, nd)))          if ((err = graft_tree(newmnt, nd)))
569  @@ -1402,6 +1416,11 @@ long do_mount(char *dev_name, char *dir_  @@ -1402,6 +1416,10 @@ long do_mount(char *dev_name, char *dir_
570          if (data_page)          if (data_page)
571                  ((char *)data_page)[PAGE_SIZE - 1] = 0;                  ((char *)data_page)[PAGE_SIZE - 1] = 0;
572    
573  +       retval = ccs_check_mount_permission(dev_name, dir_name, type_page,  +       retval = ccs_mount_permission(dev_name, dir_name, type_page, &flags);
 +                                           &flags);  
574  +       if (retval)  +       if (retval)
575  +               return retval;  +               return retval;
576  +  +
577          /* Separate the per-mountpoint flags */          /* Separate the per-mountpoint flags */
578          if (flags & MS_NOSUID)          if (flags & MS_NOSUID)
579                  mnt_flags |= MNT_NOSUID;                  mnt_flags |= MNT_NOSUID;
580  @@ -1691,6 +1710,8 @@ asmlinkage long sys_pivot_root(const cha  @@ -1691,6 +1709,8 @@ asmlinkage long sys_pivot_root(const cha
581    
582          if (!capable(CAP_SYS_ADMIN))          if (!capable(CAP_SYS_ADMIN))
583                  return -EPERM;                  return -EPERM;
# Line 594  Source code for this patch is "apt-get i Line 586  Source code for this patch is "apt-get i
586    
587          lock_kernel();          lock_kernel();
588    
589  @@ -1707,6 +1728,8 @@ asmlinkage long sys_pivot_root(const cha  @@ -1707,6 +1727,8 @@ asmlinkage long sys_pivot_root(const cha
590                  goto out1;                  goto out1;
591    
592          error = security_sb_pivotroot(&old_nd, &new_nd);          error = security_sb_pivotroot(&old_nd, &new_nd);
593  +       if (!error)  +       if (!error)
594  +               error = ccs_check_pivot_root_permission(&old_nd, &new_nd);  +               error = ccs_pivot_root_permission(&old_nd, &new_nd);
595          if (error) {          if (error) {
596                  path_release(&old_nd);                  path_release(&old_nd);
597                  goto out1;                  goto out1;
# Line 617  Source code for this patch is "apt-get i Line 609  Source code for this patch is "apt-get i
609          if (error)          if (error)
610                  goto dput_and_out;                  goto dput_and_out;
611    
612  +       error = ccs_check_truncate_permission(nd.dentry, nd.mnt, length, 0);  +       error = ccs_truncate_permission(nd.dentry, nd.mnt, length, 0);
613  +       if (!error)  +       if (!error)
614          error = locks_verify_truncate(inode, NULL, length);          error = locks_verify_truncate(inode, NULL, length);
615          if (!error) {          if (!error) {
616                  DQUOT_INIT(inode);                  DQUOT_INIT(inode);
617  @@ -320,6 +323,10 @@ static long do_sys_ftruncate(unsigned in  @@ -320,6 +323,9 @@ static long do_sys_ftruncate(unsigned in
618          if (IS_APPEND(inode))          if (IS_APPEND(inode))
619                  goto out_putf;                  goto out_putf;
620    
621  +       error = ccs_check_truncate_permission(dentry, file->f_vfsmnt, length,  +       error = ccs_truncate_permission(dentry, file->f_vfsmnt, length, 0);
 +                                             0);  
622  +       if (error)  +       if (error)
623  +               goto out_putf;  +               goto out_putf;
624          error = locks_verify_truncate(inode, file, length);          error = locks_verify_truncate(inode, file, length);
625          if (!error)          if (!error)
626                  error = do_truncate(dentry, length, ATTR_MTIME|ATTR_CTIME, file);                  error = do_truncate(dentry, length, ATTR_MTIME|ATTR_CTIME, file);
627  @@ -608,6 +615,10 @@ asmlinkage long sys_chroot(const char __  @@ -608,6 +614,10 @@ asmlinkage long sys_chroot(const char __
628          error = -EPERM;          error = -EPERM;
629          if (!capable(CAP_SYS_CHROOT))          if (!capable(CAP_SYS_CHROOT))
630                  goto dput_and_out;                  goto dput_and_out;
631  +       if (!ccs_capable(CCS_SYS_CHROOT))  +       if (!ccs_capable(CCS_SYS_CHROOT))
632  +               goto dput_and_out;  +               goto dput_and_out;
633  +       if (ccs_check_chroot_permission(&nd))  +       if (ccs_chroot_permission(&nd))
634  +               goto dput_and_out;  +               goto dput_and_out;
635    
636          set_fs_root(current->fs, nd.mnt, nd.dentry);          set_fs_root(current->fs, nd.mnt, nd.dentry);
637          set_fs_altroot();          set_fs_altroot();
638  @@ -641,6 +652,9 @@ asmlinkage long sys_fchmod(unsigned int  @@ -641,6 +651,9 @@ asmlinkage long sys_fchmod(unsigned int
639          err = -EPERM;          err = -EPERM;
640          if (IS_IMMUTABLE(inode) || IS_APPEND(inode))          if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
641                  goto out_putf;                  goto out_putf;
# Line 654  Source code for this patch is "apt-get i Line 645  Source code for this patch is "apt-get i
645          mutex_lock(&inode->i_mutex);          mutex_lock(&inode->i_mutex);
646          if (mode == (mode_t) -1)          if (mode == (mode_t) -1)
647                  mode = inode->i_mode;                  mode = inode->i_mode;
648  @@ -675,6 +689,9 @@ asmlinkage long sys_fchmodat(int dfd, co  @@ -675,6 +688,9 @@ asmlinkage long sys_fchmodat(int dfd, co
649          error = -EPERM;          error = -EPERM;
650          if (IS_IMMUTABLE(inode) || IS_APPEND(inode))          if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
651                  goto dput_and_out;                  goto dput_and_out;
# Line 664  Source code for this patch is "apt-get i Line 655  Source code for this patch is "apt-get i
655    
656          mutex_lock(&inode->i_mutex);          mutex_lock(&inode->i_mutex);
657          if (mode == (mode_t) -1)          if (mode == (mode_t) -1)
658  @@ -737,6 +754,8 @@ asmlinkage long sys_chown(const char __u  @@ -737,6 +753,8 @@ asmlinkage long sys_chown(const char __u
659    
660          error = user_path_walk(filename, &nd);          error = user_path_walk(filename, &nd);
661          if (!error) {          if (!error) {
# Line 673  Source code for this patch is "apt-get i Line 664  Source code for this patch is "apt-get i
664                  error = chown_common(nd.dentry, user, group);                  error = chown_common(nd.dentry, user, group);
665                  path_release(&nd);                  path_release(&nd);
666          }          }
667  @@ -756,6 +775,8 @@ asmlinkage long sys_fchownat(int dfd, co  @@ -756,6 +774,8 @@ asmlinkage long sys_fchownat(int dfd, co
668          follow = (flag & AT_SYMLINK_NOFOLLOW) ? 0 : LOOKUP_FOLLOW;          follow = (flag & AT_SYMLINK_NOFOLLOW) ? 0 : LOOKUP_FOLLOW;
669          error = __user_walk_fd(dfd, filename, follow, &nd);          error = __user_walk_fd(dfd, filename, follow, &nd);
670          if (!error) {          if (!error) {
# Line 682  Source code for this patch is "apt-get i Line 673  Source code for this patch is "apt-get i
673                  error = chown_common(nd.dentry, user, group);                  error = chown_common(nd.dentry, user, group);
674                  path_release(&nd);                  path_release(&nd);
675          }          }
676  @@ -770,6 +791,8 @@ asmlinkage long sys_lchown(const char __  @@ -770,6 +790,8 @@ asmlinkage long sys_lchown(const char __
677    
678          error = user_path_walk_link(filename, &nd);          error = user_path_walk_link(filename, &nd);
679          if (!error) {          if (!error) {
# Line 691  Source code for this patch is "apt-get i Line 682  Source code for this patch is "apt-get i
682                  error = chown_common(nd.dentry, user, group);                  error = chown_common(nd.dentry, user, group);
683                  path_release(&nd);                  path_release(&nd);
684          }          }
685  @@ -787,6 +810,9 @@ asmlinkage long sys_fchown(unsigned int  @@ -787,6 +809,9 @@ asmlinkage long sys_fchown(unsigned int
686                  struct dentry * dentry;                  struct dentry * dentry;
687                  dentry = file->f_dentry;                  dentry = file->f_dentry;
688                  audit_inode(NULL, dentry->d_inode);                  audit_inode(NULL, dentry->d_inode);
# Line 701  Source code for this patch is "apt-get i Line 692  Source code for this patch is "apt-get i
692                  error = chown_common(dentry, user, group);                  error = chown_common(dentry, user, group);
693                  fput(file);                  fput(file);
694          }          }
695  @@ -1199,6 +1225,8 @@ EXPORT_SYMBOL(sys_close);  @@ -1199,6 +1224,8 @@ EXPORT_SYMBOL(sys_close);
696    */    */
697   asmlinkage long sys_vhangup(void)   asmlinkage long sys_vhangup(void)
698   {   {
# Line 1310  Source code for this patch is "apt-get i Line 1301  Source code for this patch is "apt-get i
1301                   */                   */
1302                  mode = S_IFSOCK |                  mode = S_IFSOCK |
1303                         (SOCK_INODE(sock)->i_mode & ~current->fs->umask);                         (SOCK_INODE(sock)->i_mode & ~current->fs->umask);
1304  +               err = ccs_check_mknod_permission(nd.dentry->d_inode, dentry,  +               err = ccs_mknod_permission(nd.dentry->d_inode, dentry, nd.mnt,
1305  +                                                nd.mnt, mode, 0);  +                                          mode, 0);
1306  +               if (!err)  +               if (!err)
1307                  err = vfs_mknod(nd.dentry->d_inode, dentry, mode, 0);                  err = vfs_mknod(nd.dentry->d_inode, dentry, mode, 0);
1308                  if (err)                  if (err)

Legend:
Removed from v.2869  
changed lines
  Added in v.2922

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