[SCM] Samba Shared Repository - branch master updated

2009-11-28 Thread Andrew Tridgell
The branch, master has been updated
   via  8a34cf6... s4-ldb: make it much easier to use common ldb controls
  from  1287c1d... s4-drs: cope with bogus empty attributes from w2k8-r2

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


- Log -
commit 8a34cf6f51b29f2bb8ff210afb998c3822e65092
Author: Andrew Tridgell tri...@samba.org
Date:   Sat Nov 28 17:35:36 2009 +1100

s4-ldb: make it much easier to use common ldb controls

---

Summary of changes:
 source4/lib/ldb/tools/cmdline.c |   77 ---
 source4/lib/ldb/tools/cmdline.h |2 +-
 2 files changed, 64 insertions(+), 15 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c
index f0cd0a3..522bbed 100644
--- a/source4/lib/ldb/tools/cmdline.c
+++ b/source4/lib/ldb/tools/cmdline.c
@@ -58,6 +58,11 @@ static struct poptOption popt_options[] = {
{ NULL,'o', POPT_ARG_STRING, NULL, 'o', ldb_connect option, 
OPTION },
{ controls, 0, POPT_ARG_STRING, NULL, 'c', controls, NULL },
{ show-binary, 0, POPT_ARG_NONE, options.show_binary, 0, display 
binary LDIF, NULL },
+   { paged, 0, POPT_ARG_NONE, NULL, 'P', use a paged search, NULL },
+   { show-deleted, 0, POPT_ARG_NONE, NULL, 'D', show deleted objects, 
NULL },
+   { show-recycled, 0, POPT_ARG_NONE, NULL, 'R', show recycled 
objects, NULL },
+   { cross-ncs, 0, POPT_ARG_NONE, NULL, 'N', search across NC 
boundaries, NULL },
+   { extended-dn, 0, POPT_ARG_NONE, NULL, 'E', show extended DNs, NULL 
},
 #if (_SAMBA_BUILD_ = 4)
POPT_COMMON_SAMBA
POPT_COMMON_CREDENTIALS
@@ -75,6 +80,25 @@ void ldb_cmdline_help(const char *cmdname, FILE *f)
poptPrintHelp(pc, f, 0);
 }
 
+/*
+  add a control to the options structure
+ */
+static bool add_control(TALLOC_CTX *mem_ctx, const char *control)
+{
+   int i;
+
+   /* count how many controls we already have */
+   for (i=0; options.controls  options.controls[i]; i++) ;
+
+   options.controls = talloc_realloc(mem_ctx, options.controls, const char 
*, i + 2);
+   if (options.controls == NULL) {
+   return false;
+   }
+   options.controls[i] = control;
+   options.controls[i+1] = NULL;
+   return true;
+}
+
 /**
   process command line options
 */
@@ -162,32 +186,57 @@ struct ldb_cmdline *ldb_cmdline_process(struct 
ldb_context *ldb,
 
case 'c': {
const char *cs = poptGetOptArg(pc);
-   const char *p, *q;
-   int cc;
+   const char *p;
 
-   for (p = cs, cc = 1; (q = strchr(p, ',')); cc++, p = q 
+ 1) ;
-
-   options.controls = talloc_array(ret, char *, cc + 1);
-   if (options.controls == NULL) {
-   fprintf(stderr, Out of memory!\n);
-   goto failed;
-   }
-   for (p = cs, cc = 0; p != NULL; cc++) {
-   const char *t;
+   for (p = cs; p != NULL; ) {
+   const char *t, *c;
 
t = strchr(p, ',');
if (t == NULL) {
-   options.controls[cc] = 
talloc_strdup(options.controls, p);
+   c = talloc_strdup(options.controls, p);
p = NULL;
} else {
-   options.controls[cc] = 
talloc_strndup(options.controls, p, t-p);
+   c = talloc_strndup(options.controls, p, 
t-p);
p = t + 1;
}
+   if (c == NULL || !add_control(ret, c)) {
+   fprintf(stderr, __location__ : out of 
memory\n);
+   goto failed;
+   }
}
-   options.controls[cc] = NULL;
 
break;
}
+   case 'P':
+   if (!add_control(ret, paged_results:1:1024)) {
+   fprintf(stderr, __location__ : out of 
memory\n);
+   goto failed;
+   }
+   break;
+   case 'D':
+   if (!add_control(ret, show_deleted:1)) {
+   fprintf(stderr, __location__ : out of 
memory\n);
+   goto failed;
+   }
+   break;
+   case 'R':
+ 

s4-drs: cope with bogus empty attributes from w2k8-r2 (Re: [SCM] Samba Shared Repository - branch master updated)

2009-11-28 Thread Stefan (metze) Metzmacher
Hi Tridge,

 The branch, master has been updated
via  1287c1d... s4-drs: cope with bogus empty attributes from w2k8-r2
   from  db41a0a... s4: fix SD update and password change in upgrade script
 
 http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
 
 
 - Log -
 commit 1287c1d115fb7e8f3954bc05ff65007968403a9c
 Author: Andrew Tridgell tri...@samba.org
 Date:   Sat Nov 28 13:27:06 2009 +1100
 
 s4-drs: cope with bogus empty attributes from w2k8-r2
 
 w2k8-r2 sometimes sends empty attributes with completely bogus attrid
 values in a DRS replication response. This allows us to continue with
 the vampire operation despite these broken elements.
 
 ---
 
 Summary of changes:
  source4/dsdb/repl/replicated_objects.c |   17 +
  1 files changed, 17 insertions(+), 0 deletions(-)
 
 
 Changeset truncated at 500 lines:
 
 diff --git a/source4/dsdb/repl/replicated_objects.c 
 b/source4/dsdb/repl/replicated_objects.c
 index 020d5f1..a8a93e4 100644
 --- a/source4/dsdb/repl/replicated_objects.c
 +++ b/source4/dsdb/repl/replicated_objects.c
 @@ -129,6 +129,15 @@ static WERROR dsdb_convert_object_ex(struct ldb_context 
 *ldb,
   }
  
   status = dsdb_attribute_drsuapi_to_ldb(ldb, schema, a, 
 msg-elements, e);
 + if (!NT_STATUS_IS_OK(status)  a-value_ctr.num_values == 0) {
 + /* w2k8-r2 occasionally sends bogus empty
 +attributes with rubbish attribute IDs. The
 +only think we can do is discard these */
 + DEBUG(0,(__location__ : Discarding bogus empty 
 DsReplicaAttribute with attid 0x%x\n,
 +  a-attid));
 + ZERO_STRUCTP(e);
 + continue;
 + }
   W_ERROR_NOT_OK_RETURN(status);
  
   m-attid= a-attid;
 @@ -149,6 +158,14 @@ static WERROR dsdb_convert_object_ex(struct ldb_context 
 *ldb,
   }
   }
  
 + /* delete any empty elements */
 + for (i=0; i  msg-num_elements; i++) {
 + if (msg-elements[i].name == NULL) {
 + ldb_msg_remove_element(msg, msg-elements[i]);
 + i--;
 + }
 + }
 +

We need to be careful about this, an empty element means
we should remove existing values.
If remove the empty ones here, we need to let the repl_meta_data module
remove them based on the received meta_data array.

metze



signature.asc
Description: OpenPGP digital signature


Re: [SCM] Samba Shared Repository - branch master updated

2009-11-28 Thread Jelmer Vernooij
Hi Matthias,

On Fri, 2009-11-27 at 05:26 -0600, Matthias Dieter Wallnöfer wrote: 
 The branch, master has been updated
via  7504b03... s4:WHATSNEW4.txt - Add also here a comment about the 
 upgrade_from_s3 script
via  3d57da8... s4:howto.txt - add a notice about the upgrade 
 possibilities and fix line spaces
via  fd31328... s4:upgrade script - rename it to upgrade_from_s3 and 
 do some rework
   from  d6c60f8... s3-nsstest: drastically shrink size and dependencies 
 of nsstest binary.
 
 http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
 
 
 - Log -
 commit 7504b03b541026c84a4f454b7572a3280296a8d9
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 11:07:11 2009 +0100
 
 s4:WHATSNEW4.txt - Add also here a comment about the upgrade_from_s3 
 script
 
 commit 3d57da80e574f5f47effb41fd45361eec22f119e
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 11:02:20 2009 +0100
 
 s4:howto.txt - add a notice about the upgrade possibilities and fix line 
 spaces
 
 commit fd313282a24e58570c2fa5b3fdfd0b84d0053363
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 10:50:03 2009 +0100
 
 s4:upgrade script - rename it to upgrade_from_s3 and do some rework
 
 - Give a better name to the script
 - Move it to the location where also upgradeprovision resides
 - Fix up trailing whitespaces and tabs
 
 ---
 
 Summary of changes:
  WHATSNEW4.txt  |   11 --
  howto4.txt |   18 +++---
  .../upgrade = scripting/bin/upgrade_from_s3}  |   37 
 +++-
  3 files changed, 41 insertions(+), 25 deletions(-)
  rename source4/{setup/upgrade = scripting/bin
Please keep the upgrade script under setup/. Its name is too generic to
be installed in /bin. Alternatively, perhaps we should rename it to
something specific to Samba.

This would have broken the build (there are tests for the upgrade script
that you haven't changed), please update the blackbox tests as well when
renaming binaries.

Cheers,

Jelmerb


signature.asc
Description: This is a digitally signed message part


Re: [SCM] Samba Shared Repository - branch master updated

2009-11-28 Thread Jelmer Vernooij
On Fri, 2009-11-27 at 06:04 -0600, Matthias Dieter Wallnöfer wrote: 
 The branch, master has been updated
via  a7fa3a9... s4:provision.py - cosmetic output correction
via  6b835b0... s4:setup/provision - make the interactive mode work 
 again
   from  7504b03... s4:WHATSNEW4.txt - Add also here a comment about the 
 upgrade_from_s3 script
 
 http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
 
 
 - Log -
 commit a7fa3a9703bf9f0c72031c84998f4fb21ba95429
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 13:07:52 2009 +0100
 
 s4:provision.py - cosmetic output correction
 
 commit 6b835b0691faab904246e587ffa6ff74b9fb53e2
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 13:02:31 2009 +0100
 
 s4:setup/provision - make the interactive mode work again
 
 ---
 
 Summary of changes:
  source4/scripting/python/samba/provision.py |2 +-
  source4/setup/provision |   16 +++-
  2 files changed, 4 insertions(+), 14 deletions(-)

 index ed350dd..f1aa07c 100755
 --- a/source4/setup/provision
 +++ b/source4/setup/provision
 @@ -122,14 +122,6 @@ def message(text):
  if len(sys.argv) == 1:
   opts.interactive = True
  
 -if not opts.interactive and (opts.realm is None or opts.domain is None):
 - if opts.realm is None:
 - print sys.stderr, No realm set
 - if opts.domain is None:
 - print sys.stderr, No domain set
 - parser.print_usage()
 - sys.exit(1)
 -
^^^ This change isn't necessary to make the interactive mode work (it
explicitly checks for interactive mode not being in use), and it breaks
usage when not in interactive mode because we end up with no
realm/domain being set. 

 if opts.interactive:
   from getpass import getpass
   import socket
 @@ -137,19 +129,17 @@ if opts.interactive:
   if default is not None:
   print %s [%s]:  % (prompt,default),
   else:
 - print %s:  % (prompt,),
 + print %s:  % (prompt),
   return sys.stdin.readline().rstrip(\n) or default
   try:
   opts.realm = ask(Realm, socket.getfqdn().split(., 
 1)[1].upper())
   except IndexError:
 - print sys.stderr, Cannot guess realm from %s % ( 
 socket.getfqdn())
 - sys.exit(1)
 + opts.realm = ask(Realm, None)
^^^ We've already asked the user for a realm, why ask twice? Rather, we
should not set a default value if the users FQDN is broken because it
contains no dots.

   try:
   opts.domain = ask(Domain, opts.realm.split(.)[0])
   except IndexError:
 - print sys.stderr, Cannot guess domain from %s % ( 
 opts.realm())
 - sys.exit(1)
 + opts.domain = ask(Domain, None)
^^^ Same here, let's just get the default value right in the first
place.

Cheers,

Jelmer


signature.asc
Description: This is a digitally signed message part


Re: [SCM] Samba Shared Repository - branch master updated

2009-11-28 Thread Jelmer Vernooij
Hi Matthias,

On Fri, 2009-11-27 at 08:59 -0600, Matthias Dieter Wallnöfer wrote: 
 The branch, master has been updated
via  0cc45b4... s4:upgrade.py - rework to make the upgrade s3 - s4 
 possible again
via  bd6c133... s4:upgrade_from_s3 - Fix message outputs
via  dbb8989... s4:upgrade.py - the import of WINS databases don't 
 seem to work always
via  70b3161... s4:samba3.py - ignore comments in smb.conf files
via  82adfa3... s4:samba3.py - don't read those informations out from 
 the TDB
via  f299efa... s4:samba3.py - support the TDB version 3
   from  a5d854a... s4:provision - Fix up the provision of standalone 
 and member mode
 
 http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
 
 
 - Log -
 commit 0cc45b47dc787abb2c3c31e4fc824798d9f3efe9
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 15:50:26 2009 +0100
 
 s4:upgrade.py - rework to make the upgrade s3 - s4 possible again
 
 Able to read basic settings workgroup, realm, netbios name and the
 function mode from the s3 smb.conf and use them for the provision of s4.
 
 commit bd6c133e506fdb5dee13e0a144ef99c6d452be42
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 15:49:18 2009 +0100
 
 s4:upgrade_from_s3 - Fix message outputs
 
 The quiet parameter was interpreted in the reverse manner.
 
 commit dbb8989e05ac3189a5eca11fa40d572388ea02fc
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 15:02:18 2009 +0100
 
 s4:upgrade.py - the import of WINS databases don't seem to work always
 
 Disable it for now until the cause has been found
 
 commit 70b31610909544c58fd87c5e0aa00e02eb5f6d4b
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 15:00:41 2009 +0100
 
 s4:samba3.py - ignore comments in smb.conf files
 
 commit 82adfa39b75aa628c88f828278c6ac09335d1a49
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 14:59:12 2009 +0100
 
 s4:samba3.py - don't read those informations out from the TDB
 
 At the moment those three calls are broken
 
 commit f299efa8f05c6a5b739222bdf75690a4591d3650
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 14:58:37 2009 +0100
 
 s4:samba3.py - support the TDB version 3
 
 ---
 
 Summary of changes:
  source4/scripting/bin/upgrade_from_s3 |6 +-
  source4/scripting/python/samba/samba3.py  |   11 +-
  source4/scripting/python/samba/upgrade.py |  144 ++--
  3 files changed, 81 insertions(+), 80 deletions(-)
 
 
 Changeset truncated at 500 lines:
 
 diff --git a/source4/scripting/bin/upgrade_from_s3 
 b/source4/scripting/bin/upgrade_from_s3
 index 03f4415..7e1e1fd 100755
 --- a/source4/scripting/bin/upgrade_from_s3
 +++ b/source4/scripting/bin/upgrade_from_s3
 @@ -50,14 +50,14 @@ opts, args = parser.parse_args()
  
  def message(text):
  Print a message if quiet is not set.
 -if opts.quiet:
 +if not opts.quiet:
  print text
  
  if len(args)  1:
  parser.print_usage()
  sys.exit(1)
  
 -message(Reading Samba3 databases and smb.conf\n)
 +message(Reading Samba3 databases and smb.conf)
  
  libdir = args[0]
  if not os.path.isdir(libdir):
 @@ -71,7 +71,7 @@ else:
  
  samba3 = Samba3(libdir, smbconf)
  
 -message(Provisioning\n)
 +message(Provisioning)
  
  setup_dir = opts.setupdir
  if setup_dir is None:
 diff --git a/source4/scripting/python/samba/samba3.py 
 b/source4/scripting/python/samba/samba3.py
 index 179efa2..c21b457 100644
 --- a/source4/scripting/python/samba/samba3.py
 +++ b/source4/scripting/python/samba/samba3.py
 @@ -509,7 +509,7 @@ class TdbSam(TdbDatabase):
  Samba 3 TDB passdb backend reader.
  def _check_version(self):
  self.version = fetch_uint32(self.tdb, INFO/version\0) or 0
 -assert self.version in (0, 1, 2)
 +assert self.version in (0, 1, 2, 3)
^^ Please revert these changes. Clearly we don't support version 3 yet,
so we shouldn't pretend like we do. I'd rather see us fail with a clear
assertion error than breaking the v2 support. Furthermore, supporting
version 3 properly shouldn't be too hard.

 def usernames(self):
  Iterate over the usernames in this Tdb database.
 @@ -592,9 +592,10 @@ class TdbSam(TdbDatabase):
  for entry in hours:
  for i in range(8):
  user.hours.append(ord(entry)  (2 ** i) == (2 ** i))
 -(user.bad_password_count, data) = unpack_uint16(data)
 -(user.logon_count, data) = unpack_uint16(data)
 -(user.unknown_6, data) = unpack_uint32(data)
 +# FIXME
 +#(user.bad_password_count, data) = unpack_uint16(data)
 +#(user.logon_count, data) = unpack_uint16(data)
 +#(user.unknown_6, data) = unpack_uint32(data)

Re: [SCM] Samba Shared Repository - branch master updated

2009-11-28 Thread Jelmer Vernooij
Hi Matthias,

On Fri, 2009-11-27 at 09:42 -0600, Matthias Dieter Wallnöfer wrote: 
 - Log -
 commit 6c3e2417a0639cd7c367de93615c422cf5217456
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 16:39:27 2009 +0100
 
 s4:samba3.py (and test) - deactivate the tests until those parameters are 
 fixed
 
 commit 08b3c396d7d534c9bfa29a7cd015a97d504d45a9
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 16:35:28 2009 +0100
 
 s4:upgrade.py - Umlaut problem
 
 commit 1af31aed0bd430d0af3a52962fa21f5c08309f01
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 16:34:44 2009 +0100
 
 s4:tests.sh - Make also here the change from upgrade to 
 upgrade_from_s3
 
 ---
 
 Summary of changes:
  source4/scripting/python/samba/samba3.py   |2 +-
  source4/scripting/python/samba/tests/samba3.py |6 +++---
  source4/scripting/python/samba/upgrade.py  |2 +-
  source4/selftest/tests.sh  |2 +-
  4 files changed, 6 insertions(+), 6 deletions(-)
Please revert these as well - these tests were working fine previous to
your changes, they really shouldn't be disabled without good reason!

Cheers,

Jelmer


signature.asc
Description: This is a digitally signed message part


Re: [SCM] Samba Shared Repository - branch master updated

2009-11-28 Thread Jelmer Vernooij
Hi Matthias,

 - Log -
 commit 7d400715e9af2056690c03a1a2f45c7f343fa313
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 21:14:44 2009 +0100
 
 s4:registry/util - Don't include the trailing '\0' in the internal data 
 format but add it on the back-conversion to a string
 
 As far as I know the registry library saves all data (including) strings 
 without
 the null termination. So do it also here in a similar way.
Is there anything in particular that prompted this change? It's
unnecessary as talloc_convert_string_convenience should already
null-terminate.

Cheers,

Jelmer


signature.asc
Description: This is a digitally signed message part


Re: [SCM] Samba Shared Repository - branch master updated

2009-11-28 Thread Matthias Dieter Wallnöfer
Will revert soon.

Matthias

--- Jelmer Vernooij jel...@samba.org schrieb am Sa, 28.11.2009:

Von: Jelmer Vernooij jel...@samba.org
Betreff: Re: [SCM] Samba Shared Repository - branch master updated
An: samba-techni...@lists.samba.org
CC: samba-...@samba.org
Datum: Samstag, 28. November 2009, 15:22

Hi Matthias,

On Fri, 2009-11-27 at 09:42 -0600, Matthias Dieter Wallnöfer wrote: 
 - Log -
 commit 6c3e2417a0639cd7c367de93615c422cf5217456
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 16:39:27 2009 +0100
 
     s4:samba3.py (and test) - deactivate the tests until those parameters are 
fixed
 
 commit 08b3c396d7d534c9bfa29a7cd015a97d504d45a9
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 16:35:28 2009 +0100
 
     s4:upgrade.py - Umlaut problem
 
 commit 1af31aed0bd430d0af3a52962fa21f5c08309f01
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 16:34:44 2009 +0100
 
     s4:tests.sh - Make also here the change from upgrade to 
upgrade_from_s3
 
 ---
 
 Summary of changes:
  source4/scripting/python/samba/samba3.py       |    2 +-
  source4/scripting/python/samba/tests/samba3.py |    6 +++---
  source4/scripting/python/samba/upgrade.py      |    2 +-
  source4/selftest/tests.sh                      |    2 +-
  4 files changed, 6 insertions(+), 6 deletions(-)
Please revert these as well - these tests were working fine previous to
your changes, they really shouldn't be disabled without good reason!

Cheers,

Jelmer


__
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen 
Massenmails. 
http://mail.yahoo.com


Re: [SCM] Samba Shared Repository - branch master updated

2009-11-28 Thread Matthias Dieter Wallnöfer
Jelmer,

sorry for the remove of the first code block if not opts.interactive and 
(opts.realm is None or opts.domain is None):. I was too fast and thought maybe 
this was the problem since the interactive mode didn't work on my box. Later I 
discovered that this is due to the split function of the call  
socket.getfqdn().split(., 1)[1].upper()). Therefore I would let in the error 
handling like this since it's really a bugfix.

Okay, the first part I will restore

Matthias

--- Jelmer Vernooij jel...@samba.org schrieb am Sa, 28.11.2009:

Von: Jelmer Vernooij jel...@samba.org
Betreff: Re: [SCM] Samba Shared Repository - branch master updated
An: samba-techni...@lists.samba.org
CC: samba-...@samba.org
Datum: Samstag, 28. November 2009, 15:10

On Fri, 2009-11-27 at 06:04 -0600, Matthias Dieter Wallnöfer wrote: 
 The branch, master has been updated
        via  a7fa3a9... s4:provision.py - cosmetic output correction
        via  6b835b0... s4:setup/provision - make the interactive mode work 
again
       from  7504b03... s4:WHATSNEW4.txt - Add also here a comment about the 
upgrade_from_s3 script
 
 http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
 
 
 - Log -
 commit a7fa3a9703bf9f0c72031c84998f4fb21ba95429
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 13:07:52 2009 +0100
 
     s4:provision.py - cosmetic output correction
 
 commit 6b835b0691faab904246e587ffa6ff74b9fb53e2
 Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
 Date:   Fri Nov 27 13:02:31 2009 +0100
 
     s4:setup/provision - make the interactive mode work again
 
 ---
 
 Summary of changes:
  source4/scripting/python/samba/provision.py |    2 +-
  source4/setup/provision                     |   16 +++-
  2 files changed, 4 insertions(+), 14 deletions(-)

 index ed350dd..f1aa07c 100755
 --- a/source4/setup/provision
 +++ b/source4/setup/provision
 @@ -122,14 +122,6 @@ def message(text):
  if len(sys.argv) == 1:
      opts.interactive = True
  
 -if not opts.interactive and (opts.realm is None or opts.domain is None):
 -    if opts.realm is None:
 -        print sys.stderr, No realm set
 -    if opts.domain is None:
 -        print sys.stderr, No domain set
 -    parser.print_usage()
 -    sys.exit(1)
 -
^^^ This change isn't necessary to make the interactive mode work (it
explicitly checks for interactive mode not being in use), and it breaks
usage when not in interactive mode because we end up with no
realm/domain being set. 

 if opts.interactive:
      from getpass import getpass
      import socket
 @@ -137,19 +129,17 @@ if opts.interactive:
          if default is not None:
              print %s [%s]:  % (prompt,default),
          else:
 -            print %s:  % (prompt,),
 +            print %s:  % (prompt),
          return sys.stdin.readline().rstrip(\n) or default
      try:
          opts.realm = ask(Realm, socket.getfqdn().split(., 1)[1].upper())
      except IndexError:
 -        print sys.stderr, Cannot guess realm from %s % ( 
 socket.getfqdn())
 -        sys.exit(1)
 +        opts.realm = ask(Realm, None)
^^^ We've already asked the user for a realm, why ask twice? Rather, we
should not set a default value if the users FQDN is broken because it
contains no dots.

     try:
          opts.domain = ask(Domain, opts.realm.split(.)[0])
      except IndexError:
 -        print sys.stderr, Cannot guess domain from %s % ( opts.realm())
 -        sys.exit(1)
 +        opts.domain = ask(Domain, None)
^^^ Same here, let's just get the default value right in the first
place.

Cheers,

Jelmer


__
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen 
Massenmails. 
http://mail.yahoo.com


Re: [SCM] Samba Shared Repository - branch master updated

2009-11-28 Thread Jelmer Vernooij
Hi Matthias,

On Sat, Nov 28, 2009 at 03:57:21PM +, Matthias Dieter Wallnöfer wrote:
 sorry for the remove of the first code block if not opts.interactive and 
 (opts.realm is None or opts.domain is None):. I was too fast and thought 
 maybe this was the problem since the interactive mode didn't work on my box. 
 Later I discovered that this is due to the split function of the call  
 socket.getfqdn().split(., 1)[1].upper()). Therefore I would let in the 
 error handling like this since it's really a bugfix.

 Okay, the first part I will restore
Please see my comments about the other code parts as well - I don't
think they are correct either. Is there any particular reason for
prompting the user twice when we are not able to determine a sane
default?

Cheers,

Jelmer

 --- Jelmer Vernooij jel...@samba.org schrieb am Sa, 28.11.2009:

 Von: Jelmer Vernooij jel...@samba.org
 Betreff: Re: [SCM] Samba Shared Repository - branch master updated
 An: samba-techni...@lists.samba.org
 CC: samba-...@samba.org
 Datum: Samstag, 28. November 2009, 15:10

 On Fri, 2009-11-27 at 06:04 -0600, Matthias Dieter Wallnöfer wrote: 
  The branch, master has been updated
         via  a7fa3a9... s4:provision.py - cosmetic output correction
         via  6b835b0... s4:setup/provision - make the interactive mode work 
 again
        from  7504b03... s4:WHATSNEW4.txt - Add also here a comment about the 
 upgrade_from_s3 script

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


  - Log -
  commit a7fa3a9703bf9f0c72031c84998f4fb21ba95429
  Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
  Date:   Fri Nov 27 13:07:52 2009 +0100

      s4:provision.py - cosmetic output correction

  commit 6b835b0691faab904246e587ffa6ff74b9fb53e2
  Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
  Date:   Fri Nov 27 13:02:31 2009 +0100

      s4:setup/provision - make the interactive mode work again

  ---

  Summary of changes:
   source4/scripting/python/samba/provision.py |    2 +-
   source4/setup/provision                     |   16 +++-
   2 files changed, 4 insertions(+), 14 deletions(-)

  index ed350dd..f1aa07c 100755
  --- a/source4/setup/provision
  +++ b/source4/setup/provision
  @@ -122,14 +122,6 @@ def message(text):
   if len(sys.argv) == 1:
       opts.interactive = True
   
  -if not opts.interactive and (opts.realm is None or opts.domain is None):
  -    if opts.realm is None:
  -        print sys.stderr, No realm set
  -    if opts.domain is None:
  -        print sys.stderr, No domain set
  -    parser.print_usage()
  -    sys.exit(1)
  -
 ^^^ This change isn't necessary to make the interactive mode work (it
 explicitly checks for interactive mode not being in use), and it breaks
 usage when not in interactive mode because we end up with no
 realm/domain being set. 

  if opts.interactive:
       from getpass import getpass
       import socket
  @@ -137,19 +129,17 @@ if opts.interactive:
           if default is not None:
               print %s [%s]:  % (prompt,default),
           else:
  -            print %s:  % (prompt,),
  +            print %s:  % (prompt),
           return sys.stdin.readline().rstrip(\n) or default
       try:
           opts.realm = ask(Realm, socket.getfqdn().split(., 
 1)[1].upper())
       except IndexError:
  -        print sys.stderr, Cannot guess realm from %s % ( 
  socket.getfqdn())
  -        sys.exit(1)
  +        opts.realm = ask(Realm, None)
 ^^^ We've already asked the user for a realm, why ask twice? Rather, we
 should not set a default value if the users FQDN is broken because it
 contains no dots.

      try:
           opts.domain = ask(Domain, opts.realm.split(.)[0])
       except IndexError:
  -        print sys.stderr, Cannot guess domain from %s % ( opts.realm())
  -        sys.exit(1)
  +        opts.domain = ask(Domain, None)
 ^^^ Same here, let's just get the default value right in the first
 place.

 Cheers,

 Jelmer


 __
 Do You Yahoo!?
 Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz 
 gegen Massenmails. 
 http://mail.yahoo.com 

-- 
Jelmer Vernooij jel...@samba.org - http://jelmer.vernstok.nl/
 17:29:41 up 14 min,  3 users,  load average: 0.53, 0.58, 0.44


[SCM] Samba Shared Repository - branch master updated

2009-11-28 Thread Matthias Dieter Wallnöfer
The branch, master has been updated
   via  b973c50... s4:upgrade_from_s3 - Move it back to setup
   via  f068664... s4:setup/provision - Rework
   via  3ca61d9... s4:upgrade.py - remove my copyright
   via  68f7b84... s4:upgrade.py - readd accidentally removed empty lines
   via  ecfd1df... s4:samba3.py/upgrade.py: Revert
  from  8a34cf6... s4-ldb: make it much easier to use common ldb controls

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


- Log -
commit b973c5083699ad2b22c72fafe5c4b77f1f4eeccb
Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
Date:   Sat Nov 28 19:23:08 2009 +0100

s4:upgrade_from_s3 - Move it back to setup

Suggested by Jelmer

commit f0686645a99de226f199130fee07910d0f6462be
Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
Date:   Sat Nov 28 17:03:57 2009 +0100

s4:setup/provision - Rework

- Revert change in ask - was previously correct
- Readd accidentally removed checks for non-null realm and domainname
- On interactive mode perform only one ask call per question
- Inform the user about the unset administrator password

commit 3ca61d9a011d5e8ff677df041f4afb4c3a8be0b4
Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
Date:   Sat Nov 28 18:48:47 2009 +0100

s4:upgrade.py - remove my copyright

First I wanted to add also other changes but then I didn't introduce them.
Therefore remove my copyright again.

commit 68f7b84140e59800b2a5c9c96b7a27f7a67235bb
Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
Date:   Sat Nov 28 16:59:18 2009 +0100

s4:upgrade.py - readd accidentally removed empty lines

Jelmer pointed out that this is against the PEP8 norm

commit ecfd1dfcbd8f301b879942322f7fe765f03599bb
Author: Matthias Dieter Wallnöfer mwallnoe...@yahoo.de
Date:   Sat Nov 28 15:28:45 2009 +0100

s4:samba3.py/upgrade.py: Revert

This reverts commit 2175c0ed0649d545ea833d50e8d33fbee9051c35.
This reverts commit 6c3e2417a0639cd7c367de93615c422cf5217456.
This reverts commit dbb8989e05ac3189a5eca11fa40d572388ea02fc.
This reverts commit 82adfa39b75aa628c88f828278c6ac09335d1a49.
This reverts commit f299efa8f05c6a5b739222bdf75690a4591d3650.

After a small discussion with Jelmer we agreed that this isn't the right way
to fix the problem. We should wait for a real patch rather to rely on 
temporal
hacks.

---

Summary of changes:
 WHATSNEW4.txt|2 +-
 howto4.txt   |2 +-
 source4/scripting/python/samba/samba3.py |   11 
 source4/scripting/python/samba/tests/samba3.py   |6 ++--
 source4/scripting/python/samba/upgrade.py|7 -
 source4/selftest/tests.sh|2 +-
 source4/setup/provision  |   29 ++
 source4/{scripting/bin = setup}/upgrade_from_s3 |0 
 8 files changed, 40 insertions(+), 19 deletions(-)
 rename source4/{scripting/bin = setup}/upgrade_from_s3 (100%)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW4.txt b/WHATSNEW4.txt
index 9718bf4..1c9d1e4 100644
--- a/WHATSNEW4.txt
+++ b/WHATSNEW4.txt
@@ -116,7 +116,7 @@ KNOWN ISSUES
 - Users upgrading existing databases to Samba4 should carefully
   consult upgrading-samba4.txt.  We have made a number of changes in
   this release that should make it easier to upgrade in future.
-  Btw: there exists also a script under the scripting/bin directory of the
+  Btw: there exists also a script under the setup directory of the
   source distribution called upgrade_from_s3 which should allow a step-up
   from Samba3 to Samba4. It's not included yet in the binary distributions
   since it's completely experimental!
diff --git a/howto4.txt b/howto4.txt
index 50acf23..e33d040 100644
--- a/howto4.txt
+++ b/howto4.txt
@@ -93,7 +93,7 @@ use the procedures shown in upgrading-samba4.txt to upgrade 
it and keep all
 data.
 
 When you are using Samba3 at the moment you could try the experimental script
-upgrade_from_s3 under the scripting/bin directory of the source
+upgrade_from_s3 under the setup directory of the source
 distribution (it isn't included in binary distributions yet).
 
 Step 5: Create a simple smb.conf
diff --git a/source4/scripting/python/samba/samba3.py 
b/source4/scripting/python/samba/samba3.py
index 809fd01..9873679 100644
--- a/source4/scripting/python/samba/samba3.py
+++ b/source4/scripting/python/samba/samba3.py
@@ -509,7 +509,7 @@ class TdbSam(TdbDatabase):
 Samba 3 TDB passdb backend reader.
 def _check_version(self):
 self.version = fetch_uint32(self.tdb, INFO/version\0) or 0
-assert self.version in (0, 1, 2, 3)
+assert self.version in (0, 1, 2)
 
 def usernames(self):
 Iterate over the usernames in this Tdb 

Build status as of Sun Nov 29 07:00:01 2009

2009-11-28 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2009-11-28 
00:00:04.0 -0700
+++ /home/build/master/cache/broken_results.txt 2009-11-29 00:00:02.0 
-0700
@@ -1,22 +1,22 @@
-Build status as of Sat Nov 28 07:00:01 2009
+Build status as of Sun Nov 29 07:00:01 2009
 
 Build counts:
 Tree Total  Broken Panic 
 build_farm   0  0  0 
-ccache   4  1  0 
+ccache   5  1  0 
 distcc   0  0  0 
 ldb  33 33 0 
 libreplace   2  1  0 
 lorikeet 0  0  0 
 pidl 23 22 0 
-ppp  2  0  0 
-rsync33 11 0 
+ppp  3  0  0 
+rsync33 12 0 
 samba-docs   0  0  0 
 samba-web0  0  0 
-samba_3_current 30 28 0 
-samba_3_master 31 23 3 
+samba_3_current 1  1  0 
+samba_3_master 31 24 3 
 samba_3_next 31 30 12
-samba_4_0_test 33 30 0 
+samba_4_0_test 33 30 1 
 talloc   2  2  0 
 tdb  2  2  0