[SCM] Samba Shared Repository - branch master updated

Jelmer Vernooij jelmer at samba.org
Wed Sep 26 15:52:02 MDT 2012


The branch, master has been updated
       via  3bdca92 smb.conf(5): Add basic documentation for 'rpc bigendian'.
       via  0dd9654 smb.conf(5): Add basic documentation for 'kpasswd port'.
       via  879b3ad smb.conf(5): Add basic documentation for 'dgram port'.
       via  12ab467 smb.conf(5): Add basic documentation for 'unicode'.
       via  3ab03cc smb.conf(5): Add basic documentation for 'web port'.
       via  c66744a smb.conf(5): Add basic documentation for 'nbt port'.
       via  29a763a smb.conf(5): Add basic documentation for 'krb5 port'.
       via  7dd3cdc smb.conf(5): 'write ok' is a reverse synonym for 'read only'.
       via  6b9960e smb.conf(5): Distinguish parametric options.
       via  4192960 find_missing_doc: Convert to python.
       via  f2b2c10 find_missing_manpages: convert to python
       via  104c3df find_missing_manpages: Ignore make variables.
       via  90b1a94 netlogon: Per MS-NRPC, don't send unknown workstation flags back to the client.
      from  5022b3d s4: Fix a -Wunused-value warning

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


- Log -----------------------------------------------------------------
commit 3bdca921cc9344d96f4aa3a18ba4aac971539b25
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 26 13:07:54 2012 -0700

    smb.conf(5): Add basic documentation for 'rpc bigendian'.
    
    Autobuild-User(master): Jelmer Vernooij <jelmer at samba.org>
    Autobuild-Date(master): Wed Sep 26 23:51:34 CEST 2012 on sn-devel-104

commit 0dd965492cb97e0b3711ab6380a5f9ae0be5ec8c
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 26 12:59:32 2012 -0700

    smb.conf(5): Add basic documentation for 'kpasswd port'.

commit 879b3ad0812a515e784a2623a035fd74369c8a9b
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 26 12:58:02 2012 -0700

    smb.conf(5): Add basic documentation for 'dgram port'.

commit 12ab467f8768a3e2218b3ebddf43fa15c6743d69
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 26 12:55:15 2012 -0700

    smb.conf(5): Add basic documentation for 'unicode'.

commit 3ab03ccd8420a4fc18c46a82a57d18e16cb75c22
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 26 12:51:41 2012 -0700

    smb.conf(5): Add basic documentation for 'web port'.

commit c66744a8c9f60862579bdfa23774d145ff30b406
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 26 12:50:34 2012 -0700

    smb.conf(5): Add basic documentation for 'nbt port'.

commit 29a763aa0f15faa5d6568ad853e8997f90fa924b
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 26 12:46:37 2012 -0700

    smb.conf(5): Add basic documentation for 'krb5 port'.

commit 7dd3cdc6739f0d0ae0a367b45860202e503b6d00
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 26 12:41:20 2012 -0700

    smb.conf(5): 'write ok' is a reverse synonym for 'read only'.

commit 6b9960e78aa860a163ef477701be43273164e4ba
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 26 18:36:28 2012 +0200

    smb.conf(5): Distinguish parametric options.

commit 4192960a9ee692f7c7c1aa3d4393518910ec7542
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 26 02:37:01 2012 +0200

    find_missing_doc: Convert to python.

commit f2b2c1028bcb5da2292c543e4419d258ec3d6b46
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 26 02:05:39 2012 +0200

    find_missing_manpages: convert to python

commit 104c3df6cf759a69eafd303fe8d5870ae5d34149
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 26 01:24:04 2012 +0200

    find_missing_manpages: Ignore make variables.

commit 90b1a94cb436d872148742eec1af56ba7c6dc9ef
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 26 19:47:56 2012 +0200

    netlogon: Per MS-NRPC, don't send unknown workstation flags back to the
    client.

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

Summary of changes:
 docs-xml/scripts/find_missing_doc             |  119 +++++++++++++++----------
 docs-xml/scripts/find_missing_manpages        |   90 +++++++++++++------
 docs-xml/smbdotconf/misc/rpcdaemon.xml        |    2 +-
 docs-xml/smbdotconf/misc/rpcserver.xml        |    2 +-
 docs-xml/smbdotconf/protocol/dgramport.xml    |   11 +++
 docs-xml/smbdotconf/protocol/nbtport.xml      |   12 +++
 docs-xml/smbdotconf/protocol/rpcbigendian.xml |   16 ++++
 docs-xml/smbdotconf/protocol/unicode.xml      |   13 +++
 docs-xml/smbdotconf/protocol/webport.xml      |   12 +++
 docs-xml/smbdotconf/security/kpasswdport.xml  |   12 +++
 docs-xml/smbdotconf/security/krb5port.xml     |   11 +++
 docs-xml/smbdotconf/security/readonly.xml     |    1 +
 source4/rpc_server/netlogon/dcerpc_netlogon.c |    3 +-
 source4/torture/rpc/netlogon.c                |   28 +++++-
 14 files changed, 248 insertions(+), 84 deletions(-)
 create mode 100644 docs-xml/smbdotconf/protocol/dgramport.xml
 create mode 100644 docs-xml/smbdotconf/protocol/nbtport.xml
 create mode 100644 docs-xml/smbdotconf/protocol/rpcbigendian.xml
 create mode 100644 docs-xml/smbdotconf/protocol/unicode.xml
 create mode 100644 docs-xml/smbdotconf/protocol/webport.xml
 create mode 100644 docs-xml/smbdotconf/security/kpasswdport.xml
 create mode 100644 docs-xml/smbdotconf/security/krb5port.xml


Changeset truncated at 500 lines:

diff --git a/docs-xml/scripts/find_missing_doc b/docs-xml/scripts/find_missing_doc
index 6ce547b..d75ef8d 100755
--- a/docs-xml/scripts/find_missing_doc
+++ b/docs-xml/scripts/find_missing_doc
@@ -1,62 +1,83 @@
-#!/usr/bin/perl
+#!/usr/bin/python
 
-my %doc;
+# Copyright (C) 2007,2012 Jelmer Vernooij <jelmer at samba.org>
 
-$topdir = (shift @ARGV) or $topdir = ".";
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
 
-##################################################
-# Reading links from manpage
-
-$curdir = $ENV{PWD};
-
-chdir("smbdotconf");
+import optparse
+import os
+import re
 
-open(IN,"xsltproc --xinclude --param smb.context ALL generate-context.xsl parameters.all.xml|");
+parser = optparse.OptionParser("source_dir")
 
-while(<IN>) {
-	if( /<samba:parameter .*?name="([^"]*?)"/g ){
-		my $name = $1;
-	    $name =~ s/ //g;
-		$doc{$name} = "NOTFOUND";
-	}
-}
+(opts, args) = parser.parse_args()
 
-close(IN);
+if len(args) == 1:
+    topdir = args[0]
+else:
+    topdir = "."
 
-chdir($curdir);
-
-#################################################
-# Reading entries from source code
-
-
-open(SOURCE,"$topdir/lib/param/param_table.c") or die("Can't open $topdir/lib/param/param_table.c: $!");
+# Reading links from manpage
 
-while ($ln = <SOURCE>) {
-  last if $ln =~ m/^static\ struct\ parm_struct\ parm_table.*/;
-} #burn through the preceding lines
+curdir = os.getcwd()
+doc = {}
 
-while ($ln = <SOURCE>) {
-  last if $ln =~ m/^\s*\}\;\s*$/;
-  #pull in the param names only
-  next if $ln =~ m/.*P_SEPARATOR.*/;
-  next unless $ln =~ /\s*\.label\s*=\s*\"(.*)\".*/;
+os.chdir("smbdotconf");
 
-  my $name = $1;
-  $name =~ s/ //g;
+f = os.popen("xsltproc --xinclude --param smb.context ALL generate-context.xsl parameters.all.xml", "r")
+try:
+    for l in f.readlines():
+        m = re.match('<samba:parameter .*?name="([^"]*?)"', l)
+        if m:
+            name = m.group(1).replace(" ", "")
+            doc[name] = False
+finally:
+    f.close()
 
-  if($doc{lc($name)}) {
-	$doc{lc($name)} = "FOUND";
-  } else {
-	print "'$name' is not documented\n";
-  }
-}
-close SOURCE;
+os.chdir(curdir)
 
-##################################################
-# Trying to find missing references
+# Reading entries from source code
 
-foreach (keys %doc) {
-	if($doc{$_} cmp "FOUND") {
-		print "'$_' is documented but is not a configuration option\n";
-	}
-}
+f = open(os.path.join(topdir, "lib/param/param_table.c"), "r")
+
+# burn through the preceding lines
+while True:
+    l = f.readline()
+    if l.startswith("static struct parm_struct parm_table"):
+        break
+
+for l in f.readlines():
+    if re.match("^\s*\}\;\s*$", l):
+        break
+    # pull in the param names only
+    if re.match(".*P_SEPARATOR.*", l):
+        continue
+    m = re.match("\s*\.label\s*=\s*\"(.*)\".*", l)
+    if not m:
+        continue
+
+    name = m.group(1)
+    name = name.replace(" ", "")
+
+    if name.lower() in doc:
+        doc[name.lower()] = True
+    else:
+      print "'%s' is not documented" % name
+f.close()
+
+# Try to find missing references
+for key in doc.keys():
+     if doc[key] == "FOUND":
+         print "'$_' is documented but is not a configuration option"
diff --git a/docs-xml/scripts/find_missing_manpages b/docs-xml/scripts/find_missing_manpages
index cd8ed87..baa5809 100755
--- a/docs-xml/scripts/find_missing_manpages
+++ b/docs-xml/scripts/find_missing_manpages
@@ -1,39 +1,71 @@
-#!/usr/bin/perl
+#!/usr/bin/python
+# Copyright (C) 2007,2012 Jelmer Vernooij <jelmer at samba.org>
 
-my %doc;
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+#
 
-$invar = 0;
+import optparse
+import os
+import re
 
-$topdir = (shift @ARGV) or $topdir = ".";
+parser = optparse.OptionParser("source_dir")
 
-$progs = "";
+(opts, args) = parser.parse_args()
 
-open(IN, "$topdir/Makefile.in");
-while(<IN>) {
-	if($invar && /^([ \t]*)(.*?)([\\])$/) {
-		$progs.=" " . $2;
-		if($4) { $invar = 1; } else { $invar = 0; }
-	} elsif(/^([^ ]*)_PROGS([0-9]*) = (.*?)([\\])$/) {
-		$progs.=" " . $3;
-		if($4) { $invar = 1; }
-	} else { $invar = 0; }
-}
+invar = False
 
-$progs =~ s/@([^@]+)@//g;
+if len(args) == 1:
+    topdir = args[0]
+else:
+    topdir = "."
 
-foreach(split(/bin\//, $progs)) {
-	next if($_ eq " ");
-	s/ //g;
+progs = []
 
-	$f = $_;
-	
-	$found = 0;
+f = open(os.path.join(topdir, "Makefile.in"), "r")
+try:
+    for l in f.readlines():
+        l = l.strip()
+        if invar:
+            invar = (l[-1] == "\\")
+            progs.extend(l.rstrip("\\").split(" "))
+        else:
+            m = re.match("^([^ ]*)_PROGS([0-9]*) = (.*?)([\\\\])$", l)
+            if m:
+                progs.extend(m.group(3).split(" "))
+                invar = (m.group(4) == "\\")
+            else:
+                invar = False
+finally:
+    f.close()
 
-	for($i = 0; $i < 9; $i++) {
-		if(-e "manpages/$f.$i.xml") { $found = 1; }
-	}
+#$progs =~ s/@([^@]+)@//g;
+#$progs =~ s/\$\(.*?\)//g;
 
-	if(!$found) {
-		print "'$f' does not have a manpage\n";
-	}
-}
+for prog in progs:
+    prog = prog.strip()
+    if prog == "":
+        continue
+    if prog[0] in ("@", "$"):
+        continue
+    prog = prog[len("bin/"):]
+
+    found = False
+
+    for i in range(9):
+        p = "manpages/%s.%d.xml" % (prog, i)
+        if os.path.exists(p):
+            found = True
+
+    if not found:
+        print "'%s' does not have a manpage" % prog
diff --git a/docs-xml/smbdotconf/misc/rpcdaemon.xml b/docs-xml/smbdotconf/misc/rpcdaemon.xml
index 4ba27fc..8db9267 100644
--- a/docs-xml/smbdotconf/misc/rpcdaemon.xml
+++ b/docs-xml/smbdotconf/misc/rpcdaemon.xml
@@ -1,4 +1,4 @@
-<samba:parameter name="rpc_daemon"
+<samba:parameter name="rpc_daemon:DAEMON"
                  context="G"
 		 type="string"
 		 advanced="1" print="1"
diff --git a/docs-xml/smbdotconf/misc/rpcserver.xml b/docs-xml/smbdotconf/misc/rpcserver.xml
index fcc63fe..4372eea 100644
--- a/docs-xml/smbdotconf/misc/rpcserver.xml
+++ b/docs-xml/smbdotconf/misc/rpcserver.xml
@@ -1,4 +1,4 @@
-<samba:parameter name="rpc_server"
+<samba:parameter name="rpc_server:SERVER"
                  context="G"
 		 type="string"
 		 advanced="1" print="1"
diff --git a/docs-xml/smbdotconf/protocol/dgramport.xml b/docs-xml/smbdotconf/protocol/dgramport.xml
new file mode 100644
index 0000000..ee10e9c
--- /dev/null
+++ b/docs-xml/smbdotconf/protocol/dgramport.xml
@@ -0,0 +1,11 @@
+<samba:parameter name="dgram port"
+                 context="G"
+				 type="integer"
+                 advanced="1" developer="1"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+	<para>Specifies which ports the server should listen on for NetBIOS datagram traffic.</para>
+</description>
+
+<value type="default">138</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/protocol/nbtport.xml b/docs-xml/smbdotconf/protocol/nbtport.xml
new file mode 100644
index 0000000..d269189
--- /dev/null
+++ b/docs-xml/smbdotconf/protocol/nbtport.xml
@@ -0,0 +1,12 @@
+<samba:parameter name="nbt port"
+                 context="G"
+				 type="list"
+                 advanced="1" developer="1"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+	<para>Specifies which port the server should use for NetBIOS over IP name
+		services traffic.</para>
+</description>
+
+<value type="default">137</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/protocol/rpcbigendian.xml b/docs-xml/smbdotconf/protocol/rpcbigendian.xml
new file mode 100644
index 0000000..ae12f71
--- /dev/null
+++ b/docs-xml/smbdotconf/protocol/rpcbigendian.xml
@@ -0,0 +1,16 @@
+<samba:parameter name="rpc bigendian"
+                 context="G"
+				 type="bool"
+                 advanced="1" developer="1"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+	<para>Setting this option will force the RPC client and server to
+		transfer data in big endian.</para>
+
+	<para>If it is disabled, data will be transferred in little endian.</para>
+
+	<para>The behaviour is independent of the endianness of the host machine.</para>
+</description>
+
+<value type="default">False</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/protocol/unicode.xml b/docs-xml/smbdotconf/protocol/unicode.xml
new file mode 100644
index 0000000..22ffc4b
--- /dev/null
+++ b/docs-xml/smbdotconf/protocol/unicode.xml
@@ -0,0 +1,13 @@
+<samba:parameter name="unicode"
+                 context="G"
+				 type="bool"
+                 advanced="1" developer="1"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+	<para>Specifies whether the server and client should support unicode.</para>
+
+	<para>If this option is set to false, the use of ASCII will be forced.</para>
+</description>
+
+<value type="default">True</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/protocol/webport.xml b/docs-xml/smbdotconf/protocol/webport.xml
new file mode 100644
index 0000000..1b1073c
--- /dev/null
+++ b/docs-xml/smbdotconf/protocol/webport.xml
@@ -0,0 +1,12 @@
+<samba:parameter name="web port"
+                 context="G"
+				 type="list"
+                 advanced="1" developer="1"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+	<para>Specifies which port the Samba web server should listen on.</para>
+</description>
+
+<value type="default">901</value>
+<value type="example">80</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/security/kpasswdport.xml b/docs-xml/smbdotconf/security/kpasswdport.xml
new file mode 100644
index 0000000..419e866
--- /dev/null
+++ b/docs-xml/smbdotconf/security/kpasswdport.xml
@@ -0,0 +1,12 @@
+<samba:parameter name="kpasswd port"
+                 context="G"
+				 type="integer"
+                 advanced="1" developer="1"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+	<para>Specifies which ports the Kerberos server should listen on for
+		password changes.</para>
+</description>
+
+<value type="default">464</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/security/krb5port.xml b/docs-xml/smbdotconf/security/krb5port.xml
new file mode 100644
index 0000000..e4887fc
--- /dev/null
+++ b/docs-xml/smbdotconf/security/krb5port.xml
@@ -0,0 +1,11 @@
+<samba:parameter name="krb5 port"
+                 context="G"
+				 type="list"
+                 advanced="1" developer="1"
+                 xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<description>
+	<para>Specifies which port the KDC should listen on for Kerberos traffic.</para>
+</description>
+
+<value type="default">88</value>
+</samba:parameter>
diff --git a/docs-xml/smbdotconf/security/readonly.xml b/docs-xml/smbdotconf/security/readonly.xml
index 6e1f6dd..612bf0d 100644
--- a/docs-xml/smbdotconf/security/readonly.xml
+++ b/docs-xml/smbdotconf/security/readonly.xml
@@ -3,6 +3,7 @@
 				 type="boolean"
                  basic="1" advanced="1"
                  xmlns:samba="http://www.samba.org/samba/DTD/samba-doc">
+<synonym>write ok</synonym>
 <description>
     <para>An inverted synonym is <smbconfoption name="writeable"/>.</para>
 
diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c
index 309601e..633687f 100644
--- a/source4/rpc_server/netlogon/dcerpc_netlogon.c
+++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c
@@ -1685,7 +1685,8 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal
 		}
 
 		domain_info->workstation_flags =
-			r->in.query->workstation_info->workstation_flags;
+			r->in.query->workstation_info->workstation_flags & (
+			NETR_WS_FLAG_HANDLES_SPN_UPDATE | NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS);
 
 		r->out.info->domain_info = domain_info;
 	break;
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index f1d605c..d217db2 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -3209,7 +3209,7 @@ static bool test_GetDomainInfo(struct torture_context *tctx,
 					   NULL,
 					   cmdline_credentials,
 					   0);
-		
+
 		torture_assert(tctx, sam_ctx, "Connection to the SAMDB on DC failed!");
 	}
 
@@ -3581,13 +3581,35 @@ static bool test_GetDomainInfo(struct torture_context *tctx,
 		old_dnsname,
 		"'DNS hostname' changed!");
 
+	torture_comment(tctx, "Testing netr_LogonGetDomainInfo 7th call (extra workstation flags)\n");
+	netlogon_creds_client_authenticator(creds, &a);
+
+	q1.workstation_flags = NETR_WS_FLAG_HANDLES_SPN_UPDATE
+		| NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS | 0x4;
+
+	/* Put the DNS hostname back */
+	talloc_free(discard_const_p(char, q1.dns_hostname));
+	q1.dns_hostname = talloc_asprintf(tctx, "%s.%s", TEST_MACHINE_NAME,
+		lpcfg_dnsdomain(tctx->lp_ctx));
+
+	torture_assert_ntstatus_ok(tctx, dcerpc_netr_LogonGetDomainInfo_r(b, tctx, &r),
+		"LogonGetDomainInfo failed");
+	torture_assert_ntstatus_ok(tctx, r.out.result, "LogonGetDomainInfo failed");
+	torture_assert(tctx, netlogon_creds_client_check(creds, &a.cred), "Credential chaining failed");
+
+	/* Checks "workstation flags" */
+	torture_assert(tctx,
+		info.domain_info->workstation_flags
+		== (NETR_WS_FLAG_HANDLES_SPN_UPDATE
+			| NETR_WS_FLAG_HANDLES_INBOUND_TRUSTS),
+		"Out 'workstation flags' don't match!");
 
 	if (!torture_setting_bool(tctx, "dangerous", false)) {
-		torture_comment(tctx, "Not testing netr_LogonGetDomainInfo 7th call (no workstation info) - enable dangerous tests in order to do so\n");
+		torture_comment(tctx, "Not testing netr_LogonGetDomainInfo 8th call (no workstation info) - enable dangerous tests in order to do so\n");
 	} else {
 		/* Try a call without the workstation information structure */
 
-		torture_comment(tctx, "Testing netr_LogonGetDomainInfo 7th call (no workstation info)\n");
+		torture_comment(tctx, "Testing netr_LogonGetDomainInfo 8th call (no workstation info)\n");
 		netlogon_creds_client_authenticator(creds, &a);
 
 		query.workstation_info = NULL;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list