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

Subversion リポジトリの参照

Diff of /trunk/1.8.x/ccs-patch/patches/ccs-patch-2.6.21.diff

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

revision 2298 by kumaneko, Mon Mar 23 01:27:04 2009 UTC revision 2299 by kumaneko, Mon Mar 23 06:08:10 2009 UTC
# Line 525  Source code for this patch is http://www Line 525  Source code for this patch is http://www
525          if (!IS_POSIXACL(dir->d_inode))          if (!IS_POSIXACL(dir->d_inode))
526                  mode &= ~current->fs->umask;                  mode &= ~current->fs->umask;
527  +       /***** TOMOYO Linux start. *****/  +       /***** TOMOYO Linux start. *****/
528  +       error = ccs_check_mknod_permission(dir->d_inode, path->dentry,  +       error = ccs_check_mknod_permission(dir->d_inode, path->dentry, nd->mnt,
529  +                                          nd->path.mnt, mode, 0);  +                                          mode, 0);
530  +       if (!error)  +       if (!error)
531  +       /***** TOMOYO Linux end. *****/  +       /***** TOMOYO Linux end. *****/
532          error = vfs_create(dir->d_inode, path->dentry, mode, nd);          error = vfs_create(dir->d_inode, path->dentry, mode, nd);
# Line 547  Source code for this patch is http://www Line 547  Source code for this patch is http://www
547                  mode &= ~current->fs->umask;                  mode &= ~current->fs->umask;
548          if (!IS_ERR(dentry)) {          if (!IS_ERR(dentry)) {
549  +               /***** TOMOYO Linux start. *****/  +               /***** TOMOYO Linux start. *****/
550  +               error = ccs_check_mknod_permission(nd.path.dentry->d_inode,  +               error = ccs_check_mknod_permission(nd.dentry->d_inode, dentry,
551  +                                                  dentry, nd.path.mnt, mode,  +                                                  nd.mnt, mode,
552  +                                                  new_decode_dev(dev));  +                                                  new_decode_dev(dev));
553  +               if (!error)  +               if (!error)
554  +               /***** TOMOYO Linux end. *****/  +               /***** TOMOYO Linux end. *****/
# Line 1246  Source code for this patch is http://www Line 1246  Source code for this patch is http://www
1246                          head = &hashinfo->bhash[inet_bhashfn(rover, hashinfo->bhash_size)];                          head = &hashinfo->bhash[inet_bhashfn(rover, hashinfo->bhash_size)];
1247                          spin_lock(&head->lock);                          spin_lock(&head->lock);
1248  +                       /***** SAKURA Linux start. *****/  +                       /***** SAKURA Linux start. *****/
1249  +                       if (ccs_may_autobind(rover))  +                       if (ccs_lport_reserved(rover))
1250  +                               goto next;  +                               goto next;
1251  +                       /***** SAKURA Linux end. *****/  +                       /***** SAKURA Linux end. *****/
1252                          inet_bind_bucket_for_each(tb, node, &head->chain)                          inet_bind_bucket_for_each(tb, node, &head->chain)
# Line 1269  Source code for this patch is http://www Line 1269  Source code for this patch is http://www
1269                  for (i = 1; i <= range; i++) {                  for (i = 1; i <= range; i++) {
1270                          port = low + (i + offset) % range;                          port = low + (i + offset) % range;
1271  +                       /***** SAKURA Linux start. *****/  +                       /***** SAKURA Linux start. *****/
1272  +                       if (ccs_may_autobind(port))  +                       if (ccs_lport_reserved(port))
1273  +                               continue;  +                               continue;
1274  +                       /***** SAKURA Linux end. *****/  +                       /***** SAKURA Linux end. *****/
1275                          head = &hinfo->bhash[inet_bhashfn(port, hinfo->bhash_size)];                          head = &hinfo->bhash[inet_bhashfn(port, hinfo->bhash_size)];
# Line 1292  Source code for this patch is http://www Line 1292  Source code for this patch is http://www
1292                                                  ((result - sysctl_local_port_range[0]) &                                                  ((result - sysctl_local_port_range[0]) &
1293                                                   (UDP_HTABLE_SIZE - 1));                                                   (UDP_HTABLE_SIZE - 1));
1294  +                               /***** SAKURA Linux start. *****/  +                               /***** SAKURA Linux start. *****/
1295  +                               if (ccs_may_autobind(result))  +                               if (ccs_lport_reserved(result))
1296  +                                       continue;  +                                       continue;
1297  +                               /***** SAKURA Linux end. *****/  +                               /***** SAKURA Linux end. *****/
1298                                  goto gotit;                                  goto gotit;
# Line 1303  Source code for this patch is http://www Line 1303  Source code for this patch is http://www
1303                                          + ((result - sysctl_local_port_range[0]) &                                          + ((result - sysctl_local_port_range[0]) &
1304                                             (UDP_HTABLE_SIZE - 1));                                             (UDP_HTABLE_SIZE - 1));
1305  +                       /***** SAKURA Linux start. *****/  +                       /***** SAKURA Linux start. *****/
1306  +                       if (ccs_may_autobind(result))  +                       if (ccs_lport_reserved(result))
1307  +                               continue;  +                               continue;
1308  +                       /***** SAKURA Linux end. *****/  +                       /***** SAKURA Linux end. *****/
1309                          if (! __udp_lib_lport_inuse(result, udptable))                          if (! __udp_lib_lport_inuse(result, udptable))
# Line 1326  Source code for this patch is http://www Line 1326  Source code for this patch is http://www
1326                  for (i = 1; i <= range; i++) {                  for (i = 1; i <= range; i++) {
1327                          port = low + (i + offset) % range;                          port = low + (i + offset) % range;
1328  +                       /***** SAKURA Linux start. *****/  +                       /***** SAKURA Linux start. *****/
1329  +                       if (ccs_may_autobind(port))  +                       if (ccs_lport_reserved(port))
1330  +                               continue;  +                               continue;
1331  +                       /***** SAKURA Linux end. *****/  +                       /***** SAKURA Linux end. *****/
1332                          head = &hinfo->bhash[inet_bhashfn(port, hinfo->bhash_size)];                          head = &hinfo->bhash[inet_bhashfn(port, hinfo->bhash_size)];

Legend:
Removed from v.2298  
changed lines
  Added in v.2299

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