lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 14 Aug 2013 08:43:59 -0300
From:	Amador Pahim <amador@...im.org>
To:	Stephen Hemminger <stephen@...workplumber.org>
Cc:	netdev@...r.kernel.org
Subject: Re: Find vlanid with non-root user

Thank you Stephen.

And about to find vlans? Is the same "ip -d link show" the best way?
If yes, any concern in finding interfaces with "@":

# ip -d link show | egrep ":.*@.*:" | cut -d ":" -f 2
 eth1.10-fcoe@...1
 new_vlan@...1
 eth1.new_vlan@...1
 new_vlan2@...1

For now I am using /sys/class/net/*.*, but as you said before, vlan
can be made with any name.

Best.

On Tue, Aug 13, 2013 at 6:46 PM, Stephen Hemminger
<stephen@...workplumber.org> wrote:
> On Tue, 13 Aug 2013 17:46:45 -0300
> Amador Pahim <amador@...im.org> wrote:
>
>> Hello,
>>
>> Is there a way to get vlanid from a vlan interface as a regular user?
>> Default permissions to /proc/net/vlan/ is 600.
>> -rw-------. 1 root root 0 Aug 13 17:23 /proc/net/vlan/eth1.10-fcoe
>
> ip command will work as non-root user and show vlan (with -d)
>
> $ ip -d li show dev eth0vlan
> 13: eth0vlan@...0: <BROADCAST,MULTICAST,M-DOWN> mtu 1500 qdisc noop state DOWN mode DEFAULT
>     link/ether 10:bf:48:84:6f:5a brd ff:ff:ff:ff:ff:ff
>     vlan id 10 <REORDER_HDR>
>
>
>
>> Not sure if deducting vlanid from vlan name is a reasonable way to do so.
>
> No. Vlan can be made with any name.
>
> # ip li add link eth0 name eth0vlan type vlan id 10
>
>> Thank you in advance,.
>>
>> Best Regards,
>



-- 
Pahim
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ