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); |
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. *****/ |
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) |
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)]; |
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; |
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)) |
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)]; |