[SCM] Samba Shared Repository - branch master updated

David Disseldorp ddiss at samba.org
Sun Aug 31 15:48:05 MDT 2014


The branch, master has been updated
       via  bfdc874 Various updates to the pidl README file.
       via  6824f1a Remove trailing whitespace.
       via  b122971 samba.netcmd.domain: desactivating -> deactivating.
       via  daaddc4 samba.netcmd.domain: Fix incorrect variable names, causing NameErrors.
       via  3b04d16 samba.netcmd.domain: Remove unused import.
       via  fdbd6ef samba.netcmd.domain: Just catch ImportError, not any parsing errors in cmd_domain_export_keytab.
       via  2440845 Look for system setproctitle before trying -lbsd.
       via  3c28ccc replace: remove tabs.
       via  2c3203f replace: remove unused and duplicate imports.
       via  3f04ec3 Remove mention of compatibility with Python 2.4.
       via  d86f38b find_unused_macros: Remove obsolete script that finds unused macros.
       via  b972482 source4: Remove script to find unused makefile variables.
      from  f8ec0f9 s3-winbindd: Document parameters in ads_cached_connection_reuse

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit bfdc874e8b98c8ea147dbcc986f96ad4f73d800f
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Aug 30 01:59:26 2014 +0200

    Various updates to the pidl README file.
    
    Remove samba3/samba4-specific comments, add comments about backends and files.
    
    Change-Id: Id2253ce85eab7a684b2c50d25f6f2604dc146a8e
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>
    
    Autobuild-User(master): David Disseldorp <ddiss at samba.org>
    Autobuild-Date(master): Sun Aug 31 23:47:49 CEST 2014 on sn-devel-104

commit 6824f1aa67f0a75df5c94921e334c2b7c7771611
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Aug 30 01:59:25 2014 +0200

    Remove trailing whitespace.
    
    Change-Id: I1e0948da34bac278edc62cd63dedd08112426e7a
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit b1229715eec2c846edd828fa734f9becc5212367
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Aug 30 01:57:29 2014 +0200

    samba.netcmd.domain: desactivating -> deactivating.
    
    Change-Id: I463823589049e81bcd4032f3e7bc6b5f2fb0d28d
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit daaddc4c1d6c70dedad042be08e03fbd11db105c
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Aug 30 01:57:28 2014 +0200

    samba.netcmd.domain: Fix incorrect variable names, causing NameErrors.
    
    Change-Id: I1c78f07f942a8b03ac88de98b18ac636b7124e22
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit 3b04d16d6b521a0ef266c72b0e7a346a75de0059
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Aug 30 01:57:27 2014 +0200

    samba.netcmd.domain: Remove unused import.
    
    Change-Id: I33f3ba55540be01fd15bfc3d75ebb73cbf5ead9e
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit fdbd6efa13ee058487c5062b59176e48190889ef
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Aug 30 01:57:26 2014 +0200

    samba.netcmd.domain: Just catch ImportError, not any parsing errors in cmd_domain_export_keytab.
    
    Change-Id: If5710565c74e87fe218a83f31cddcf64605e522e
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit 2440845acebff3a59ebb54d0ef8cdab39bf71962
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Aug 30 01:54:44 2014 +0200

    Look for system setproctitle before trying -lbsd.
    
    Change-Id: I390c186d7c1400287c6a18909a5d6587f2052243
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit 3c28ccc5f1a6f1a33e0cd562fe6a869367149d72
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Aug 30 01:54:43 2014 +0200

    replace: remove tabs.
    
    Change-Id: Ie87f3c8a60f6292b7d2302425c946f5befaf5fcc
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit 2c3203f1708e2f1c1ff9042bc7c4f52e8fefbd37
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Aug 30 01:54:42 2014 +0200

    replace: remove unused and duplicate imports.
    
    Change-Id: I6cfd2cf80efe19fa31bcd6b3881a1eb01f05d1b4
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit 3f04ec3f1cb86fc964c0ab88b2fad400e71dbe5f
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Aug 30 01:50:37 2014 +0200

    Remove mention of compatibility with Python 2.4.
    
    Change-Id: I1f900e550f4fbed9d7b3ffdbf30aa5b54e799331
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit d86f38bef32f7446fcaab1268e7e590a836d44bb
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Aug 30 01:50:36 2014 +0200

    find_unused_macros: Remove obsolete script that finds unused macros.
    
    There are various static checkers that can do this nowadays, with
    better accuracy.
    
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

commit b97248297c332aa15c9d30393ee498782241259e
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Sat Aug 30 01:50:35 2014 +0200

    source4: Remove script to find unused makefile variables.
    
    Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
    Reviewed-by: David Disseldorp <ddiss at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 README.Coding                              |    3 --
 lib/replace/wscript                        |   16 ++++----
 pidl/README                                |   35 +++++++++---------
 python/samba/netcmd/domain.py              |   16 ++++----
 source4/script/find_unused_macros.pl       |   38 -------------------
 source4/script/find_unused_makefilevars.pl |   55 ----------------------------
 6 files changed, 34 insertions(+), 129 deletions(-)
 delete mode 100755 source4/script/find_unused_macros.pl
 delete mode 100755 source4/script/find_unused_makefilevars.pl


Changeset truncated at 500 lines:

diff --git a/README.Coding b/README.Coding
index 107856e..0bbba9f 100644
--- a/README.Coding
+++ b/README.Coding
@@ -26,9 +26,6 @@ http://www.python.org/pep/pep8 (with spaces).
 If you have ever worked on another free software Python project, you are
 probably already familiar with it.
 
-We try to stay compatible with Python 2.4, so please don't rely on any
-features that were introduced later, such as the "with" statement.
-
 But to save you the trouble of reading the Linux kernel style guide, here
 are the highlights.
 
diff --git a/lib/replace/wscript b/lib/replace/wscript
index a7384e8..6f2fb66 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -5,7 +5,7 @@ VERSION = '1.2.1'
 
 blddir = 'bin'
 
-import sys, os, Utils
+import sys, os
 
 # find the buildtools directory
 srcdir = '.'
@@ -14,7 +14,7 @@ while not os.path.exists(srcdir+'/buildtools') and len(srcdir.split('/')) < 5:
 sys.path.insert(0, srcdir + '/buildtools/wafsamba')
 
 import wafsamba, samba_dist
-import Options, os, preproc
+import Options
 
 samba_dist.DIST_DIRS('lib/replace buildtools:buildtools')
 
@@ -59,10 +59,10 @@ struct foo bar = { .y = 'X', .x = 1 };
 
     # Try to find the right extra flags for -Werror behaviour
     for f in ["-Werror",       # GCC
-	      "-errwarn=%all", # Sun Studio
-	      "-qhalt=w",     # IBM xlc
-	      "-w2",           # Tru64
-	      ]:
+              "-errwarn=%all", # Sun Studio
+              "-qhalt=w",     # IBM xlc
+              "-w2",           # Tru64
+             ]:
         if conf.CHECK_CFLAGS([f], '''
 '''):
             if not 'WERROR_CFLAGS' in conf.env:
@@ -288,8 +288,8 @@ struct foo bar = { .y = 'X', .x = 1 };
                 checklibc=True)
     if not conf.CHECK_FUNCS('getpeereid'):
         conf.CHECK_FUNCS_IN('getpeereid', 'bsd', headers='sys/types.h bsd/unistd.h')
-    if not conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h'):
-        conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h')
+    if not conf.CHECK_FUNCS_IN('setproctitle', 'setproctitle', headers='setproctitle.h'):
+        conf.CHECK_FUNCS_IN('setproctitle', 'bsd', headers='sys/types.h bsd/unistd.h')
 
     conf.CHECK_CODE('''
                 struct ucred cred;
diff --git a/pidl/README b/pidl/README
index c6b7e11..240a07a 100644
--- a/pidl/README
+++ b/pidl/README
@@ -1,31 +1,31 @@
 Introduction:
 =============
-This directory contains the source code of the pidl (Perl IDL) 
-compiler for Samba 4. 
+This directory contains the source code of the pidl (Perl IDL)
+compiler for Samba 4.
 
 The main sources for pidl are available using Git as part of
-the combined Samba 3 / Samba 4 tree. Use:
+the Samba source tree. Use:
 git clone git://git.samba.org/samba.git
 
-Pidl works by building a parse tree from a .pidl file (a simple 
-dump of it's internal parse tree) or a .idl file 
-(a file format mostly like the IDL file format midl uses). 
-The IDL file parser is in idl.yp (a yacc file converted to 
+Pidl works by building a parse tree from a .pidl file (a simple
+dump of it's internal parse tree) or a .idl file
+(a file format mostly like the IDL file format midl uses).
+The IDL file parser is in idl.yp (a yacc file converted to
 perl code by yapp)
 
-After a parse tree is present, pidl will call one of it's backends 
-(which one depends on the options given on the command-line). Here is 
-a list of current backends:
-
 Standalone installation:
 ========================
-Run Makefile.PL to generate the Makefile. 
+Run Makefile.PL to generate the Makefile.
 
 Then run "make install" (as root) to install.
 
 Internals overview:
 ===================
 
+After a parse tree is present, pidl will call one of it's backends
+(which one depends on the options given on the command-line). Here is
+a list of current backends:
+
 -- Generic --
 Parse::Pidl::Dump - Converts the parse tree back to an IDL file
 Parse::Pidl::Samba4::Header - Generates header file with data structures defined in IDL file
@@ -55,9 +55,10 @@ Parse::Pidl::Util - Misc utility functions used by *.pm and pidl.pl
 Parse::Pidl::Typelist - Utility functions for keeping track of known types and their representation in C
 
 Tips for hacking on pidl:
- - Look at the pidl's parse tree by using the --keep option and looking 
-   at the generated .pidl file. 
- - The various backends have a lot in common, if you don't understand how one 
-   implements something, look at the others
+ - Inspect pidl's parse tree by using the --keep option and looking at the
+   generated .pidl file.
+ - The various backends have a lot in common, if you don't understand how one
+   implements something, look at the others.
  - See pidl(1) and the documentation on midl
- - See 'info bison' and yapp(1) for information on the file format of idl.yp 
+ - See 'info bison' and yapp(1) for information on the file format of idl.yp
+ - Run the tests (all in tests/)
diff --git a/python/samba/netcmd/domain.py b/python/samba/netcmd/domain.py
index 2e7a9c7..9e9b30d 100644
--- a/python/samba/netcmd/domain.py
+++ b/python/samba/netcmd/domain.py
@@ -64,7 +64,6 @@ from samba.dsdb import (
     UF_TRUSTED_FOR_DELEGATION
     )
 
-from samba.credentials import DONT_USE_KERBEROS
 from samba.provision import (
     provision,
     ProvisioningError
@@ -83,6 +82,9 @@ def get_testparm_var(testparm, smbconf, varname):
 
 try:
    import samba.dckeytab
+except ImportError:
+   cmd_domain_export_keytab = None
+else:
    class cmd_domain_export_keytab(Command):
        """Dump Kerberos keys of the domain into a keytab."""
 
@@ -104,8 +106,6 @@ try:
            lp = sambaopts.get_loadparm()
            net = Net(None, lp)
            net.export_keytab(keytab=keytab, principal=principal)
-except:
-   cmd_domain_export_keytab = None
 
 
 class cmd_domain_info(Command):
@@ -398,13 +398,13 @@ class cmd_domain_provision(Command):
         if eadb:
             self.logger.info("not using extended attributes to store ACLs and other metadata. If you intend to use this provision in production, rerun the script as root on a system supporting xattrs.")
         if ldap_backend_type == "existing":
-            if dap_backend_forced_uri is not None:
-                logger.warn("You have specified to use an existing LDAP server as the backend, please make sure an LDAP server is running at %s" % ldap_backend_forced_uri)
+            if ldap_backend_forced_uri is not None:
+                self.logger.warn("You have specified to use an existing LDAP server as the backend, please make sure an LDAP server is running at %s" % ldap_backend_forced_uri)
             else:
-                logger.info("You have specified to use an existing LDAP server as the backend, please make sure an LDAP server is running at the default location")
+                self.logger.info("You have specified to use an existing LDAP server as the backend, please make sure an LDAP server is running at the default location")
         else:
             if ldap_backend_forced_uri is not None:
-                logger.warn("You have specified to use an fixed URI %s for connecting to your LDAP server backend.  This is NOT RECOMMENDED, as our default communiation over ldapi:// is more secure and much less")
+                self.logger.warn("You have specified to use an fixed URI %s for connecting to your LDAP server backend.  This is NOT RECOMMENDED, as our default communiation over ldapi:// is more secure and much less")
 
         session = system_session()
         try:
@@ -688,7 +688,7 @@ class cmd_domain_demote(Command):
                         server)
         (drsuapiBind, drsuapi_handle, supportedExtensions) = drsuapi_connect(server, lp, creds)
 
-        self.errf.write("Desactivating inbound replication\n")
+        self.errf.write("Deactivating inbound replication\n")
 
         nmsg = ldb.Message()
         nmsg.dn = msg[0].dn
diff --git a/source4/script/find_unused_macros.pl b/source4/script/find_unused_macros.pl
deleted file mode 100755
index 8886835..0000000
--- a/source4/script/find_unused_macros.pl
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/perl
-# Script that reads in C files and prints defines that are used nowhere in the 
-# code
-
-# Arguments: C and H files
-# Copyright Jelmer Vernooij <jelmer at samba.org>, GPL
-
-use strict;
-
-my %defined;
-my %used;
-my %files;
-
-my $tmp;
-while($tmp = shift) { 
-	$files{$tmp} = $tmp;
-	open(FI, $tmp);
-	my $ln = 0;
-	while(<FI>) { 
-		$ln++;
-		my $line = $_;
-		my $cur = "";
-		if(/^#define ([A-Za-z0-9_]+)/) {
-			$defined{$1} = "$tmp:$ln";
-			$cur = $1;
-		}
-
-		$_ = $line;
-		while(/([A-Za-z0-9_]+)/sgm) { 
-			if($cur ne $1) { $used{$1} = "$tmp:$ln"; }
-		}
-	}
-	close FI;
-}
-
-foreach(keys %defined) {
-	if(!$used{$_}) { print "$defined{$_}: Macro `$_' is unused\n"; }
-}
diff --git a/source4/script/find_unused_makefilevars.pl b/source4/script/find_unused_makefilevars.pl
deleted file mode 100755
index 23fc36e..0000000
--- a/source4/script/find_unused_makefilevars.pl
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/perl
-# Script that reads in Makefile.in and outputs the names of all 
-# used but undefined vars and all defined but unused vars 
-# Copyright Jelmer Vernooij <jelmer at samba.org>
-
-# Arguments:
-#  1: Makefile.in
-#
-
-my %references;
-my %defines;
-
-# First, make a list of defines in configure
-$in = shift;
-
-sub process_file($)
-{
-	my ($fn) = @_;
-	open(IN, $fn);
-	while(<IN>) {
-		my $line = $_;
-		while($line =~ /^\b([a-zA-Z0-9_][a-zA-Z0-9_]*)\b[ \t]*=.*/sgm) {
-			$defines{$1} = 1;
-		}
-		while($line =~ /\$\(([a-zA-Z0-9_][a-zA-Z0-9_]*)\)/sgm) {
-			$references{$1} = 1;
-		}
-		while ($line =~ /^include (.*)/sgm) {
-			process_file($1);
-		}
-	}
-	close IN;
-}
-
-process_file($in);
-
-print "##### DEFINED BUT UNUSED: #####\n";
-foreach(%defines) {
-#    print $_." defined\n";
-
-	if ($_ != 1) {
-		if ($references{$_} != 1) {
-			print $_."\n";
-		}
-	} 
-}
-
-print "##### USED BUT UNDEFINED: #####\n";
-foreach(%references) {
-	if ($_ != 1) {
-		if ($defines{$_} != 1) {
-			print $_."\n";
-		}
-	} 
-}


-- 
Samba Shared Repository


More information about the samba-cvs mailing list