Hi Marcel,

Hi Andrew,

thanks for giving an update on this issue.

I know it may be a little early (and insecure) to use this setup - but
I like the way it works anyway :-)

Just in case someone wanted to modify the provision tool, to create
the DNS entries in samba ldb database directly instead of creating
a named.conf - could you give some directions where to start?

(And yes, I know that Active Directory DNS data types are ugly binary
blobs, but I'll take that as a challenge :-)
I guess the easiest way is to:

0) rebuild with the patch attached to unable python bindings for DNS records
1) create a AD with an AD and let Windows manage the DNS record
2) vampire this domain with samba so that you have in the blobs in your s4 DC
3) use ldbsearch to get this entries in base64
4) use a python script to get this blobs in binary
5) use ndrdump dns in decode_dns_name_packet file_with_1_blob to print the blob 6) play with the bindings to see if you manage to manipulate the dns records (an example of how we manipulate with bindings others blobs is source4/scripting/bin/upgradeprovision around line 837, there is also an example attached to this email) 7) manage to generate all the needed record in a dedicated OU of your s4 provision
8) see how we can add 1 more namingcontext at provision
9) alter provision.py to add the namingcontext for DNS record + the record itself !


You might need to come back on IRC at #samba-technical for more questions !

Matthieu

PS: Good luck !

--
Matthieu Patou
Samba Team        http://samba.org
Private repo      http://git.samba.org/?p=mat/samba.git;a=summary


>From 76ef8ef88fbcb22dec8dfa8cbacbf51c59f4ee73 Mon Sep 17 00:00:00 2001
From: Matthieu Patou <m...@matws.net>
Date: Sat, 12 Feb 2011 23:18:29 +0300
Subject: [PATCH] librpc: add bindings for dnsp in python

---
 librpc/idl/wscript_build     |    7 ++++++-
 librpc/wscript_build         |    5 +++++
 source4/librpc/wscript_build |    6 ++++++
 3 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/librpc/idl/wscript_build b/librpc/idl/wscript_build
index 52476c4..a06e95d 100644
--- a/librpc/idl/wscript_build
+++ b/librpc/idl/wscript_build
@@ -25,6 +25,11 @@ bld.SAMBA_PIDL_LIST('PIDL',
                     output_dir='../gen_ndr')
 
 bld.SAMBA_PIDL_LIST('PIDL',
-                    'rap.idl dnsp.idl ntprinting.idl',
+                    'rap.idl ntprinting.idl',
                     options='--header --ndr-parser',
                     output_dir='../gen_ndr')
+
+bld.SAMBA_PIDL_LIST('PIDL',
+                    'dnsp.idl',
+                    options='--header --ndr-parser --client --python',
+                    output_dir='../gen_ndr')
diff --git a/librpc/wscript_build b/librpc/wscript_build
index efe2223..e6a4633 100644
--- a/librpc/wscript_build
+++ b/librpc/wscript_build
@@ -491,6 +491,11 @@ bld.SAMBA_SUBSYSTEM('RPC_NDR_BACKUPKEY',
 	public_deps='dcerpc NDR_BACKUPKEY'
 	)
 
+bld.SAMBA_SUBSYSTEM('RPC_NDR_DNSP',
+	source='gen_ndr/ndr_dnsp_c.c',
+	public_deps='dcerpc NDR_DNSP'
+	)
+
 # a grouping library for NDR subsystems that may be used by more than one target
 bld.SAMBA_LIBRARY('ndr-samba',
 	source=[],
diff --git a/source4/librpc/wscript_build b/source4/librpc/wscript_build
index 6087d84..fa94665 100755
--- a/source4/librpc/wscript_build
+++ b/source4/librpc/wscript_build
@@ -335,6 +335,12 @@ bld.SAMBA_PYTHON('python_dcerpc_drsblobs',
 	realname='samba/dcerpc/drsblobs.so'
 	)
 
+bld.SAMBA_PYTHON('python_dcerpc_dnsp',
+	source='../../librpc/gen_ndr/py_dnsp.c',
+	deps='pytalloc-util pyrpc_util NDR_SECURITY RPC_NDR_DNSP',
+	realname='samba/dcerpc/dnsp.so'
+	)
+
 
 bld.SAMBA_PYTHON('python_dcerpc_xattr',
 	source='../../librpc/gen_ndr/py_xattr.c',
-- 
1.7.1

-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba

Reply via email to