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

Subversion リポジトリの参照

Diff of /trunk/1.8.x/ccs-patch/patches/ccs-patch-2.6.15-ubuntu-6.06.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 536  Source code for this patch is "apt-get i Line 536  Source code for this patch is "apt-get i
536                          mode &= ~current->fs->umask;                          mode &= ~current->fs->umask;
537  +               /***** TOMOYO Linux start. *****/  +               /***** TOMOYO Linux start. *****/
538  +               error = ccs_check_mknod_permission(dir->d_inode, path.dentry,  +               error = ccs_check_mknod_permission(dir->d_inode, path.dentry,
539  +                                                  nd->path.mnt, mode, 0);  +                                                  nd->mnt, mode, 0);
540  +               if (!error)  +               if (!error)
541  +               /***** TOMOYO Linux end. *****/  +               /***** TOMOYO Linux end. *****/
542                  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 "apt-get i Line 547  Source code for this patch is "apt-get i
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 1252  Source code for this patch is "apt-get i Line 1252  Source code for this patch is "apt-get i
1252                          head = &hashinfo->bhash[inet_bhashfn(rover, hashinfo->bhash_size)];                          head = &hashinfo->bhash[inet_bhashfn(rover, hashinfo->bhash_size)];
1253                          spin_lock(&head->lock);                          spin_lock(&head->lock);
1254  +                       /***** SAKURA Linux start. *****/  +                       /***** SAKURA Linux start. *****/
1255  +                       if (ccs_may_autobind(rover))  +                       if (ccs_lport_reserved(rover))
1256  +                               goto next;  +                               goto next;
1257  +                       /***** SAKURA Linux end. *****/  +                       /***** SAKURA Linux end. *****/
1258                          inet_bind_bucket_for_each(tb, node, &head->chain)                          inet_bind_bucket_for_each(tb, node, &head->chain)
# Line 1275  Source code for this patch is "apt-get i Line 1275  Source code for this patch is "apt-get i
1275                  for (i = 1; i <= range; i++) {                  for (i = 1; i <= range; i++) {
1276                          port = low + (i + offset) % range;                          port = low + (i + offset) % range;
1277  +                       /***** SAKURA Linux start. *****/  +                       /***** SAKURA Linux start. *****/
1278  +                       if (ccs_may_autobind(port))  +                       if (ccs_lport_reserved(port))
1279  +                               continue;  +                               continue;
1280  +                       /***** SAKURA Linux end. *****/  +                       /***** SAKURA Linux end. *****/
1281                          head = &tcp_hashinfo.bhash[inet_bhashfn(port, tcp_hashinfo.bhash_size)];                          head = &tcp_hashinfo.bhash[inet_bhashfn(port, tcp_hashinfo.bhash_size)];
# Line 1298  Source code for this patch is "apt-get i Line 1298  Source code for this patch is "apt-get i
1298                                                  ((result - sysctl_local_port_range[0]) &                                                  ((result - sysctl_local_port_range[0]) &
1299                                                   (UDP_HTABLE_SIZE - 1));                                                   (UDP_HTABLE_SIZE - 1));
1300  +                               /***** SAKURA Linux start. *****/  +                               /***** SAKURA Linux start. *****/
1301  +                               if (ccs_may_autobind(result))  +                               if (ccs_lport_reserved(result))
1302  +                                       continue;  +                                       continue;
1303  +                               /***** SAKURA Linux end. *****/  +                               /***** SAKURA Linux end. *****/
1304                                  goto gotit;                                  goto gotit;
# Line 1309  Source code for this patch is "apt-get i Line 1309  Source code for this patch is "apt-get i
1309                                          + ((result - sysctl_local_port_range[0]) &                                          + ((result - sysctl_local_port_range[0]) &
1310                                             (UDP_HTABLE_SIZE - 1));                                             (UDP_HTABLE_SIZE - 1));
1311  +                       /***** SAKURA Linux start. *****/  +                       /***** SAKURA Linux start. *****/
1312  +                       if (ccs_may_autobind(result))  +                       if (ccs_lport_reserved(result))
1313  +                               continue;  +                               continue;
1314  +                       /***** SAKURA Linux end. *****/  +                       /***** SAKURA Linux end. *****/
1315                          if (!udp_lport_inuse(result))                          if (!udp_lport_inuse(result))
# Line 1332  Source code for this patch is "apt-get i Line 1332  Source code for this patch is "apt-get i
1332                          head = &tcp_hashinfo.bhash[inet_bhashfn(rover, tcp_hashinfo.bhash_size)];                          head = &tcp_hashinfo.bhash[inet_bhashfn(rover, tcp_hashinfo.bhash_size)];
1333                          spin_lock(&head->lock);                          spin_lock(&head->lock);
1334  +                       /***** SAKURA Linux start. *****/  +                       /***** SAKURA Linux start. *****/
1335  +                       if (ccs_may_autobind(rover))  +                       if (ccs_lport_reserved(rover))
1336  +                               goto next;  +                               goto next;
1337  +                       /***** SAKURA Linux end. *****/  +                       /***** SAKURA Linux end. *****/
1338                          inet_bind_bucket_for_each(tb, node, &head->chain)                          inet_bind_bucket_for_each(tb, node, &head->chain)
# Line 1343  Source code for this patch is "apt-get i Line 1343  Source code for this patch is "apt-get i
1343                  for (i = 1; i <= range; i++) {                  for (i = 1; i <= range; i++) {
1344                          port = low + (i + offset) % range;                          port = low + (i + offset) % range;
1345  +                       /***** SAKURA Linux start. *****/  +                       /***** SAKURA Linux start. *****/
1346  +                       if (ccs_may_autobind(port))  +                       if (ccs_lport_reserved(port))
1347  +                               continue;  +                               continue;
1348  +                       /***** SAKURA Linux end. *****/  +                       /***** SAKURA Linux end. *****/
1349                          head = &tcp_hashinfo.bhash[inet_bhashfn(port, tcp_hashinfo.bhash_size)];                          head = &tcp_hashinfo.bhash[inet_bhashfn(port, tcp_hashinfo.bhash_size)];
# Line 1366  Source code for this patch is "apt-get i Line 1366  Source code for this patch is "apt-get i
1366                                                  ((result - sysctl_local_port_range[0]) &                                                  ((result - sysctl_local_port_range[0]) &
1367                                                   (UDP_HTABLE_SIZE - 1));                                                   (UDP_HTABLE_SIZE - 1));
1368  +                               /***** SAKURA Linux start. *****/  +                               /***** SAKURA Linux start. *****/
1369  +                               if (ccs_may_autobind(result))  +                               if (ccs_lport_reserved(result))
1370  +                                       continue;  +                                       continue;
1371  +                               /***** SAKURA Linux end. *****/  +                               /***** SAKURA Linux end. *****/
1372                                  goto gotit;                                  goto gotit;
# Line 1377  Source code for this patch is "apt-get i Line 1377  Source code for this patch is "apt-get i
1377                                          + ((result - sysctl_local_port_range[0]) &                                          + ((result - sysctl_local_port_range[0]) &
1378                                             (UDP_HTABLE_SIZE - 1));                                             (UDP_HTABLE_SIZE - 1));
1379  +                       /***** SAKURA Linux start. *****/  +                       /***** SAKURA Linux start. *****/
1380  +                       if (ccs_may_autobind(result))  +                       if (ccs_lport_reserved(result))
1381  +                               continue;  +                               continue;
1382  +                       /***** SAKURA Linux end. *****/  +                       /***** SAKURA Linux end. *****/
1383                          if (!udp_lport_inuse(result))                          if (!udp_lport_inuse(result))

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