From f07d79cd65317bc7ab50c0637fe3b753feda35b5 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 16 Jul 2016 10:57:26 +0200 Subject: [PATCH] Drop d/p/0009-fix-favorites-permissions.patch, merged upstream --- debian/changelog | 3 +- .../0009-fix-favorites-permissions.patch | 69 ------------------- debian/patches/series | 1 - 3 files changed, 2 insertions(+), 71 deletions(-) delete mode 100644 debian/patches/0009-fix-favorites-permissions.patch diff --git a/debian/changelog b/debian/changelog index 8db4090..1bdd65c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,8 +11,9 @@ nut (2.7.3-1) UNRELEASED; urgency=low [ Laurent Bigonville ] * debian/gbp.conf: Switch back the branch to the "debian" one + * Drop d/p/0009-fix-favorites-permissions.patch, merged upstream - -- Laurent Bigonville Sat, 16 Jul 2016 10:52:14 +0200 + -- Laurent Bigonville Sat, 16 Jul 2016 10:56:38 +0200 nut (2.7.2-4) unstable; urgency=medium diff --git a/debian/patches/0009-fix-favorites-permissions.patch b/debian/patches/0009-fix-favorites-permissions.patch deleted file mode 100644 index 7128250..0000000 --- a/debian/patches/0009-fix-favorites-permissions.patch +++ /dev/null @@ -1,69 +0,0 @@ -If a ~/.nut-monitor directory is found with insecure permissions, change them to 0700. ---- a/scripts/python/app/NUT-Monitor -+++ b/scripts/python/app/NUT-Monitor -@@ -29,6 +29,7 @@ - import sys - import base64 - import os, os.path -+import stat - import platform - import time - import threading -@@ -44,21 +45,23 @@ - - class interface : - -- __widgets = {} -- __callbacks = {} -- __favorites = {} -- __favorites_file = None -- __favorites_path = "" -- __fav_menu_items = list() -- __window_visible = True -- __glade_file = None -- __connected = False -- __ups_handler = None -- __ups_commands = None -- __ups_vars = None -- __ups_rw_vars = None -- __gui_thread = None -- __current_ups = None -+ DESIRED_FAVORITES_DIRECTORY_MODE = 0700 -+ -+ __widgets = {} -+ __callbacks = {} -+ __favorites = {} -+ __favorites_file = None -+ __favorites_path = "" -+ __fav_menu_items = list() -+ __window_visible = True -+ __glade_file = None -+ __connected = False -+ __ups_handler = None -+ __ups_commands = None -+ __ups_vars = None -+ __ups_rw_vars = None -+ __gui_thread = None -+ __current_ups = None - - def __init__( self ) : - -@@ -528,6 +531,9 @@ - return - - try : -+ if ( not stat.S_IMODE( os.stat( self.__favorites_path ).st_mode ) == self.DESIRED_FAVORITES_DIRECTORY_MODE ) : # unsafe pre-1.2 directory found -+ os.chmod( self.__favorites_path, self.DESIRED_FAVORITES_DIRECTORY_MODE ) -+ - conf = ConfigParser.ConfigParser() - conf.read( self.__favorites_file ) - for current in conf.sections() : -@@ -573,7 +579,7 @@ - # If path does not exists, try to create it - if ( not os.path.exists( self.__favorites_file ) ) : - try : -- os.makedirs( self.__favorites_path, mode=0700 ) -+ os.makedirs( self.__favorites_path, mode=self.DESIRED_FAVORITES_DIRECTORY_MODE ) - except : - self.gui_status_message( _("Error while creating configuration folder (%s)") % sys.exc_info()[1] ) - diff --git a/debian/patches/series b/debian/patches/series index 984c24b..14e0996 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -3,4 +3,3 @@ 0004-fix-systemd-service.patch 0006-ups-conf-maxretry.patch 0008-drop-w3c-icons.patch -0009-fix-favorites-permissions.patch