Hello community,

here is the log from the commit of package yast2-samba-client for 
openSUSE:Factory checked in at 2019-05-10 09:12:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-samba-client (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-samba-client.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-samba-client"

Fri May 10 09:12:37 2019 rev:100 rq:701359 version:4.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-samba-client/yast2-samba-client.changes    
2019-04-08 10:34:35.627223076 +0200
+++ 
/work/SRC/openSUSE:Factory/.yast2-samba-client.new.5148/yast2-samba-client.changes
  2019-05-10 09:12:45.547542199 +0200
@@ -1,0 +2,6 @@
+Thu Apr 25 18:45:43 UTC 2019 - David Mulder <dmul...@suse.com>
+
+- Stop using deprecated idmap options; (jsc#SLE-5632); (jsc#SLE-6283);
+- 4.2.1
+
+-------------------------------------------------------------------
@@ -5,0 +12,2 @@
+-------------------------------------------------------------------
+Thu Apr 04 19:00:44 UTC 2019 - David Mulder <dmul...@suse.com>
@@ -6,0 +15,3 @@
+- Fix join fails with 'Failed to join domain: Invalid configuration';
+  (bsc#1131607).
+- 4.1.2

Old:
----
  yast2-samba-client-4.2.0.tar.bz2

New:
----
  yast2-samba-client-4.2.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-samba-client.spec ++++++
--- /var/tmp/diff_new_pack.h5jIPh/_old  2019-05-10 09:12:47.811548663 +0200
+++ /var/tmp/diff_new_pack.h5jIPh/_new  2019-05-10 09:12:47.851548777 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-samba-client
-Version:        4.2.0
+Version:        4.2.1
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-samba-client-4.2.0.tar.bz2 -> yast2-samba-client-4.2.1.tar.bz2 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-samba-client-4.2.0/package/yast2-samba-client.changes 
new/yast2-samba-client-4.2.1/package/yast2-samba-client.changes
--- old/yast2-samba-client-4.2.0/package/yast2-samba-client.changes     
2019-04-05 10:36:24.000000000 +0200
+++ new/yast2-samba-client-4.2.1/package/yast2-samba-client.changes     
2019-05-06 18:29:21.000000000 +0200
@@ -1,9 +1,20 @@
 -------------------------------------------------------------------
+Thu Apr 25 18:45:43 UTC 2019 - David Mulder <dmul...@suse.com>
+
+- Stop using deprecated idmap options; (jsc#SLE-5632); (jsc#SLE-6283);
+- 4.2.1
+
+-------------------------------------------------------------------
 Fri Apr  5 08:24:37 UTC 2019 - jreidinger <jreidin...@suse.com>
 
 - Replace YaPI calls (fate#323734)
 - 4.2.0
+-------------------------------------------------------------------
+Thu Apr 04 19:00:44 UTC 2019 - David Mulder <dmul...@suse.com>
 
+- Fix join fails with 'Failed to join domain: Invalid configuration';
+  (bsc#1131607).
+- 4.1.2
 -------------------------------------------------------------------
 Tue Feb  5 20:12:18 UTC 2019 - David Mulder <dmul...@suse.com>
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-samba-client-4.2.0/package/yast2-samba-client.spec 
new/yast2-samba-client-4.2.1/package/yast2-samba-client.spec
--- old/yast2-samba-client-4.2.0/package/yast2-samba-client.spec        
2019-04-05 10:36:24.000000000 +0200
+++ new/yast2-samba-client-4.2.1/package/yast2-samba-client.spec        
2019-05-06 18:29:21.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-samba-client
-Version:        4.2.0
+Version:        4.2.1
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-samba-client-4.2.0/src/clients/samba-client.rb 
new/yast2-samba-client-4.2.1/src/clients/samba-client.rb
--- old/yast2-samba-client-4.2.0/src/clients/samba-client.rb    2019-04-05 
10:36:24.000000000 +0200
+++ new/yast2-samba-client-4.2.1/src/clients/samba-client.rb    2019-05-06 
18:29:21.000000000 +0200
@@ -190,10 +190,11 @@
       # read AD settings, so the write command does not fallback to non-AD 
default
       #(bnc#845878)
       domain    = Samba.GetWorkgroupOrRealm
+      workgroup = Samba.GetWorkgroup
       SambaAD.ReadADS(domain)
       SambaAD.ReadRealm
 
-      Samba.SetWinbind(command == "enable")
+      Samba.SetWinbind(command == "enable", workgroup)
     end
 
     # Check domain membership.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-samba-client-4.2.0/src/include/samba-client/dialogs.rb 
new/yast2-samba-client-4.2.1/src/include/samba-client/dialogs.rb
--- old/yast2-samba-client-4.2.0/src/include/samba-client/dialogs.rb    
2019-04-05 10:36:24.000000000 +0200
+++ new/yast2-samba-client-4.2.1/src/include/samba-client/dialogs.rb    
2019-05-06 18:29:21.000000000 +0200
@@ -149,20 +149,23 @@
     end
 
     # dialog for setting expert settings, like winbind uid/gid keys (F301518)
-    def ExpertSettingsDialog(use_winbind)
-      winbind_uid = SambaConfig.GlobalGetStr("winbind uid", "10000-20000")
-      l = Builtins.splitstring(winbind_uid, "-")
-      uid_min = Builtins.tointeger(Ops.get_string(l, 0, "10000"))
-      uid_min = 10000 if uid_min == nil
-      uid_max = Builtins.tointeger(Ops.get_string(l, 1, "20000"))
-      uid_max = 20000 if uid_max == nil
-
-      winbind_gid = SambaConfig.GlobalGetStr("winbind gid", "10000-20000")
-      l = Builtins.splitstring(winbind_gid, "-")
-      gid_min = Builtins.tointeger(Ops.get_string(l, 0, "10000"))
-      gid_min = 10000 if gid_min == nil
-      gid_max = Builtins.tointeger(Ops.get_string(l, 1, "20000"))
-      gid_max = 20000 if gid_max == nil
+    def ExpertSettingsDialog(use_winbind, workgroup)
+      idmap_default = SambaConfig.GlobalGetStr("idmap config * : range", 
"10000-20000")
+      l = Builtins.splitstring(idmap_default, "-")
+      default_min = Builtins.tointeger(Ops.get_string(l, 0, "10000"))
+      default_min = 10000 if default_min == nil
+      default_max = Builtins.tointeger(Ops.get_string(l, 1, "20000"))
+      default_max = 20000 if default_max == nil
+
+      idmap_domain_backend_setting = Builtins.sformat("idmap config %1 : 
backend", workgroup)
+      idmap_domain_backend = 
SambaConfig.GlobalGetStr(idmap_domain_backend_setting, "rid")
+      idmap_domain_setting = Builtins.sformat("idmap config %1 : range", 
workgroup)
+      idmap_domain = SambaConfig.GlobalGetStr(idmap_domain_setting, 
"20001-99999")
+      l = Builtins.splitstring(idmap_domain, "-")
+      domain_min = Builtins.tointeger(Ops.get_string(l, 0, "20001"))
+      domain_min = 20001 if domain_min == nil
+      domain_max = Builtins.tointeger(Ops.get_string(l, 1, "99999"))
+      domain_max = 99999 if domain_max == nil
       dhcp_support = Samba.GetDHCP
       kerberos_method = SambaConfig.GlobalGetStr("kerberos method", "")
 
@@ -225,6 +228,16 @@
       ) do |method|
         Item(Id(method), method, method == kerberos_method)
       end
+      idmap_domain_backends = Builtins.maplist(
+        [
+          "tdb",
+          "ad",
+          "rid",
+          "autorid"
+        ]
+      ) do |method|
+        Item(Id(method), method, method == idmap_domain_backend)
+      end
 
       contents = HBox(
         HSpacing(3),
@@ -232,23 +245,26 @@
           VSpacing(0.4),
           # frame label
           Frame(
-            _("&UID Range"),
+            _("&Default Range"),
             HBox(
               # int field label
-              IntField(Id(:uid_min), _("&Minimum"), 0, 99999, uid_min),
+              IntField(Id(:default_min), _("&Minimum"), 0, 999999, 
default_min),
               # int field label
-              IntField(Id(:uid_max), _("Ma&ximum"), 0, 99999, uid_max)
+              IntField(Id(:default_max), _("Ma&ximum"), 0, 999999, default_max)
             )
           ),
           VSpacing(0.5),
           # frame label
           Frame(
-            _("&GID Range"),
-            HBox(
+            _("Domain &Range"),
+            VBox(HBox(
               # int field label
-              IntField(Id(:gid_min), _("M&inimum"), 0, 99999, gid_min),
+              IntField(Id(:domain_min), _("M&inimum"), 0, 999999, domain_min),
               # int field label
-              IntField(Id(:gid_max), _("M&aximum"), 0, 99999, gid_max)
+              IntField(Id(:domain_max), _("M&aximum"), 0, 999999, domain_max),
+              ComboBox(Id(:backend), _("Back&end"), idmap_domain_backends),
+            ),
+            RichText("If you're unsure of which backend to choose, please <a 
href=\"https://www.suse.com/support/kb/doc/?id=7007006\";>read kb article 
7007006</a>. For the tdb, ad, rid, and autorid idmap backend details, see the 
idmap_tdb(8), idmap_ad(8), idmap_rid(8) and idmap_autorid(8) man pages. Please 
refer to the smb.conf(5) man page for further options which may need to be 
manually configured. For other idmap backends, see the idmap_tdb2(8), 
idmap_ldap(8), idmap_hash(8), idmap_nss(8) and idmap_rfc2307(8) man pages.")
             )
           ),
           VSpacing(0.2),
@@ -366,12 +382,13 @@
           end
         end
         if ret2 == :ok
-          uid_min = Convert.to_integer(UI.QueryWidget(Id(:uid_min), :Value))
-          uid_max = Convert.to_integer(UI.QueryWidget(Id(:uid_max), :Value))
-          gid_min = Convert.to_integer(UI.QueryWidget(Id(:gid_min), :Value))
-          gid_max = Convert.to_integer(UI.QueryWidget(Id(:gid_max), :Value))
-          if Ops.greater_or_equal(uid_min, uid_max) ||
-              Ops.greater_or_equal(gid_min, gid_max)
+          default_min = Convert.to_integer(UI.QueryWidget(Id(:default_min), 
:Value))
+          default_max = Convert.to_integer(UI.QueryWidget(Id(:default_max), 
:Value))
+          domain_min = Convert.to_integer(UI.QueryWidget(Id(:domain_min), 
:Value))
+          domain_max = Convert.to_integer(UI.QueryWidget(Id(:domain_max), 
:Value))
+          idmap_domain_backend_new = 
Convert.to_string(UI.QueryWidget(Id(:backend), :Value))
+          if Ops.greater_or_equal(default_min, default_max) ||
+              Ops.greater_or_equal(domain_min, domain_max)
             # error popup: min >= max
             Popup.Error(
               _(
@@ -380,13 +397,23 @@
             )
             next
           end
-          winbind_uid_new = Builtins.sformat("%1-%2", uid_min, uid_max)
-          winbind_gid_new = Builtins.sformat("%1-%2", gid_min, gid_max)
-          if winbind_uid_new != winbind_uid
-            SambaConfig.GlobalSetStr("winbind uid", winbind_uid_new)
-          end
-          if winbind_gid_new != winbind_gid
-            SambaConfig.GlobalSetStr("winbind gid", winbind_gid_new)
+          idmap_default_new = Builtins.sformat("%1-%2", default_min, 
default_max)
+          idmap_domain_new = Builtins.sformat("%1-%2", domain_min, domain_max)
+          if idmap_default_new != idmap_default
+            SambaConfig.GlobalSetStr("idmap config * : range", 
idmap_default_new)
+          end
+          if idmap_domain_new != idmap_domain && workgroup != ""
+            idmap_domain_setting = Builtins.sformat("idmap config %1 : range", 
workgroup)
+            SambaConfig.GlobalSetStr(idmap_domain_setting, idmap_domain_new)
+          end
+          if idmap_domain_backend_new != idmap_domain_backend && workgroup != 
""
+            SambaConfig.GlobalSetStr(idmap_domain_backend_setting, 
idmap_domain_backend_new)
+            if idmap_domain_backend_new == "ad"
+              idmap_domain_schema_mode = Builtins.sformat("idmap config %1 : 
schema_mode", workgroup)
+              SambaConfig.GlobalSetStr(idmap_domain_schema_mode, "rfc2307")
+              idmap_domain_unix_nss_info = Builtins.sformat("idmap config %1 : 
unix_nss_info", workgroup)
+              SambaConfig.GlobalSetStr(idmap_domain_unix_nss_info, "yes")
+            end
           end
           Samba.SetDHCP(Convert.to_boolean(UI.QueryWidget(Id(:dhcp), :Value)))
           Samba.SetHostsResolution(
@@ -699,7 +726,11 @@
             )
           end
         elsif ret == :expert
-          ExpertSettingsDialog(use_winbind)
+          workgroup = Convert.to_string(
+            UI.QueryWidget(Id(:workgroup), :Value)
+          )
+          workgroup = SambaAD.GetWorkgroup(workgroup)
+          ExpertSettingsDialog(use_winbind, workgroup)
         elsif ret == :ntp
           if Package.InstallAll(["yast2-ntp-client"])
             workgroup = Convert.to_string(
@@ -719,7 +750,7 @@
             workgroup = Samba.GetWorkgroup
           end
 
-          Samba.SetWinbind(use_winbind)
+          Samba.SetWinbind(use_winbind, workgroup)
 
           if use_winbind
             packages = ["samba-winbind"]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-samba-client-4.2.0/src/modules/Samba.rb 
new/yast2-samba-client-4.2.1/src/modules/Samba.rb
--- old/yast2-samba-client-4.2.0/src/modules/Samba.rb   2019-04-05 
10:36:24.000000000 +0200
+++ new/yast2-samba-client-4.2.1/src/modules/Samba.rb   2019-05-06 
18:29:21.000000000 +0200
@@ -693,13 +693,13 @@
     # Set a windind status
     #
     # @param group     a new winbind status
-    def SetWinbind(status)
+    def SetWinbind(status, workgroup)
       if status != @winbind_enabled
         @modified = true
         @winbind_enabled = status
       end
       SambaAD.AdjustSambaConfig(status)
-      SambaWinbind.AdjustSambaConfig(status)
+      SambaWinbind.AdjustSambaConfig(status, workgroup)
 
       nil
     end
@@ -986,7 +986,8 @@
         "winbind",
         Ops.get_boolean(settings, ["global", "winbind"], false)
       )
-      SetWinbind(winbind) if winbind != nil
+      @workgroup = Ops.get_string(settings, ["global", "workgroup"], "")
+      SetWinbind(winbind, @workgroup) if winbind != nil
 
       SambaConfig.Import(sections) if sections != []
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-samba-client-4.2.0/src/modules/SambaAPI.py 
new/yast2-samba-client-4.2.1/src/modules/SambaAPI.py
--- old/yast2-samba-client-4.2.0/src/modules/SambaAPI.py        2019-04-05 
10:36:24.000000000 +0200
+++ new/yast2-samba-client-4.2.1/src/modules/SambaAPI.py        2019-05-06 
18:29:21.000000000 +0200
@@ -3,12 +3,11 @@
 import_module('Package')
 from yast import PackageSystem, Package
 if not PackageSystem.Installed('samba-python3'):
-    if Package.InstallAll(['samba-python3']):
-        from samba.net import Net
-        from samba.credentials import Credentials
-        from samba.dcerpc import nbt
-    else:
+    if not Package.InstallAll(['samba-python3']):
         raise ImportError("Failed to install samba python bindings 
samba-python3")
+from samba.net import Net
+from samba.credentials import Credentials
+from samba.dcerpc import nbt
 
 # Global response to net.finddc()
 cldap_ret = None
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-samba-client-4.2.0/src/modules/SambaWinbind.pm 
new/yast2-samba-client-4.2.1/src/modules/SambaWinbind.pm
--- old/yast2-samba-client-4.2.0/src/modules/SambaWinbind.pm    2019-04-05 
10:36:24.000000000 +0200
+++ new/yast2-samba-client-4.2.1/src/modules/SambaWinbind.pm    2019-05-06 
18:29:21.000000000 +0200
@@ -51,15 +51,20 @@
 # Change samba configuration file (/etc/samba/smb.conf)
 #
 # @param status a new status
-BEGIN{$TYPEINFO{AdjustSambaConfig}=["function","void","boolean"]}
+BEGIN{$TYPEINFO{AdjustSambaConfig}=["function","void","boolean","string"]}
 sub AdjustSambaConfig {
-    my ($self, $status) = @_;
+    my ($self, $status, $workgroup) = @_;
     if ($status) {
        # if turning on and there is no values set, use default
-       SambaConfig->GlobalUpdateMap({
-           "idmap uid" => "10000-20000",
-           "idmap gid" => "10000-20000"
-       });
+       if (SambaConfig->GlobalGetStr("idmap uid", "") == "" &&
+            SambaConfig->GlobalGetStr("idmap gid", "") == "") {
+            SambaConfig->GlobalUpdateMap({
+                "idmap config * : backend" => "tdb",
+                "idmap config * : range" => "10000-20000",
+                "idmap config $workgroup : backend" => "rid",
+                "idmap config $workgroup : range" => "20001-99999"
+            });
+        }
        SambaConfig->GlobalSetStr ("template shell", "/bin/bash");
     }
     else {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-samba-client-4.2.0/src/scrconf/cfg_smbconf.scr 
new/yast2-samba-client-4.2.1/src/scrconf/cfg_smbconf.scr
--- old/yast2-samba-client-4.2.0/src/scrconf/cfg_smbconf.scr    2019-04-05 
10:36:24.000000000 +0200
+++ new/yast2-samba-client-4.2.1/src/scrconf/cfg_smbconf.scr    2019-05-06 
18:29:21.000000000 +0200
@@ -26,7 +26,7 @@
        // we need to exclude ; because of the second matching rule
        "params" : [
            $[
-               "match" : [ "^[ \t]*([a-z0-9:_ ]*[a-z])[ \t]*=[ \t]*(.*[^ \t])[ 
\t]*$" , "\t%s = %s"],
+               "match" : [ "^[ \t]*([a-z0-9:_ \*]*[a-z])[ \t]*=[ \t]*(.*[^ 
\t])[ \t]*$" , "\t%s = %s"],
            ], $[
                // this is a special type for commenting out the values
 //             "match" : [ "^[;#]+[ \t]*([a-z ]*[a-z])[ \t]*=[ \t]*(.*[^ \t])[ 
\t]*$" , "#\t%s = %s"],


Reply via email to