Blame SOURCES/sos-bz997101-restrict-wbinfo-collection-to-the-current-domain.patch

6b17e9
commit 10cc09bf4d84d76cbcceccc6f3246bd9f8e9bd93
6b17e9
Author: Bryn M. Reeves <bmr@redhat.com>
6b17e9
Date:   Tue Jul 30 17:42:40 2013 +0100
6b17e9
6b17e9
    Restrict wbinfo collection to the current domain.
6b17e9
    
6b17e9
    The samba module calls the wbinfo command to collect user and
6b17e9
    group information. This by default will search all domains to
6b17e9
    which the host has access. In a large AD environment with a number
6b17e9
    of trusted domains this causes the winbindd process to consume
6b17e9
    excessive CPU and memory resources.
6b17e9
    
6b17e9
    The Samba developers have commented that fixing this would require
6b17e9
    a complete rewrite of the winbind protocol and wbinfo client.
6b17e9
    
6b17e9
    Since listing out the _entire_ set of visible users is unlikely
6b17e9
    to be of any use anyway pass the --domain='.' option to restrict
6b17e9
    the search to the current domain of the system.
6b17e9
    
6b17e9
    Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
6b17e9
6b17e9
diff --git a/sos/plugins/samba.py b/sos/plugins/samba.py
6b17e9
index d4e2fe8..f3a44b7 100644
6b17e9
--- a/sos/plugins/samba.py
6b17e9
+++ b/sos/plugins/samba.py
6b17e9
@@ -23,8 +23,8 @@ class Samba(Plugin):
6b17e9
         self.add_copy_specs([
6b17e9
             "/etc/samba",
6b17e9
             "/var/log/samba/*",])
6b17e9
-        self.add_cmd_output("wbinfo -g")
6b17e9
-        self.add_cmd_output("wbinfo -u")
6b17e9
+        self.add_cmd_output("wbinfo --domain='.' -g")
6b17e9
+        self.add_cmd_output("wbinfo --domain='.' -u")
6b17e9
         self.add_cmd_output("testparm -s -v")
6b17e9
 
6b17e9