Details
-
Type: Feature Request
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Fix Version/s: OpenVZ-legacy
-
Component/s: Containers::Kernel
-
Security Level: Public
-
Environment:Operating System: All
Platform: All
URL: http://forum.openvz.org/index.php?t=tree&th=1143&mid=6427&&rev=&reveal=
-
External issue URL:
-
External issue ID:268
Description
information from forum:
2.6.16-026test017
fc4-ve# rpm -qa | grep ppp
ppp-2.4.2-7
16120 open("/dev/ppp", O_RDWR) = -1 EPERM (Operation not permitted)
drivers/net/ppp_generic.c:
...
static int ppp_open(struct inode *inode, struct file *file)
{
/*
* This could (should?) be enforced by the permissions on /dev/ppp.
*/
if (!capable(CAP_NET_ADMIN))
return -EPERM;
return 0;
}
...
CAP_NET_ADMIN -> CAP_VE_NET_ADMIN
Don't forget to load ppp_async module on the node:
[root@dhcp0-174 ~]# modprobe ppp_async
[root@dhcp0-174 ~]# echo $?
0
25784 ioctl(10, PPPIOCNEWUNIT, 0x80083c08) = -1 EPERM (Operation not permitted)
dmesg:
PPP: couldn't register device ppp0 (-1)
source:
ret = register_netdev(dev);
if (ret != 0) {
printk(KERN_ERR "PPP: couldn't register device %s (%d)\n",
dev->name, ret);
goto out2;
}
so register_netdev() failed
|
\|/
|
register_netdevice():
ret = -EPERM;
if (!ve_is_super(get_exec_env()) && ve_is_dev_movable(dev))
goto out;
ppp should be in "movable" list!
tun, loopback, ... already there
2.6.16-026test017
fc4-ve# rpm -qa | grep ppp
ppp-2.4.2-7
16120 open("/dev/ppp", O_RDWR) = -1 EPERM (Operation not permitted)
drivers/net/ppp_generic.c:
...
static int ppp_open(struct inode *inode, struct file *file)
{
/*
* This could (should?) be enforced by the permissions on /dev/ppp.
*/
if (!capable(CAP_NET_ADMIN))
return -EPERM;
return 0;
}
...
CAP_NET_ADMIN -> CAP_VE_NET_ADMIN
Don't forget to load ppp_async module on the node:
[root@dhcp0-174 ~]# modprobe ppp_async
[root@dhcp0-174 ~]# echo $?
0
25784 ioctl(10, PPPIOCNEWUNIT, 0x80083c08) = -1 EPERM (Operation not permitted)
dmesg:
PPP: couldn't register device ppp0 (-1)
source:
ret = register_netdev(dev);
if (ret != 0) {
printk(KERN_ERR "PPP: couldn't register device %s (%d)\n",
dev->name, ret);
goto out2;
}
so register_netdev() failed
|
\|/
|
register_netdevice():
ret = -EPERM;
if (!ve_is_super(get_exec_env()) && ve_is_dev_movable(dev))
goto out;
ppp should be in "movable" list!
tun, loopback, ... already there