FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 10-07-2010, 06:01 PM
David Lehman
 
Default (take 2) Fix permissions of wepkey file to 0600 (#636099)

On Thu, 2010-10-07 at 17:44 +0200, Radek Vykydal wrote:
> I forgot to fix stage 1 in take 1 of the patch.
> As it may be security issue, and it is well isolated, I'd like
> to pull it in F14 too. Tested to build, I think I'll be able to test
> the functionality too (tomorrow).

If you want it in F14, set the bug to block F14Blocker, along with a
brief case for why your bug should be a blocker. There's a meeting on
Friday to discuss blockers, and a good chance this will qualify for a
"nice to have".

Dave

>
> ---
> loader/net.c | 7 ++++++-
> pyanaconda/network.py | 2 +-
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/loader/net.c b/loader/net.c
> index 1f0c2a9..6992b3b 100644
> --- a/loader/net.c
> +++ b/loader/net.c
> @@ -1521,13 +1521,18 @@ int writeEnabledNetInfo(iface_t *iface) {
>
> fprintf(fp, "KEY1=%s
", iface->wepkey);
>
> -
> if (fclose(fp) == EOF) {
> free(ofile);
> free(nfile);
> return 24;
> }
>
> + if (chmod(ofile, S_IRUSR | S_IWUSR) == -1) {
> + free(ofile);
> + free(nfile);
> + return 26;
> + }
> +
> if (rename(ofile, nfile) == -1) {
> free(ofile);
> free(nfile);
> diff --git a/pyanaconda/network.py b/pyanaconda/network.py
> index 9c77c9d..9c16041 100644
> --- a/pyanaconda/network.py
> +++ b/pyanaconda/network.py
> @@ -278,7 +278,7 @@ class NetworkDevice(IfcfgFile):
> os.write(fd, "KEY1=%s
" % self.wepkey)
> os.close(fd)
>
> - os.chmod(newifcfg, 0644)
> + os.chmod(newifcfg, 0600)
> try:
> os.remove(keyfile)
> except OSError as e:


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 10:29 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org