Hello community,
here is the log from the commit of package zmd
checked in at Fri Apr 21 13:01:04 CEST 2006.
--------
--- zmd/zmd.changes 2006-04-20 21:47:22.000000000 +0200
+++ STABLE/zmd/zmd.changes 2006-04-21 11:26:09.000000000 +0200
@@ -1,0 +2,5 @@
+Fri Apr 21 11:24:30 CEST 2006 - aj@suse.de
+
+- Fix 156995 - patch by Tambet Ingo.
+
+-------------------------------------------------------------------
New:
----
bug156995.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ zmd.spec ++++++
--- /var/tmp/diff_new_pack.gBZk8d/_old 2006-04-21 13:00:00.000000000 +0200
+++ /var/tmp/diff_new_pack.gBZk8d/_new 2006-04-21 13:00:00.000000000 +0200
@@ -14,15 +14,13 @@
BuildRequires: dbus-1-mono log4net mono-basic mono-data-sqlite mono-devel perl-XML-Parser rpm-devel sqlite-devel
URL: http://www.novell.com
Version: 7.1.1.0
-Release: 13
+Release: 15
License: LGPL
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source0: %{name}-%{version}.tar.bz2
Patch0: %{name}-makefile-docdir.patch
Patch1: verified-certs.patch
-#Patch2: remote-enabled-false.patch
-#Patch3: zmd.conf-path-in-manpage.patch
-#Patch4: bla-bla.patch
+Patch2: bug156995.patch
Summary: Novell ZENworks Linux Management daemon
Group: System/Daemons
Autoreqprov: on
@@ -66,9 +64,7 @@
%setup -q -n %{name}-%{version}
%patch0
%patch1
-# %patch2
-# %patch3
-# %patch4
+%patch2 -p1
%build
libtoolize -f
@@ -156,6 +152,8 @@
# %{_libdir}/monodoc/sources/*
%changelog -n zmd
+* Fri Apr 21 2006 - aj@suse.de
+- Fix 156995 - patch by Tambet Ingo.
* Thu Apr 20 2006 - maw@suse.de
- New source drop (r27263) which:
- Restarts if we install patches that have RestartRequired set
++++++ bug156995.patch ++++++
Index: zmd/src/ChangeLog
===================================================================
--- zmd/src/ChangeLog (revision 27338)
+++ zmd/src/ChangeLog (working copy)
@@ -1,3 +1,15 @@
+2006-04-21 Tambet Ingo
+
+ * Prefs.cs: Make sure config file is readable by root only.
+ Fixes #168025 (partially?).
+
+ * ServiceManager.cs: Start listening for
+ NetworkStatus.NetworkStatusChanged events after the services are
+ loaded. Otherwise, there's a race condition in the startup that removes
+ all existing services - if the network is connected at zmd's startup
+ but before initial services are loaded, we rewrite saved services with
+ an empty list. Fixes #156995.
+
2006-04-13 Dan Mills
* BuildConfig.cs.in: Add the initial-configuration file.
Index: zmd/src/ServiceManager.cs
===================================================================
--- zmd/src/ServiceManager.cs (revision 27338)
+++ zmd/src/ServiceManager.cs (working copy)
@@ -44,6 +44,7 @@
private static readonly string ServicesFile = BuildConfig.LOCALSTATEDIR + "/lib/zmd/services";
private static Hashtable map;
+ private static bool servicesLoaded = false;
private static ArrayList services; // the current list of mounted services
private static Hashtable busyServices; // hash of services that are currently busy (mount or refresh)
@@ -91,33 +92,11 @@
services = new ArrayList ();
disconnServices = new ArrayList ();
disconnExisting = new ArrayList ();
-
- NetworkStatus.NetworkStatusChanged += OnNetworkStatusChanged;
}
private ServiceManager () {
}
- private static void OnNetworkStatusChanged (object o, EventArgs args) {
- if (!NetworkStatus.IsNetworkConnected)
- return;
-
- lock (disconnExisting) {
- foreach (ServiceInfo info in disconnExisting) {
- MountExistingService (info);
- }
-
- disconnExisting.Clear ();
- Save ();
- }
-
- lock (disconnServices) {
- foreach (Service service in disconnServices) {
- Refresh (service);
- }
- }
- }
-
private static void CreateRefreshSchedule () {
RefreshSchedule sched = new RefreshSchedule (GettextCatalog.GetString ("Service Refresh"));
sched.RecurrenceType = RecurrenceType.Custom;
@@ -141,10 +120,36 @@
}
public static Progress MountExisting () {
+ if (servicesLoaded)
+ throw new ZenException (GettextCatalog.GetString ("Initial services are already loaded."));
+
LoadExistingServices ();
+ NetworkStatus.NetworkStatusChanged += OnNetworkStatusChanged;
+ servicesLoaded = true;
+
return refreshProgress;
}
-
+
+ private static void OnNetworkStatusChanged (object o, EventArgs args) {
+ if (!NetworkStatus.IsNetworkConnected)
+ return;
+
+ lock (disconnExisting) {
+ foreach (ServiceInfo info in disconnExisting) {
+ MountExistingService (info);
+ }
+
+ disconnExisting.Clear ();
+ Save ();
+ }
+
+ lock (disconnServices) {
+ foreach (Service service in disconnServices) {
+ Refresh (service);
+ }
+ }
+ }
+
private static void RefreshIntervalChanged (object o, EventArgs args) {
CreateRefreshSchedule ();
}
Index: zmd/src/Prefs.cs
===================================================================
--- zmd/src/Prefs.cs (revision 27338)
+++ zmd/src/Prefs.cs (working copy)
@@ -30,6 +30,8 @@
using Novell.Zenworks.Utility;
using log4net;
using log4net.Core;
+using FilePermissions = Mono.Unix.Native.FilePermissions;
+using Syscall = Mono.Unix.Native.Syscall;
namespace Novell.Zenworks.Zmd {
@@ -40,6 +42,7 @@
private ConfigEngine config_engine;
public Prefs () {
+ Syscall.chmod (BuildConfig.CONFIG_FILE, FilePermissions.S_IRUSR | FilePermissions.S_IWUSR);
config_engine = new ConfigEngine (BuildConfig.CONFIG_FILE);
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...