From thozza at redhat.com Thu May 19 14:48:54 2016 From: thozza at redhat.com (Tomas Hozza) Date: Thu, 19 May 2016 16:48:54 +0200 Subject: [Dnssec-trigger] [PATCH 3/3] Improved text in the panel GUI when insecure mode is forced In-Reply-To: <1463669334-7337-1-git-send-email-thozza@redhat.com> References: <1463669334-7337-1-git-send-email-thozza@redhat.com> Message-ID: <1463669334-7337-4-git-send-email-thozza@redhat.com> Signed-off-by: Tomas Hozza --- panel/attach.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/panel/attach.c b/panel/attach.c index b7419fc..e279f71 100644 --- a/panel/attach.c +++ b/panel/attach.c @@ -507,9 +507,11 @@ void fetch_proberesults(char* buf, size_t len, const char* lf) "results is used, but no queries are made.%s", lf, lf); else if(strstr(p->str, "forced_insecure")) snprintf(pos, left, - "DNS queries are sent to INSECURE servers, because of%s" - "Hotspot Signon. Select Reprobe (from menu) after signon.%s" - "Please, be careful out there.%s", lf, lf, lf); + "DNS queries are being sent to INSECURE servers%s" + "because Hotspot Sign-on mode was selected. Select%s" + "Reprobe (from menu) after sign-on. A red exclamation%s" + "mark in the icon warns you when DNSSEC is disabled.%s", + lf, lf, lf, lf); else if(strstr(p->str, "http_insecure") && strstr(p->str, "insecure_mode")==NULL) snprintf(pos, left, -- 2.5.5 From thozza at redhat.com Thu May 19 14:48:52 2016 From: thozza at redhat.com (Tomas Hozza) Date: Thu, 19 May 2016 16:48:52 +0200 Subject: [Dnssec-trigger] [PATCH 1/3] dnssec-trigger-script: Use ducktaping when restarting NM, instead of checking the sysfs In-Reply-To: <1463669334-7337-1-git-send-email-thozza@redhat.com> References: <1463669334-7337-1-git-send-email-thozza@redhat.com> Message-ID: <1463669334-7337-2-git-send-email-thozza@redhat.com> This did not work with SELinux policy on Fedora Signed-off-by: Tomas Hozza --- dnssec-trigger-script.in | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dnssec-trigger-script.in b/dnssec-trigger-script.in index cf7df97..e9134dd 100644 --- a/dnssec-trigger-script.in +++ b/dnssec-trigger-script.in @@ -540,10 +540,11 @@ class Application: nm_pids = pidof('NetworkManager') for pid in nm_pids: os.kill(pid, signal.SIGHUP) - elif os.path.exists("/sys/fs/cgroup/systemd"): - subprocess.check_call(["systemctl", "--ignore-dependencies", "try-restart", "NetworkManager.service"]) else: - subprocess.check_call(["/etc/init.d/NetworkManager", "restart"]) + try: + subprocess.check_call(["systemctl", "--ignore-dependencies", "try-restart", "NetworkManager.service"], stdout=DEVNULL, stderr=DEVNULL) + except subprocess.CalledProcessError: + subprocess.check_call(["/etc/init.d/NetworkManager", "restart"], stdout=DEVNULL, stderr=DEVNULL) def run_prepare(self): """Prepare for starting dnssec-trigger -- 2.5.5 From thozza at redhat.com Thu May 19 14:48:53 2016 From: thozza at redhat.com (Tomas Hozza) Date: Thu, 19 May 2016 16:48:53 +0200 Subject: [Dnssec-trigger] [PATCH 2/3] dnssec-trigger-script: Silence the calls to chattr In-Reply-To: <1463669334-7337-1-git-send-email-thozza@redhat.com> References: <1463669334-7337-1-git-send-email-thozza@redhat.com> Message-ID: <1463669334-7337-3-git-send-email-thozza@redhat.com> The call may fail e.g. when TMPFS is used on /var/run and produces unnecessary errors Signed-off-by: Tomas Hozza --- dnssec-trigger-script.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dnssec-trigger-script.in b/dnssec-trigger-script.in index e9134dd..5f70580 100644 --- a/dnssec-trigger-script.in +++ b/dnssec-trigger-script.in @@ -525,11 +525,11 @@ class Application: pass def _try_set_immutable(self, path): - subprocess.call(["chattr", "+i", path]) + subprocess.call(["chattr", "+i", path], stdout=DEVNULL, stderr=DEVNULL) def _try_set_mutable(self, path): if os.path.exists(path) and not os.path.islink(path): - subprocess.call(["chattr", "-i", path]) + subprocess.call(["chattr", "-i", path], stdout=DEVNULL, stderr=DEVNULL) def _restart_nm(self): if os.path.exists(self.resolvconf_networkmanager): -- 2.5.5 From thozza at redhat.com Thu May 19 14:48:51 2016 From: thozza at redhat.com (Tomas Hozza) Date: Thu, 19 May 2016 16:48:51 +0200 Subject: [Dnssec-trigger] [PATCH 0/3] Various fixes from Fedora In-Reply-To: References: Message-ID: <1463669334-7337-1-git-send-email-thozza@redhat.com> Hello. I'm sending three patches, which are mostly bugfixes to issues in the Python script found in Fedora. The last patch improves the text in panel GUI. The change was proposed by a technical writer from Red Hat. Please review and let me know if you have any questions. Tomas Hozza (3): dnssec-trigger-script: Use ducktaping when restarting NM, instead of checking the sysfs dnssec-trigger-script: Silence the calls to chattr Improved text in the panel GUI when insecure mode is forced dnssec-trigger-script.in | 11 ++++++----- panel/attach.c | 8 +++++--- 2 files changed, 11 insertions(+), 8 deletions(-) -- 2.5.5