You are not logged in.

#1 2012-11-28 20:11:59

doman18
Member
Registered: 2012-11-03
Posts: 9

Netcfg creates profile files with no protection

I use wifi-menu for conecting via wifi. In /etc/network.d/ there are profile files. The problem is that netcfg creates files with wifi password in plain text and those files have 644 permissions by default. Is there any way to force netcfg to create those files with 600 permissions?

//PS
... and shouldnt be this reported for netcfg devs as security hole?

Last edited by doman18 (2012-11-28 20:14:22)

Offline

#2 2012-11-28 20:24:40

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Netcfg creates profile files with no protection

Submit a feature request in the bugtracker.

Offline

#3 2012-11-29 01:31:15

Czarcasmo
Member
From: Colorado Springs, Colorado
Registered: 2011-04-20
Posts: 82

Re: Netcfg creates profile files with no protection

doman,

You could set a umask so that all files created in that directory have 600 permission by default.

Cheers,
Czar.


Laptop: Lenovo X1 Carbon, Core i7 2.0Ghz, 8GB RAM, Gnome 3.16

Offline

#4 2012-11-29 10:09:30

doman18
Member
Registered: 2012-11-03
Posts: 9

Re: Netcfg creates profile files with no protection

I tried initially with umask and it seems work. So i would have to set it in login script. However umask works globally so I will change only perms for "others". Im trying now to add "group" rule only for network.d with setfacl...

setfacl -m g::0 /etc/network.d/

or

setfacl -m g::-r /etc/network.d/

... but i doesnt work and i dont have a clue why.
Ok, i forgot to add -d option as for new files, not the one we already have in folder.

Problem solved

Last edited by doman18 (2012-11-29 10:27:09)

Offline

#5 2012-11-29 18:11:22

Leonid.I
Member
From: Aethyr
Registered: 2009-03-22
Posts: 999

Re: Netcfg creates profile files with no protection

doman18 wrote:

I use wifi-menu for conecting via wifi. In /etc/network.d/ there are profile files. The problem is that netcfg creates files with wifi password in plain text and those files have 644 permissions by default. Is there any way to force netcfg to create those files with 600 permissions?

//PS
... and shouldnt be this reported for netcfg devs as security hole?

EDIT: Never mind -- I misread the OP hmm

Have you tried aliasing wifi-menu to something like "umask 0077 && wifi-menu && umask 0022"? Also, netcfg is just not built for interactivity (wifi-menu requires sudo/root and is a bad idea IMHO from the start). So if you need to connect dynamically, you should use wicd/NM both of which employ a client-server architecture.

Last edited by Leonid.I (2012-11-29 19:10:17)


Arch Linux is more than just GNU/Linux -- it's an adventure
pkill -9 systemd

Offline

#6 2012-11-29 21:39:44

Czarcasmo
Member
From: Colorado Springs, Colorado
Registered: 2011-04-20
Posts: 82

Re: Netcfg creates profile files with no protection

doman18 wrote:

Problem solved

Glad you got it working!

Cheers,
Czar.


Laptop: Lenovo X1 Carbon, Core i7 2.0Ghz, 8GB RAM, Gnome 3.16

Offline

Board footer

Powered by FluxBB