Build status as of Wed Mar 24 06:00:01 2010

2010-03-24 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2010-03-23 
00:00:02.0 -0600
+++ /home/build/master/cache/broken_results.txt 2010-03-24 00:00:06.0 
-0600
@@ -1,4 +1,4 @@
-Build status as of Tue Mar 23 06:00:01 2010
+Build status as of Wed Mar 24 06:00:01 2010
 
 Build counts:
 Tree Total  Broken Panic 
@@ -14,9 +14,9 @@
 samba-web0  0  0 
 samba_3_current 32 32 2 
 samba_3_master 32 32 2 
-samba_3_next 29 29 4 
-samba_4_0_test 34 34 0 
-samba_4_0_waf 33 31 1 
+samba_3_next 29 25 4 
+samba_4_0_test 34 32 0 
+samba_4_0_waf 33 33 1 
 talloc   34 11 0 
 tdb  32 22 0 
 


[SCM] CTDB repository - branch 1.0.112 updated - ctdb-1.0.111-54-gba22bcd

2010-03-24 Thread Ronnie Sahlberg
The branch, 1.0.112 has been updated
   via  ba22bcd467bf6ec6184bef71035fc03fb3cc7180 (commit)
   via  1f253c8be425862a42eb2ee424eff8baab49df88 (commit)
  from  8fdf1318ac2b10ab4e95651bdc67c0e0391eae95 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.0.112


- Log -
commit ba22bcd467bf6ec6184bef71035fc03fb3cc7180
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Wed Mar 24 15:54:15 2010 +1100

New Version1.0.112-13

commit 1f253c8be425862a42eb2ee424eff8baab49df88
Author: Ronnie Sahlberg ronniesahlb...@gmail.com
Date:   Wed Mar 24 15:51:02 2010 +1100

Try to restart NFS if service nfs start failed.

BZ61827

---

Summary of changes:
 config/events.d/60.nfs |4 +++-
 packaging/RPM/ctdb.spec.in |5 -
 2 files changed, 7 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs
index 61c8081..3957283 100755
--- a/config/events.d/60.nfs
+++ b/config/events.d/60.nfs
@@ -77,7 +77,9 @@ case $1 in
 
# check that NFS is running
service nfs status 2/dev/null /dev/null || {
-   echo NFS is not running
+   echo NFS is not running. Trying to restart NFS.
+   ctdb_service_stop
+   ctdb_service_start
exit 1
}
 
diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in
index 7622300..5843bb2 100644
--- a/packaging/RPM/ctdb.spec.in
+++ b/packaging/RPM/ctdb.spec.in
@@ -5,7 +5,7 @@ Vendor: Samba Team
 Packager: Samba Team sa...@samba.org
 Name: ctdb
 Version: 1.0.112
-Release: 12
+Release: 13
 Epoch: 0
 License: GNU GPL version 3
 Group: System Environment/Daemons
@@ -123,6 +123,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_docdir}/ctdb/tests/bin/ctdb_transaction
 
 %changelog
+* Wed Mar 25 2010 : Version 1.0.112-13
+ - Try to restart NFS if service nfs start failed.
+   BZ 61827
 * Wed Mar 11 2010 : Version 1.0.112-12
  - From christian ambach : drop the loglevel of a vacuuming message
  - From  Wolfgang Mueller-Friedt : fix bug in ctdb_setstatus


-- 
CTDB repository


[SCM] CTDB repository - annotated tag ctdb-1.0.114 created - ctdb-1.0.114

2010-03-24 Thread Ronnie Sahlberg
The annotated tag, ctdb-1.0.114 has been created
at  44d60196c88f943a8dc28c8253a4d381cb0f10c4 (tag)
   tagging  b07beb68bf2adf65e837669be0c7464852f829ac (commit)
  replaces  ctdb-1.0.113
 tagged by  Ronnie Sahlberg
on  Wed Mar 24 17:28:07 2010 +1100

- Log -
tag for 1.0.114
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQBLqbEL2aJ36aon/y8RApqDAJwLNkPTFaEs0R7+7+JUGIw2tY9lKACfTK7b
dyiSH6Gzi0GF5wdryDBVQ0E=
=RHyk
-END PGP SIGNATURE-

Andrew Tridgell (5):
  util: added TLIST_*() macros
  ctdb: move ctdb_io.c to use TLIST_*() macros
  ctdb: when we fill the client packet queue we need to drop the client
  ctdb: migrate to new dlinklist.h from Samba
  fixed printing of high latency

Christian Ambach (1):
  adjust a vacuum log level

Martin Schwenke (15):
  onnode - respect $CTDB_BASE rather than hard-coding /etc/ctdb.
  onnode: update algorithm for finding nodes file.
  onnode - respect $CTDB_BASE rather than hard-coding /etc/ctdb.
  onnode: update algorithm for finding nodes file.
  initscript: handle spaces in option values inserted into $CTDB_OPTIONS.
  initscript: handle spaces in option values inserted into $CTDB_OPTIONS.
  Merge commit 'origin/master'
  initscript: Remove bash-ism.
  eventscript: Use of $NFS_TICKLE_SHARED_DIRECTORY must be after loadconfig.
  eventscripts: stop loadconfig function from loading ctdb config file 
twice.
  Merge branch 'master' of git://git.samba.org/sahlberg/ctdb
  onnode documentation - update documentation to reflect recent onnode 
changes.
  Merge commit 'origin/master'
  Test suite: Make ctdb ip test backward compatible with older ctdb 
versions.
  Test suite: Make ctdb ip test backward compatible with older ctdb 
versions.

Mathieu Parent (4):
  Correction of spelling errors in manpages
  Correction of spelling errors.
  Correct nice_service()
  Fix some more bashisms

Michael Adam (8):
  server:ctdb_send_dmaster_reply: fix a message typo.
  fix bug #7152: check NFS-Shares, fails with to long path-names
  doc: fill metainfo manual and source in the ctdb manual page
  doc: add metainfo manual and source in the ctdbd manual page
  doc: regenerate ctdb and ctdb manpages after xml changes
  doc: fix a linebreak in the example output of ctdb getdbmap in ctdb(1)
  doc: regenerate ctdb(1) manpages after xml change
  packaging: add tdbtool and tdbdump as dependencies to the RPM

Ronnie Sahlberg (26):
  Make the size of the in memory ringbuffer for keeping the recent log 
messages
  document the in-memory ringbuffer for logging and the commands
  source the nfs sysconfig file from the 61.nfstickles script
  Drop the debug level for logging fd creation to DEBUG_DEBUG
  add two new debug controls to send and receive messages
  We only queued up to 1000 packets per queue before we start dropping
  When trying to enable/disable a node.
  dont just exit(0) upon successful completion of waiting for an 
ipreallocate to finish.
  commands that relate to manual failover of ip addresses (moveip)
  Merge commit 'martins/master'
  Add a new variable : CTDB_NFS_SKIP_KNFSD_ALIVE_CHECK
  lower the loglevel for a debug message for redundant releases of public 
ips
  Add a variable CTDB_CHECK_SWAP_IS_NOT_USED=yes
  Reduce the log level for two debug messages
  Reducing the log level for a debug message
  Reduce loglevel for two eventscript related debug messages
  try to restart rpc-rquotad if it is not running
  Ignore any scripts that timesout for most events, except startup.
  From Elia Pinto gitter.spi...@gmail.com
  From Sumit Bose sb...@redhat.com
  ctdb regsrvids is much more useful for testing if it sleeps once it has 
registered its srvid.
  Make sure that the natgw eventscript also triggers on the stopped event
  In ctdb_control_end_recovery,
  Merge r...@10.1.1.27:/shared/ctdb/ctdb-git
  Merge commit 'obnox/master-rebase'
  new version 1.0.114

Rusty Russell (2):
  event scripts: add logging for low memory conditions
  Leave sequence number alone when merely migrating records.

Stefan Metzmacher (77):
  lib/events: finish Run only one event for each epoll_wait/select call
  server: add missing goto again after do_recovery()
  tools/ctdb: display INACTIVE status in ctdb status and ctdb status -Y
  move DEBUG* macros to one place
  configure: don't overwrite AC_CHECK_FUNC_EXT and AC_CHECK_LIB_EXT
  lib/util: import fault/backtrace handling from samba.
  lib/util: add pre and post panic action hooks
  server: setup fault handler to get the build-in backtrace support
  server: add init event
  config/functions: add tickle_tcp_connections()
  events/10.interfaces: move some parts to helper 

getting rid of utf8string2

2010-03-24 Thread Stefan (metze) Metzmacher
Hi Simo,


 diff --git a/librpc/idl/idl_types.h b/librpc/idl/idl_types.h
 index e8b3da5..d763a8b 100644
 --- a/librpc/idl/idl_types.h
 +++ b/librpc/idl/idl_types.h
 @@ -48,9 +48,10 @@
  #define utf8string   [flag(STR_UTF8|STR_NULLTERM)] string
  
  /*
 -  an utf8 string prefixed with [size], 32 bits
 +  an utf8 string prefixed with [length], 32 bits

This should be [size] when you use STR_SIZE4...

 +  not null terminated
  */
 -#define utf8string2  [flag(STR_UTF8|STR_SIZE4)] string
 +#define utf8string2  [flag(STR_SIZE4|STR_UTF8|STR_NOTERM)] string

I'd like to get rid of this as you can express the same with valid NDR.

Something like:

[value(strlen(dns_name))] uint32 dns_name_size;
[charset(UTF8)] uint8 dns_name[dns_name_size];

should do the same.

Can you send me a file I can pass to ndrdump to test it?

metze

PS: It would be nice if you wouldn't introduce leading whitespaces in
the idl file...:-)



signature.asc
Description: OpenPGP digital signature


[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Stefan Metzmacher
The branch, master has been updated
   via  a599319... libreplace: fixed declaration of dprintf() on FreeBSD
   via  83aaf48... s4-provision: FreeBSD uses 'staff' for users
   via  de2b841... s4-provision: solaris uses the group other
  from  4c4d0a0... build: fixed nss_wrapper on solaris

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


- Log -
commit a599319d0a389ff0c31dae8068cd7a78352aa9e7
Author: Andrew Tridgell tri...@freebsd.home.tridgell.net
Date:   Wed Mar 24 05:06:25 2010 +1100

libreplace: fixed declaration of dprintf() on FreeBSD

commit 83aaf4829e2b9bece5c1b4181553d3025d6d2cb3
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Mar 24 16:52:37 2010 +1100

s4-provision: FreeBSD uses 'staff' for users

commit de2b8419358d3588f6d33a22686260de8efda1d2
Author: Andrew Tridgell tri...@samba.org
Date:   Tue Mar 23 11:02:32 2010 -0400

s4-provision: solaris uses the group other

---

Summary of changes:
 lib/replace/replace.c   |4 ++--
 lib/replace/replace.h   |   10 ++
 source4/scripting/python/samba/provision.py |2 +-
 3 files changed, 13 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/replace/replace.c b/lib/replace/replace.c
index f2dcb10..e4b97a8 100644
--- a/lib/replace/replace.c
+++ b/lib/replace/replace.c
@@ -705,7 +705,7 @@ void *rep_memmem(const void *haystack, size_t haystacklen,
 #endif
 
 #ifndef HAVE_VDPRINTF
-int vdprintf(int fd, const char *format, va_list ap)
+int rep_vdprintf(int fd, const char *format, va_list ap)
 {
char *s = NULL;
int ret;
@@ -722,7 +722,7 @@ int vdprintf(int fd, const char *format, va_list ap)
 #endif
 
 #ifndef HAVE_DPRINTF
-int dprintf(int fd, const char *format, ...)
+int rep_dprintf(int fd, const char *format, ...)
 {
int ret;
va_list ap;
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index e7578cd..cd73e65 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -336,6 +336,16 @@ int rep_dlclose(void *handle);
 /* prototype is in system/network.h */
 #endif
 
+#ifndef HAVE_VDPRINTF
+#define vdprintf rep_vdprintf
+int rep_vdprintf(int fd, const char *format, va_list ap);
+#endif
+
+#ifndef HAVE_DPRINTF
+#define dprintf rep_dprintf
+int rep_dprintf(int fd, const char *format, ...);
+#endif
+
 #ifndef PRINTF_ATTRIBUTE
 #if (__GNUC__ = 3)  (__GNUC_MINOR__ = 1 )
 /** Use gcc attribute to check printf fns.  a1 is the 1-based index of
diff --git a/source4/scripting/python/samba/provision.py 
b/source4/scripting/python/samba/provision.py
index aa13711..1d5e61c 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -1140,7 +1140,7 @@ def provision(setup_dir, message, session_info,
 
 root_uid = findnss_uid([root or root])
 nobody_uid = findnss_uid([nobody or nobody])
-users_gid = findnss_gid([users or users])
+users_gid = findnss_gid([users or users, 'users', 'other', 'staff'])
 if wheel is None:
 wheel_gid = findnss_gid([wheel, adm])
 else:


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Volker Lendecke
The branch, master has been updated
   via  fbdcaa9... s3: Optimize gencache for smbd exit
  from  a599319... libreplace: fixed declaration of dprintf() on FreeBSD

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


- Log -
commit fbdcaa929c7270469cf6c31fd6fcf94ce4e7306e
Author: Volker Lendecke v...@samba.org
Date:   Tue Mar 23 18:36:55 2010 +0100

s3: Optimize gencache for smbd exit

If thousands of smbds try to gencache_stabilize at the same time because the
network died, all of them might be sitting in transaction_start. Don't do 
the
stabilize transaction if nothing has changed in gencache_notrans.tdb.

Volker

---

Summary of changes:
 source3/lib/gencache.c |   89 ---
 1 files changed, 75 insertions(+), 14 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index 9a4cbc2..577ff12 100644
--- a/source3/lib/gencache.c
+++ b/source3/lib/gencache.c
@@ -40,6 +40,13 @@ static struct tdb_context *cache_notrans;
  * @brief Generic, persistent and shared between processes cache mechanism
  *for use by various parts of the Samba code
  *
+ * We have two cache files, one with transactions (gencache.tdb) and
+ * one without (gencache_notrans.tdb) that is CLEAR_IF_FIRST. Normal
+ * writes go to the gencache_notrans.tdb to be fast. Every 100 writes
+ * to the gencache (settable with gencache:stabilize_count) or every 5
+ * minutes (settable with gencache:stabilize_interval) we stabilize
+ * gencache_notrans.tdb with one transaction to gencache.tdb.
+ *
  **/
 
 
@@ -107,7 +114,8 @@ again:
 
DEBUG(5, (Opening cache file at %s\n, cache_fname));
 
-   cache_notrans = tdb_open_log(cache_fname, 0, TDB_CLEAR_IF_FIRST,
+   cache_notrans = tdb_open_log(cache_fname, 0,
+TDB_CLEAR_IF_FIRST | TDB_SEQNUM,
 open_flags, 0644);
if (cache_notrans == NULL) {
DEBUG(5, (Opening %s failed: %s\n, cache_fname,
@@ -128,6 +136,51 @@ static TDB_DATA last_stabilize_key(void)
return result;
 }
 
+struct gencache_parse_last_stabilize_state {
+   bool found;
+   int last_time;
+   int last_seqnum;
+};
+
+static int gencache_parse_last_stabilize_fn(TDB_DATA key, TDB_DATA data,
+   void *private_data)
+{
+   struct gencache_parse_last_stabilize_state *state =
+   (struct gencache_parse_last_stabilize_state *)private_data;
+
+   if ((data.dptr == NULL) || (data.dsize == 0) ||
+   (data.dptr[data.dsize-1] != '\0')) {
+   return -1;
+   }
+
+   if (sscanf((char *)data.dptr, %d/%d, state-last_time,
+  state-last_seqnum) != 2) {
+   return -1;
+   }
+
+   state-found = true;
+   return 0;
+}
+
+static bool gencache_parse_last_stabilize(time_t *last_time, int *last_seqnum)
+{
+   struct gencache_parse_last_stabilize_state state;
+
+   state.found = false;
+
+   if (tdb_parse_record(cache_notrans, last_stabilize_key(),
+gencache_parse_last_stabilize_fn,
+state) == -1) {
+   return false;
+   }
+   if (!state.found) {
+   return false;
+   }
+   *last_time = state.last_time;
+   *last_seqnum = state.last_seqnum;
+   return true;
+}
+
 /**
  * Set an entry in the cache file. If there's no such
  * one, then add it.
@@ -144,9 +197,9 @@ bool gencache_set_data_blob(const char *keystr, const 
DATA_BLOB *blob,
time_t timeout)
 {
int ret;
-   TDB_DATA databuf;
char* val;
time_t last_stabilize;
+   int last_seqnum;
static int writecount;
 
if (tdb_data_cmp(string_term_tdb_data(keystr),
@@ -206,17 +259,15 @@ bool gencache_set_data_blob(const char *keystr, const 
DATA_BLOB *blob,
 * gencache_notrans.tdb too large.
 */
 
-   last_stabilize = 0;
-   databuf = tdb_fetch(cache_notrans, last_stabilize_key());
-   if ((databuf.dptr != NULL)
-(databuf.dptr[databuf.dsize-1] == '\0')) {
-   last_stabilize = atoi((char *)databuf.dptr);
-   SAFE_FREE(databuf.dptr);
-   }
-   if ((last_stabilize
-+ lp_parm_int(-1, gencache, stabilize_interval, 300))
-time(NULL)) {
-   gencache_stabilize();
+   if (gencache_parse_last_stabilize(last_stabilize, last_seqnum)) {
+   time_t next;
+
+   next = last_stabilize + lp_parm_int(
+   -1, gencache, stabilize_interval, 300);
+
+   if (next  time(NULL)) {
+   gencache_stabilize();
+   }
}
 
 done:
@@ -411,11 

[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Andrew Bartlett
The branch, master has been updated
   via  5592a9b... s4:selftest Test --sign and --encrypt options to 
ldbsearch
   via  bb7854a... s4:cmdline Add --sign and --encrypt options to our 
common command line
   via  a2286ba... s4:ntlmssp Ensure that we always negotiate signing if we 
negotiate sealing.
  from  fbdcaa9... s3: Optimize gencache for smbd exit

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


- Log -
commit 5592a9ba5adb6e23a0fc580725184f39efce0486
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Mar 24 19:27:18 2010 +1100

s4:selftest Test --sign and --encrypt options to ldbsearch

commit bb7854afea47699be32f5331fe5f8f05e469cb96
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Mar 24 19:26:02 2010 +1100

s4:cmdline Add --sign and --encrypt options to our common command line

This allows ldbsearch to accept --sign and --encrypt.  I'll soon work
to integrate with the --signing= option in smbclient.

Andrew Bartlett

commit a2286bad67a772d290fead9832b7ca52877c40b2
Author: Andrew Bartlett abart...@samba.org
Date:   Wed Mar 24 16:09:02 2010 +1100

s4:ntlmssp Ensure that we always negotiate signing if we negotiate sealing.

Without this, a sealed LDAP connection to windows does not work.

Andrew Bartlett

---

Summary of changes:
 source4/auth/ntlmssp/ntlmssp_client.c  |1 +
 source4/lib/cmdline/popt_credentials.c |   29 -
 source4/selftest/tests.sh  |4 ++--
 3 files changed, 31 insertions(+), 3 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/auth/ntlmssp/ntlmssp_client.c 
b/source4/auth/ntlmssp/ntlmssp_client.c
index 7aef086..b518fa8 100644
--- a/source4/auth/ntlmssp/ntlmssp_client.c
+++ b/source4/auth/ntlmssp/ntlmssp_client.c
@@ -368,6 +368,7 @@ NTSTATUS gensec_ntlmssp_client_start(struct gensec_security 
*gensec_security)
gensec_ntlmssp_state-neg_flags |= NTLMSSP_NEGOTIATE_SIGN;
}
if (gensec_security-want_features  GENSEC_FEATURE_SEAL) {
+   gensec_ntlmssp_state-neg_flags |= NTLMSSP_NEGOTIATE_SIGN;
gensec_ntlmssp_state-neg_flags |= NTLMSSP_NEGOTIATE_SEAL;
}
 
diff --git a/source4/lib/cmdline/popt_credentials.c 
b/source4/lib/cmdline/popt_credentials.c
index 42ecac1..80f71eb 100644
--- a/source4/lib/cmdline/popt_credentials.c
+++ b/source4/lib/cmdline/popt_credentials.c
@@ -39,7 +39,7 @@
 
 static bool dont_ask;
 
-enum opt { OPT_SIMPLE_BIND_DN, OPT_PASSWORD, OPT_KERBEROS };
+enum opt { OPT_SIMPLE_BIND_DN, OPT_PASSWORD, OPT_KERBEROS, OPT_SIGN, 
OPT_ENCRYPT };
 
 /*
   disable asking for a password
@@ -66,6 +66,7 @@ static void popt_common_credentials_callback(poptContext con,

cli_credentials_set_cmdline_callbacks(cmdline_credentials);
}
return;
+
}
 
switch(opt-val) {
@@ -119,9 +120,33 @@ static void popt_common_credentials_callback(poptContext 
con,
}

case OPT_SIMPLE_BIND_DN:
+   {
cli_credentials_set_bind_dn(cmdline_credentials, arg);
break;
}
+   case OPT_SIGN:
+   {
+   uint32_t gensec_features;
+
+   gensec_features = 
cli_credentials_get_gensec_features(cmdline_credentials);
+
+   gensec_features |= GENSEC_FEATURE_SIGN;
+   cli_credentials_set_gensec_features(cmdline_credentials,
+   gensec_features);
+   break;
+   }
+   case OPT_ENCRYPT:
+   {
+   uint32_t gensec_features;
+
+   gensec_features = 
cli_credentials_get_gensec_features(cmdline_credentials);
+
+   gensec_features |= GENSEC_FEATURE_SEAL;
+   cli_credentials_set_gensec_features(cmdline_credentials,
+   gensec_features);
+   break;
+   }
+   }
 }
 
 
@@ -135,5 +160,7 @@ struct poptOption popt_common_credentials[] = {
{ machine-pass, 'P', POPT_ARG_NONE, NULL, 'P', Use stored machine 
account password (implies -k) },
{ simple-bind-dn, 0, POPT_ARG_STRING, NULL, OPT_SIMPLE_BIND_DN, DN 
to use for a simple bind },
{ kerberos, 'k', POPT_ARG_STRING, NULL, OPT_KERBEROS, Use Kerberos 
},
+   { sign, 'S', POPT_ARG_NONE, NULL, OPT_SIGN, Sign connection to 
prevent modification in transit },
+   { encrypt, 'e', POPT_ARG_NONE, NULL, OPT_ENCRYPT, Encrypt connection 
for privacy },
{ NULL }
 };
diff --git a/source4/selftest/tests.sh b/source4/selftest/tests.sh
index e6a8c25..8dd8f2b 100755
--- a/source4/selftest/tests.sh
+++ b/source4/selftest/tests.sh
@@ -114,8 +114,8 @@ echo OPTIONS $TORTURE_OPTIONS
 
 # Simple tests for LDAP and CLDAP
 
-for options in  

[SCM] Samba Shared Repository - branch v3-5-test updated

2010-03-24 Thread Karolin Seeger
The branch, v3-5-test has been updated
   via  39fad14... Fix bug 7075 - bug in vfs_scannedonly rmdir 
implementation.
  from  75a0354... s3: Fix a bad memleak in winbind (cherry picked from 
commit 13400a6589a20452097bc338fa742d834bbd6a34)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test


- Log -
commit 39fad1417eefe69712fd1a805a41dcfe0d34fdf1
Author: Jeremy Allison j...@samba.org
Date:   Thu Feb 4 16:23:32 2010 -0800

Fix bug 7075 - bug in vfs_scannedonly rmdir implementation.

Check for NULL on opendir, correctly call next rmdir.

Jeremy.

---

Summary of changes:
 source3/modules/vfs_scannedonly.c |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_scannedonly.c 
b/source3/modules/vfs_scannedonly.c
index 20c54fb..0e32a6f 100644
--- a/source3/modules/vfs_scannedonly.c
+++ b/source3/modules/vfs_scannedonly.c
@@ -822,6 +822,9 @@ static int scannedonly_rmdir(vfs_handle_struct * handle, 
const char *path)
 
path_w_slash = name_w_ending_slash(ctx,path);
dirp = SMB_VFS_NEXT_OPENDIR(handle, path, NULL, 0);
+   if (!dirp) {
+   return -1;
+   }
while ((dire = SMB_VFS_NEXT_READDIR(handle, dirp, NULL)) != NULL) {
if (ISDOT(dire-d_name) || ISDOTDOT(dire-d_name)) {
continue;
@@ -878,7 +881,8 @@ static int scannedonly_rmdir(vfs_handle_struct * handle, 
const char *path)
TALLOC_FREE(smb_fname);
}
}
-   return SMB_VFS_NEXT_CLOSEDIR(handle, dirp);
+   SMB_VFS_NEXT_CLOSEDIR(handle, dirp);
+   return SMB_VFS_NEXT_RMDIR(handle, path);
 }
 
 static void free_scannedonly_data(void **data)


-- 
Samba Shared Repository


[SCM] CTDB repository - branch master updated - ctdb-1.0.114-2-g7872743

2010-03-24 Thread Ronnie Sahlberg
The branch, master has been updated
   via  78727437446266ee66455a67c127b8d558c1 (commit)
   via  ae2cdd27af5a1a143020c8477d1e61068f21a4a4 (commit)
  from  b07beb68bf2adf65e837669be0c7464852f829ac (commit)

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


- Log -
commit 78727437446266ee66455a67c127b8d558c1
Author: Volker Lendecke v...@samba.org
Date:   Wed Mar 24 10:35:10 2010 +0100

In ctdb catdb, print the payload data length without the ctdb header length

commit ae2cdd27af5a1a143020c8477d1e61068f21a4a4
Author: Volker Lendecke v...@samba.org
Date:   Mon Feb 22 15:04:16 2010 +0100

Fix a typo in run_startrecovery_eventscript

---

Summary of changes:
 client/ctdb_client.c   |2 +-
 server/ctdb_recoverd.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/client/ctdb_client.c b/client/ctdb_client.c
index 9a89176..9e5f7fc 100644
--- a/client/ctdb_client.c
+++ b/client/ctdb_client.c
@@ -1906,7 +1906,7 @@ int ctdb_dumpdb_record(struct ctdb_context *ctdb, 
TDB_DATA key, TDB_DATA data, v
fprintf(f, dmaster: %u\n, h-dmaster);
fprintf(f, rsn: %llu\n, (unsigned long long)h-rsn);
 
-   fprintf(f, data(%u) = \, (unsigned)data.dsize);
+   fprintf(f, data(%u) = \, (unsigned)data.dsize - sizeof(*h));
for (i=sizeof(*h);idata.dsize;i++) {
if (ISASCII(data.dptr[i])) {
fprintf(f, %c, data.dptr[i]);
diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c
index ebcca1b..949a1bc 100644
--- a/server/ctdb_recoverd.c
+++ b/server/ctdb_recoverd.c
@@ -212,7 +212,7 @@ static int run_startrecovery_eventscript(struct 
ctdb_recoverd *rec, struct ctdb_
 static void async_getcap_callback(struct ctdb_context *ctdb, uint32_t 
node_pnn, int32_t res, TDB_DATA outdata, void *callback_data)
 {
if ( (outdata.dsize != sizeof(uint32_t)) || (outdata.dptr == NULL) ) {
-   DEBUG(DEBUG_ERR, (__location__  Invalid lenght/pointer for 
getcap callback : %u %p\n,  (unsigned)outdata.dsize, outdata.dptr));
+   DEBUG(DEBUG_ERR, (__location__  Invalid length/pointer for 
getcap callback : %u %p\n,  (unsigned)outdata.dsize, outdata.dptr));
return;
}
if (node_pnn  ctdb-num_nodes) {


-- 
CTDB repository


Re: getting rid of utf8string2

2010-03-24 Thread simo
On Wed, 2010-03-24 at 08:24 +0100, Stefan (metze) Metzmacher wrote:
 Hi Simo,
 
 
  diff --git a/librpc/idl/idl_types.h b/librpc/idl/idl_types.h
  index e8b3da5..d763a8b 100644
  --- a/librpc/idl/idl_types.h
  +++ b/librpc/idl/idl_types.h
  @@ -48,9 +48,10 @@
   #define utf8string [flag(STR_UTF8|STR_NULLTERM)] string
   
   /*
  -  an utf8 string prefixed with [size], 32 bits
  +  an utf8 string prefixed with [length], 32 bits
 
 This should be [size] when you use STR_SIZE4...

Yeah, I was experimenting with STR_LEN4 and forgot to change it back.

  +  not null terminated
   */
  -#define utf8string2[flag(STR_UTF8|STR_SIZE4)] string
  +#define utf8string2[flag(STR_SIZE4|STR_UTF8|STR_NOTERM)] string
 
 I'd like to get rid of this as you can express the same with valid NDR.
 
 Something like:
 
 [value(strlen(dns_name))] uint32 dns_name_size;
 [charset(UTF8)] uint8 dns_name[dns_name_size];
 
 should do the same.

Yes, but it is extremely ugly, and adds artifacts (the size) in the
structure, what is the problem with this string type ?

 Can you send me a file I can pass to ndrdump to test it?

Attached

 PS: It would be nice if you wouldn't introduce leading whitespaces in
 the idl file...:-)

Ops sorry, I usually remove spaces, but forgot, I'll fix them and the
comment and commit.

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer s...@samba.org
Principal Software Engineer at Red Hat, Inc. s...@redhat.com


[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Simo Sorce
The branch, master has been updated
   via  7d89c7c... idl: fix comment and convert whitespaces to tabs
  from  5592a9b... s4:selftest Test --sign and --encrypt options to 
ldbsearch

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


- Log -
commit 7d89c7c17bcedd33dae7d3200104dc0643a753f6
Author: Simo Sorce i...@samba.org
Date:   Wed Mar 24 07:45:15 2010 -0400

idl: fix comment and convert whitespaces to tabs

---

Summary of changes:
 librpc/idl/drsblobs.idl |   88 +++---
 librpc/idl/idl_types.h  |2 +-
 2 files changed, 45 insertions(+), 45 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/drsblobs.idl b/librpc/idl/drsblobs.idl
index 0df5bc1..93c44f3 100644
--- a/librpc/idl/drsblobs.idl
+++ b/librpc/idl/drsblobs.idl
@@ -572,53 +572,53 @@ interface drsblobs {
[in,subcontext(0xFC01)] ExtendedErrorInfoPtr ptr
);
 
-/* MS-ADTS 7.1.6.9.3 msDS-TrustForestTrustInfo Attribute */
-
-typedef [flag(NDR_NOALIGN)] struct {
-[value(ndr_size_dom_sid0(sid, ndr-flags))] uint32 sid_size;
-[subcontext(0),subcontext_size(sid_size)] dom_sid sid;
-utf8string2 dns_name;
-utf8string2 netbios_name;
-} ForestTrustDataDomainInfo;
-
-typedef [flag(NDR_NOALIGN)] struct {
-uint32 size;
-uint8 data[size];
-} ForestTrustDataBinaryData;
-
-typedef [nodiscriminant] union {
-[case(FOREST_TRUST_TOP_LEVEL_NAME)] utf8string2 name;
-[case(FOREST_TRUST_TOP_LEVEL_NAME_EX)] utf8string2 name;
-[case(FOREST_TRUST_DOMAIN_INFO)] ForestTrustDataDomainInfo 
info;
-[default] ForestTrustDataBinaryData data;
-} ForestTrustData;
-
-/* same as lsa_ForestTrustRecordType */
-typedef [enum8bit] enum {
+   /* MS-ADTS 7.1.6.9.3 msDS-TrustForestTrustInfo Attribute */
+
+   typedef [flag(NDR_NOALIGN)] struct {
+   [value(ndr_size_dom_sid0(sid, ndr-flags))] uint32 sid_size;
+   [subcontext(0),subcontext_size(sid_size)] dom_sid sid;
+   utf8string2 dns_name;
+   utf8string2 netbios_name;
+   } ForestTrustDataDomainInfo;
+
+   typedef [flag(NDR_NOALIGN)] struct {
+   uint32 size;
+   uint8 data[size];
+   } ForestTrustDataBinaryData;
+
+   typedef [nodiscriminant] union {
+   [case(FOREST_TRUST_TOP_LEVEL_NAME)] utf8string2 name;
+   [case(FOREST_TRUST_TOP_LEVEL_NAME_EX)] utf8string2 name;
+   [case(FOREST_TRUST_DOMAIN_INFO)] ForestTrustDataDomainInfo info;
+   [default] ForestTrustDataBinaryData data;
+   } ForestTrustData;
+
+   /* same as lsa_ForestTrustRecordType */
+   typedef [enum8bit] enum {
FOREST_TRUST_TOP_LEVEL_NAME = 0,
FOREST_TRUST_TOP_LEVEL_NAME_EX = 1,
FOREST_TRUST_DOMAIN_INFO = 2
-} ForestTrustInfoRecordType;
-
-/* meaning of flags depends on record type and values are
-   the same as in lsa.idl, see collision record types */
-typedef [public,gensize,flag(NDR_NOALIGN)] struct {
-uint32 flags;
-NTTIME timestamp;
-ForestTrustInfoRecordType type;
-[switch_is(type)] ForestTrustData data;
-} ForestTrustInfoRecord;
-
-typedef [flag(NDR_NOALIGN)] struct {
-[value(ndr_size_ForestTrustInfoRecord(record, 
ndr-iconv_convenience, ndr-flags))] uint32 record_size;
-ForestTrustInfoRecord record;
-} ForestTrustInfoRecordArmor;
-
-typedef [public,flag(NDR_NOALIGN)] struct {
-uint32 version;
-uint32 count;
-ForestTrustInfoRecordArmor records[count];
-} ForestTrustInfo;
+   } ForestTrustInfoRecordType;
+
+   /* meaning of flags depends on record type and values are
+  the same as in lsa.idl, see collision record types */
+   typedef [public,gensize,flag(NDR_NOALIGN)] struct {
+   uint32 flags;
+   NTTIME timestamp;
+   ForestTrustInfoRecordType type;
+   [switch_is(type)] ForestTrustData data;
+   } ForestTrustInfoRecord;
+
+   typedef [flag(NDR_NOALIGN)] struct {
+   [value(ndr_size_ForestTrustInfoRecord(record, 
ndr-iconv_convenience, ndr-flags))] uint32 record_size;
+   ForestTrustInfoRecord record;
+   } ForestTrustInfoRecordArmor;
+
+   typedef [public,flag(NDR_NOALIGN)] struct {
+   uint32 version;
+   uint32 count;
+   ForestTrustInfoRecordArmor records[count];
+   } ForestTrustInfo;
 
void decode_ForestTrustInfo(
 

[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Günther Deschner
The branch, master has been updated
   via  9fd24eb... s4-smbtorture: cleanup some of the RPC-SAMBA3 tests.
   via  5e87e85... s4-smbtorture: add rap_get_servername to RPC-SAMBA3 
family of tests.
  from  7d89c7c... idl: fix comment and convert whitespaces to tabs

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


- Log -
commit 9fd24eb9c5fdd0e4a801af83cf9ec7f6de6c4504
Author: Günther Deschner g...@samba.org
Date:   Mon Mar 22 15:58:09 2010 +0100

s4-smbtorture: cleanup some of the RPC-SAMBA3 tests.

This avoids printf, uses simplication functions where appropriate, etc.

Guenther

commit 5e87e8576caddfb6e46b6c7d42428b79d2056569
Author: Günther Deschner g...@samba.org
Date:   Mon Mar 22 17:24:38 2010 +0100

s4-smbtorture: add rap_get_servername to RPC-SAMBA3 family of tests.

Guenther

---

Summary of changes:
 source4/torture/rpc/samba3rpc.c | 1706 +++
 1 files changed, 630 insertions(+), 1076 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index 7b94de9..4de8f67 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -69,7 +69,7 @@ bool torture_bind_authcontext(struct torture_context *torture)
mem_ctx = talloc_init(torture_bind_authcontext);
 
if (mem_ctx == NULL) {
-   d_printf(talloc_init failed\n);
+   torture_comment(torture, talloc_init failed\n);
return false;
}
 
@@ -87,7 +87,7 @@ bool torture_bind_authcontext(struct torture_context *torture)
lp_iconv_convenience(torture-lp_ctx),
lp_gensec_settings(torture, 
torture-lp_ctx));
if (!NT_STATUS_IS_OK(status)) {
-   d_printf(smbcli_full_connection failed: %s\n,
+   torture_comment(torture, smbcli_full_connection failed: %s\n,
 nt_errstr(status));
goto done;
}
@@ -95,21 +95,21 @@ bool torture_bind_authcontext(struct torture_context 
*torture)
lsa_pipe = dcerpc_pipe_init(mem_ctx, cli-transport-socket-event.ctx,
lp_iconv_convenience(torture-lp_ctx));
if (lsa_pipe == NULL) {
-   d_printf(dcerpc_pipe_init failed\n);
+   torture_comment(torture, dcerpc_pipe_init failed\n);
goto done;
}
lsa_handle = lsa_pipe-binding_handle;
 
status = dcerpc_pipe_open_smb(lsa_pipe, cli-tree, \\lsarpc);
if (!NT_STATUS_IS_OK(status)) {
-   d_printf(dcerpc_pipe_open_smb failed: %s\n,
+   torture_comment(torture, dcerpc_pipe_open_smb failed: %s\n,
 nt_errstr(status));
goto done;
}
 
status = dcerpc_bind_auth_none(lsa_pipe, ndr_table_lsarpc);
if (!NT_STATUS_IS_OK(status)) {
-   d_printf(dcerpc_bind_auth_none failed: %s\n,
+   torture_comment(torture, dcerpc_bind_auth_none failed: %s\n,
 nt_errstr(status));
goto done;
}
@@ -124,7 +124,7 @@ bool torture_bind_authcontext(struct torture_context 
*torture)
status = dcerpc_lsa_OpenPolicy2_r(lsa_handle, mem_ctx, openpolicy);
 
if (!NT_STATUS_IS_OK(status)) {
-   d_printf(dcerpc_lsa_OpenPolicy2 failed: %s\n,
+   torture_comment(torture, dcerpc_lsa_OpenPolicy2 failed: %s\n,
 nt_errstr(status));
goto done;
}
@@ -134,19 +134,19 @@ bool torture_bind_authcontext(struct torture_context 
*torture)
 
status = dcerpc_lsa_Close_r(lsa_handle, mem_ctx, close_handle);
if (!NT_STATUS_IS_OK(status)) {
-   d_printf(dcerpc_lsa_Close failed: %s\n,
+   torture_comment(torture, dcerpc_lsa_Close failed: %s\n,
 nt_errstr(status));
goto done;
}
 
session2 = smbcli_session_init(cli-transport, mem_ctx, false, 
session_options);
if (session2 == NULL) {
-   d_printf(smbcli_session_init failed\n);
+   torture_comment(torture, smbcli_session_init failed\n);
goto done;
}
 
if (!(anon_creds = cli_credentials_init_anon(mem_ctx))) {
-   d_printf(create_anon_creds failed\n);
+   torture_comment(torture, create_anon_creds failed\n);
goto done;
}
 
@@ -158,7 +158,7 @@ bool torture_bind_authcontext(struct torture_context 
*torture)
 
status = smb_composite_sesssetup(session2, setup);
if (!NT_STATUS_IS_OK(status)) {
-   d_printf(anon session setup failed: %s\n,
+   torture_comment(torture, anon session setup failed: 

[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Günther Deschner
The branch, master has been updated
   via  fcad135... s4-smbtorture: add missing checks for WERROR results in 
RPC-SAMBA3 tests.
   via  8cd63a8... s4-smbtorture: fix some invalid parameters in 
RPC-SAMSYNC test.
  from  9fd24eb... s4-smbtorture: cleanup some of the RPC-SAMBA3 tests.

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


- Log -
commit fcad13500bee1305784df6de0f553372b2948a74
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 24 13:34:01 2010 +0100

s4-smbtorture: add missing checks for WERROR results in RPC-SAMBA3 tests.

Guenther

commit 8cd63a854e465bba030436038e4644f694f2801a
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 24 13:18:33 2010 +0100

s4-smbtorture: fix some invalid parameters in RPC-SAMSYNC test.

Guenther

---

Summary of changes:
 source4/torture/rpc/samba3rpc.c |   18 +-
 source4/torture/rpc/samsync.c   |8 
 2 files changed, 21 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/torture/rpc/samba3rpc.c b/source4/torture/rpc/samba3rpc.c
index 4de8f67..9ff59e7 100644
--- a/source4/torture/rpc/samba3rpc.c
+++ b/source4/torture/rpc/samba3rpc.c
@@ -2166,6 +2166,12 @@ static struct security_descriptor *get_sharesec(struct 
torture_context *tctx,
talloc_free(tmp_ctx);
return NULL;
}
+   if (!W_ERROR_IS_OK(r.out.result)) {
+   torture_comment(tctx, srvsvc_NetShareGetInfo failed: %s\n,
+win_errstr(r.out.result));
+   talloc_free(tmp_ctx);
+   return NULL;
+   }
 
result = talloc_steal(mem_ctx, info.info502-sd_buf.sd);
talloc_free(tmp_ctx);
@@ -2227,7 +2233,11 @@ static NTSTATUS set_sharesec(struct torture_context 
*tctx,
torture_comment(tctx, srvsvc_NetShareSetInfo failed: %s\n,
 nt_errstr(status));
}
-
+   if (!W_ERROR_IS_OK(r.out.result)) {
+   torture_comment(tctx, srvsvc_NetShareSetInfo failed: %s\n,
+   win_errstr(r.out.result));
+   status = werror_to_ntstatus(r.out.result);
+   }
talloc_free(tmp_ctx);
return status;
 }
@@ -2490,6 +2500,8 @@ static bool find_printers(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx,
dcerpc_srvsvc_NetShareEnum_r(b, tctx, r),
NetShareEnum level 1 failed);
+   torture_assert_werr_ok(tctx, r.out.result,
+   NetShareEnum level 1 failed);
 
*printers = NULL;
*num_printers = 0;
@@ -2766,6 +2778,8 @@ static bool torture_samba3_rpc_wkssvc(struct 
torture_context *torture)
torture_assert_ntstatus_ok(torture,
dcerpc_wkssvc_NetWkstaGetInfo_r(b, torture, r),
dcerpc_wkssvc_NetWksGetInfo failed);
+   torture_assert_werr_ok(torture, r.out.result,
+   dcerpc_wkssvc_NetWksGetInfo failed);
 
torture_assert_str_equal(torture, servername, 
r.out.info-info100-server_name,
servername RAP / DCERPC inconsistency);
@@ -2903,6 +2917,8 @@ static bool test_Open3(struct torture_context *tctx,
torture_assert_ntstatus_ok(tctx,
open_fn(b, tctx, r),
talloc_asprintf(tctx, %s failed, name));
+   torture_assert_werr_ok(tctx, r.out.result,
+   talloc_asprintf(tctx, %s failed, name));
 
enumkeys(tctx, b, handle, 4);
 
diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c
index bf3dba5..0177ca8 100644
--- a/source4/torture/rpc/samsync.c
+++ b/source4/torture/rpc/samsync.c
@@ -494,7 +494,7 @@ static bool samsync_handle_user(struct torture_context 
*tctx, TALLOC_CTX *mem_ct
ret = false;
}
 
-   if (!test_samr_handle_Close(samsync_state-b_samr, mem_ctx, 
user_handle)) {
+   if (!test_samr_handle_Close(samsync_state-b_samr, tctx, user_handle)) 
{
torture_comment(tctx, samr_handle_Close failed - %s\n,
   nt_errstr(nt_status));
ret = false;
@@ -763,7 +763,7 @@ static bool samsync_handle_alias(struct torture_context 
*tctx,
TEST_SEC_DESC_EQUAL(alias-sdbuf, samr, alias_handle);
 
nt_status = dcerpc_samr_QueryAliasInfo_r(samsync_state-b_samr, 
mem_ctx, q);
-   if (!test_samr_handle_Close(samsync_state-b_samr, mem_ctx, 
alias_handle)) {
+   if (!test_samr_handle_Close(samsync_state-b_samr, tctx, 
alias_handle)) {
return false;
}
 
@@ -815,7 +815,7 @@ static bool samsync_handle_group(struct torture_context 
*tctx,
TEST_SEC_DESC_EQUAL(group-sdbuf, samr, group_handle);
 
nt_status = dcerpc_samr_QueryGroupInfo_r(samsync_state-b_samr, 
mem_ctx, q);
-   if 

[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread kamenim
The branch, master has been updated
   via  ef6976d... idl: drsuapi.idl - fix few more comments
   via  9ad8f80... idl: Regenerate DRSUAPI idl files
   via  aa572a4... s4/drs: Pretty print for drsuapi_SecBufferType
   via  842d756... s4/idl: DsAddEntry V3 request description
   via  db02ca6... s4/drs: Implement DsAddEntry V3 error handling
   via  6b3ff0d... s4/idl: Remove drsuapi_DsAddEntryExtraErrorBuffer - it 
is not used anymore
   via  3efad5a... s4/idl: Complete drsuapi_DsAddEntryErrorInfo description
   via  0663799... s4/idl: Add DsAddEntry Referral error definition
   via  61e80fe... s4/idl: Add DsAddEntry Name resolution error definition
   via  04f4ea6... s4/drs: Refactor error handling for DsAddEntry V3 replies
   via  fbaf3b3... s4/drs: pretty print for 
drsuapi_DsAddEntry_AttrErrListItem_V1
   via  98cbcf8... s4/idl: redefine drsuapi_DsAddEntryErrorInfo1
   via  00fce79... s4/drs: drsuapi_DsAddEntry_ErrData propagate structure 
def in source code
   via  7b43416... s4/idl: drsuapi_DsAddEntryError refactored
   via  427a1f3... s4/drs: DsAddEntry - extending error handling for V2 
replies
   via  fbc1528... s4/idl: DsAddEntry - refactor DsAddEntryCtr2 structure
   via  58ddf31... s4/drs: drsuapi_DsAddEntryErrorInfoX changes propagated 
to source code
   via  4cdf462... s4/idl: Update drsuapi_DsAddEntryErrorInfoX definition
   via  818719f... s4/idl: DIRERR error codes definition
   via  05db936... s4/drs: DsAddEntry - Propagating unsigned switches to 
source code
   via  a4ed8dc... s4/idl: DsAddEntry - switch types should be unsigned
  from  fcad135... s4-smbtorture: add missing checks for WERROR results in 
RPC-SAMBA3 tests.

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


- Log -
commit ef6976dad3234b57016f8dce3f1b8e93d3ddb521
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Wed Mar 17 03:27:05 2010 +0200

idl: drsuapi.idl - fix few more comments

commit 9ad8f808f719af1b680013cc26c737730cb53adb
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Wed Mar 17 03:09:09 2010 +0200

idl: Regenerate DRSUAPI idl files

commit aa572a43342c4bb16f5769a9272bef2c6193e58f
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Wed Mar 17 03:08:56 2010 +0200

s4/drs: Pretty print for drsuapi_SecBufferType

It is a type and mask combined in one DRS field so
we have to make a custom ndr_print implementation for this type

commit 842d75613bd2efcefa8b01eafae9fa9e43a3aa45
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Wed Mar 17 03:07:01 2010 +0200

s4/idl: DsAddEntry V3 request description

commit db02ca65a01f218cb5ea2282ad00936409f3cc54
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Mon Mar 15 13:57:41 2010 +0200

s4/drs: Implement DsAddEntry V3 error handling

commit 6b3ff0de465605f8fe2409a91c7b7977efb413dc
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Wed Mar 17 01:20:31 2010 +0200

s4/idl: Remove drsuapi_DsAddEntryExtraErrorBuffer - it is not used anymore

commit 3efad5a6d85ed5ee6db93d7a14e4541bf6bcbf16
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Tue Mar 16 21:58:22 2010 +0200

s4/idl: Complete drsuapi_DsAddEntryErrorInfo description

Members for Security, Service, Update and System errors renamed
to be more descriptive.

All those error types share same description.

commit 0663799275a88739d4813422b3f3f8960ef402f9
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Tue Mar 16 01:30:05 2010 +0200

s4/idl: Add DsAddEntry Referral error definition

commit 61e80fe3eb58179f3ef33ac930b231824f3b15e1
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Sun Mar 14 16:07:49 2010 +0200

s4/idl: Add DsAddEntry Name resolution error definition

commit 04f4ea6ae22f5821ccc80dab04dc2fa17c946f1f
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Fri Mar 12 17:05:58 2010 +0200

s4/drs: Refactor error handling for DsAddEntry V3 replies

Dumping for specific error classes are to be implemented properly
in the near future.

commit fbaf3b3799f6c177eb7b2210b3417fb13b2b97e1
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Fri Mar 12 15:06:19 2010 +0200

s4/drs: pretty print for drsuapi_DsAddEntry_AttrErrListItem_V1

commit 98cbcf809f9a5a5571316a9119c75655924f46f0
Author: Kamen Mazdrashki kamen.mazdras...@postpath.com
Date:   Fri Mar 12 14:55:05 2010 +0200

s4/idl: redefine drsuapi_DsAddEntryErrorInfo1

This actually describes Attribute error during DsAddEntry execution.

Structure is renamed to drsuapi_DsAddEntryErrorInfo_Attr.
And structure to define Attribute error data are all
prefixed with drsuapi_DsAddEntry_AttrErr

commit 00fce797e889eb7b9d8310e18d5264cad5403dd2
Author: Kamen Mazdrashki 

[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Karolin Seeger
The branch, master has been updated
   via  a6bfc1a... s3-testparm: Throw warning when 'workgroup' and 'netbios 
name' are identical.
  from  ef6976d... idl: drsuapi.idl - fix few more comments

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


- Log -
commit a6bfc1a2d0270197ee34405f3ce028a5919f1aaa
Author: Karolin Seeger ksee...@samba.org
Date:   Wed Mar 24 14:55:15 2010 +0100

s3-testparm: Throw warning when 'workgroup' and 'netbios name' are 
identical.

Address bug #7285 (NetBIOS Namespace Clash Handling).

Karolin

---

Summary of changes:
 source3/utils/testparm.c |6 ++
 1 files changed, 6 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/utils/testparm.c b/source3/utils/testparm.c
index 3204de2..73e173e 100644
--- a/source3/utils/testparm.c
+++ b/source3/utils/testparm.c
@@ -77,6 +77,12 @@ cannot be set in the smb.conf file. nmbd will abort with 
this setting.\n);
ret = 1;
}
 
+   if (strequal(lp_workgroup(), global_myname())) {
+   fprintf(stderr, WARNING: 'workgroup' and 'netbios name'  \
+   must differ.\n);
+   ret = 1;
+   }
+
if (!directory_exist_stat(lp_lockdir(), st)) {
fprintf(stderr, ERROR: lock directory %s does not exist\n,
   lp_lockdir());


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Günther Deschner
The branch, master has been updated
   via  3b33fa7... s3:ntlmssp: use c99 types
   via  dee63fe... s3:ntlmssp: use client.netbios_name instead of 
workstation
   via  2dfc78a... s3:ntlmssp: remove unused ntlmssp_set_workstation()
   via  9f895ea... s3:ntlmssp: move sign/seal states to a private 
ntlmssp_crypt_state union
   via  8804dc1... s3:ntlmssp: add const for *sig in ntlmssp_unseal_packet()
   via  9172b4a... s3:ntlmssp: make whole_pdu const for 
ntlmssp_[un]seal_packet()
   via  d0ef97f... s3:ntlmssp: use a 'bool ok' variable to make the code 
more readable
   via  0de3698... s3:ntlmssp: fix some formating
   via  b65e6f0... s3:ntlmssp: inline ntlmssp_weaken_keys()
   via  f0e7e94... s3:ntlmssp: make send_seal_key and recv_seal_key local 
variables
   via  ca2a569... s3:ntlmssp: rename void *auth_context; into void 
*callback_private;
   via  7c42c5d... s3:ntlmssp: add some consts
   via  7c0ea29... s3:ntlmssp: remove unused get_global_myname() and 
get_domain() from ntlmssp_state
   via  7d977da... s3:ntlmssp: pass names and use_ntlmv2 to 
ntlmssp_client_start() and store them
   via  55279df... s3:ntlmssp: remove server_name from ntlmssp_state and 
fill the server.* fields also for the client
   via  eb17809... s3:ntlmssp: pass names to ntlmssp_server_start() and 
store them in ntlmssp_state
   via  eca1186... s3:ntlmssp: replace server_role by a 
server.is_standalone in ntlmssp_state
   via  5338305... s3:ntlmssp: make use of C99 types in ntlmssp_sign.c
   via  c2cc184... s3:ntlmssp: use uint8_t in calc_ntlmv2_key()
   via  25a89b7... s4:ntlmssp: move sign/seal states to a private 
ntlmssp_crypt_state union
   via  598bfdc... s4:ntlmssp: make use of dump_arc4_state()
   via  48d8157... s4:ntlmssp: copy dump_arc4_state() from source3
   via  a692606... s4:ntlmssp: avoid usage of calc_ntlmv2_key_talloc()
   via  00f99a3... s4:ntlmssp: make use of calc_ntlmv2_key() for seal keys
   via  fc120dd... s4:ntlmssp: add calc_ntlmv2_key() from source3
   via  e0c7d9c... s4:ntlmssp: rename calc_ntlmv2_key = 
calc_ntlmv2_key_talloc
   via  c64e6e0... s4:ntlmssp: inline ntlmssp_weakend_keys()
   via  3220c84... s4:ntlmssp: use a 'bool ok' helper variable to make the 
code more readable
   via  e669ee4... s4:ntlmssp: fix some formating
   via  44ce126... s4:ntlmssp: move doing_ntlm2 to ntlmssp_server_auth_state
   via  40395ee... s4:ntlmssp: move NTLM2 session_nonce to 
ntlmssp_server_auth_state
   via  1b20f71... s4:ntlmssp: move encrypted_session_key to 
ntlmssp_server_auth_state
   via  a56ae60... s4:ntlmssp: keep a ntlmssp_server_auth_state to 
transport variables from preauth to postauth hooks
   via  a42cad6... s4:ntlmssp: remove unused 
server_multiple_authentications feature.
   via  d3e7266... s4:ntlmssp: rename gensec_ntlmssp_state = ntlmssp_state
   via  7063338... s4:ntlmssp: split gensec_ntlmssp_unseal_packet() and 
ntlmssp_unseal_packet()
   via  d4c2f25... s4:ntlmssp: split gensec_ntlmssp_seal_packet() and 
ntlmssp_seal_packet()
   via  1564b2a... s4:ntlmssp: split gensec_ntlmssp_check_packet() and 
ntlmssp_check_packet()
   via  23507c0... s4:ntlmssp: split gensec_ntlmssp_sign_packet() and 
ntlmssp_sign_packet()
   via  b47a849... s4:ntlmssp: make user a 'const char *' in 
(gensec_)ntlmssp_state
   via  36669bf... s4:ntlmssp: remove server_name from 
(gensec_)ntlmssp_state and fill the server.* fields also for the client
   via  282a2d8... s4:ntlmssp: calculate server names at startup and store 
them in (gensec_)ntlmssp_state-server.*
   via  133a3e4... s4:ntlmssp: replace server_role by a 
server.is_standalone in (gensec_)ntlmssp_state
   via  c33e72b... s4:ntlmssp: remove more whitespaces...
   via  4ab94f5... s4:ntlmssp: add NTLMSSP_FEATURE_* flags from s3
   via  ee24079... s4:ntlmssp: keep struct gensec_ntlmssp_context in 
gensec_security-private_data
   via  a0522a5... s4:ntlmssp: remove gensec_security from 
(gensec_)ntlmssp_state
   via  32d822a... s4:ntlmssp: remove backend specifix stuff from 
(gensec_)ntlmssp_state
   via  83cc137... s4:ntlmssp: create a gensec_ntlmssp_context between 
gensec_security and ntlmssp_state
   via  8df0170... s4:ntlmssp: add definition of gensec_ntlmssp_context
   via  bd550df... s4:ntlmssp: add a callback_private pointer to 
gensec_ntlmssp_state
  from  a6bfc1a... s3-testparm: Throw warning when 'workgroup' and 'netbios 
name' are identical.

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


- Log -
commit 3b33fa72d6b57d1da807250ed6d5c136990ed415
Author: Stefan Metzmacher me...@samba.org
Date:   Sat Jan 16 09:32:35 2010 +0100

s3:ntlmssp: use c99 types

metze

Signed-off-by: Günther Deschner g...@samba.org

commit dee63fe4ca5d8dad820ff8b5f15edba41e6be65f

[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Günther Deschner
The branch, master has been updated
   via  254d85d... s4-selftest: use correct test names.
  from  3b33fa7... s3:ntlmssp: use c99 types

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


- Log -
commit 254d85d537a57ae3a7f7154987da4049846a85db
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 24 17:37:07 2010 +0100

s4-selftest: use correct test names.

Guenther

---

Summary of changes:
 source4/selftest/tests.sh |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/selftest/tests.sh b/source4/selftest/tests.sh
index 8dd8f2b..253f4f5 100755
--- a/source4/selftest/tests.sh
+++ b/source4/selftest/tests.sh
@@ -144,7 +144,7 @@ fi
 
 # add tests to this list as they start passing, so we test
 # that they stay passing
-ncacn_np_tests=RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-DSSETUP RPC-ALTERCONTEXT 
RPC-MULTIBIND RPC-NETLOGON RPC-HANDLES RPC-SAMSYNC RPC-SAMBA3SESSIONKEY 
RPC-SAMBA3-GETUSERNAME RPC-SAMBA3-LSA RPC-BINDSAMBA3 RPC-NETLOGSAMBA3 
RPC-ASYNCBIND RPC-LSALOOKUP RPC-LSA-GETUSER RPC-SCHANNEL2 RPC-AUTHCONTEXT
+ncacn_np_tests=RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-DSSETUP RPC-ALTERCONTEXT 
RPC-MULTIBIND RPC-NETLOGON RPC-HANDLES RPC-SAMSYNC RPC-SAMBA3-SESSIONKEY 
RPC-SAMBA3-GETUSERNAME RPC-SAMBA3-LSA RPC-SAMBA3-BIND RPC-SAMBA3-NETLOGON 
RPC-ASYNCBIND RPC-LSALOOKUP RPC-LSA-GETUSER RPC-SCHANNEL2 RPC-AUTHCONTEXT
 ncalrpc_tests=RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-DSSETUP RPC-ALTERCONTEXT 
RPC-MULTIBIND RPC-NETLOGON RPC-DRSUAPI RPC-ASYNCBIND RPC-LSALOOKUP 
RPC-LSA-GETUSER RPC-SCHANNEL2 RPC-AUTHCONTEXT
 ncacn_ip_tcp_tests=RPC-SCHANNEL RPC-JOIN RPC-LSA RPC-DSSETUP RPC-ALTERCONTEXT 
RPC-MULTIBIND RPC-NETLOGON RPC-HANDLES RPC-DSSYNC RPC-ASYNCBIND RPC-LSALOOKUP 
RPC-LSA-GETUSER RPC-SCHANNEL2 RPC-AUTHCONTEXT RPC-OBJECTUUID
 slow_ncacn_np_tests=RPC-SAMLOGON RPC-SAMR RPC-SAMR-USERS RPC-SAMR-LARGE-DC 
RPC-SAMR-USERS-PRIVILEGES RPC-SAMR-PASSWORDS RPC-SAMR-PASSWORDS-PWDLASTSET


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Günther Deschner
The branch, master has been updated
   via  bb47e5b... s4-smbtorture: add drsblobs ndr torture test.
   via  fb70368... s4-smbtorture: move up torture_assert_sid_equal at least 
to the torture/ndr level.
  from  254d85d... s4-selftest: use correct test names.

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


- Log -
commit bb47e5b6172ae28f996b132e8b612c752c873adb
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 24 18:08:21 2010 +0100

s4-smbtorture: add drsblobs ndr torture test.

Guenther

commit fb70368a975e6c78c6ce557fc6011569dbdc6d75
Author: Günther Deschner g...@samba.org
Date:   Wed Mar 24 18:29:52 2010 +0100

s4-smbtorture: move up torture_assert_sid_equal at least to the torture/ndr 
level.

Guenther

---

Summary of changes:
 source4/torture/config.mk  |2 +-
 source4/torture/ndr/drsblobs.c |   66 
 source4/torture/ndr/lsa.c  |   11 ---
 source4/torture/ndr/ndr.c  |1 +
 source4/torture/ndr/ndr.h  |   11 +++
 5 files changed, 79 insertions(+), 12 deletions(-)
 create mode 100644 source4/torture/ndr/drsblobs.c


Changeset truncated at 500 lines:

diff --git a/source4/torture/config.mk b/source4/torture/config.mk
index 34df547..56bfa9c 100644
--- a/source4/torture/config.mk
+++ b/source4/torture/config.mk
@@ -95,7 +95,7 @@ mkinclude libsmbclient/config.mk
 [SUBSYSTEM::TORTURE_NDR]
 PRIVATE_DEPENDENCIES = torture SERVICE_SMB
 
-TORTURE_NDR_OBJ_FILES = $(addprefix $(torturesrcdir)/ndr/, ndr.o winreg.o 
atsvc.o lsa.o epmap.o dfs.o netlogon.o drsuapi.o spoolss.o samr.o dfsblob.o)
+TORTURE_NDR_OBJ_FILES = $(addprefix $(torturesrcdir)/ndr/, ndr.o winreg.o 
atsvc.o lsa.o epmap.o dfs.o netlogon.o drsuapi.o spoolss.o samr.o dfsblob.o 
drsblobs.o)
 
 $(eval $(call 
proto_header_template,$(torturesrcdir)/ndr/proto.h,$(TORTURE_NDR_OBJ_FILES:.o=.c)))
 
diff --git a/source4/torture/ndr/drsblobs.c b/source4/torture/ndr/drsblobs.c
new file mode 100644
index 000..2b3e0a8
--- /dev/null
+++ b/source4/torture/ndr/drsblobs.c
@@ -0,0 +1,66 @@
+/*
+   Unix SMB/CIFS implementation.
+   test suite for drsblobs ndr operations
+
+   Copyright (C) Guenther Deschner 2010
+
+   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/.
+*/
+
+#include includes.h
+#include torture/ndr/ndr.h
+#include librpc/gen_ndr/ndr_drsblobs.h
+
+static const uint8_t forest_trust_info_data_out[] = {
+   0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x3e, 0xca, 0xca, 0x01, 0x00, 0xaf, 0xd5, 0x9b,
+   0x00, 0x07, 0x00, 0x00, 0x00, 0x66, 0x32, 0x2e, 0x74, 0x65, 0x73, 0x74,
+   0x3a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0xca, 0xca, 0x01,
+   0x00, 0xaf, 0xd5, 0x9b, 0x02, 0x18, 0x00, 0x00, 0x00, 0x01, 0x04, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x05, 0x15, 0x00, 0x00, 0x00, 0x68, 0x4a, 0x64,
+   0x28, 0xac, 0x88, 0xa2, 0x74, 0x17, 0x3e, 0x2d, 0x8f, 0x07, 0x00, 0x00,
+   0x00, 0x66, 0x32, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x02, 0x00, 0x00, 0x00,
+   0x46, 0x32
+};
+
+static bool forest_trust_info_check_out(struct torture_context *tctx,
+   struct ForestTrustInfo *r)
+{
+   torture_assert_int_equal(tctx, r-version, 1, version);
+   torture_assert_int_equal(tctx, r-count, 2, count);
+   torture_assert_int_equal(tctx, r-records[0].record_size, 0x0018, 
record size);
+   torture_assert_int_equal(tctx, r-records[0].record.flags, 0, record 
flags);
+   torture_assert_u64_equal(tctx, r-records[0].record.timestamp, 
0x9BD5AF0001CACA3E, record timestamp);
+   torture_assert_int_equal(tctx, r-records[0].record.type, 
FOREST_TRUST_TOP_LEVEL_NAME, record type);
+   torture_assert_str_equal(tctx, r-records[0].record.data.name, 
f2.test, record name);
+   torture_assert_int_equal(tctx, r-records[1].record_size, 0x003a, 
record size);
+   torture_assert_int_equal(tctx, r-records[1].record.flags, 0, record 
flags);
+   torture_assert_u64_equal(tctx, r-records[1].record.timestamp, 
0x9BD5AF0001CACA3E, record timestamp);
+   torture_assert_int_equal(tctx, r-records[1].record.type, 
FOREST_TRUST_DOMAIN_INFO, record type);
+   

[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Jeremy Allison
The branch, master has been updated
   via  eb8e184... Fix bug #7283 - vfs_acl_tdb does not work as expected.
   via  c5f6789... Fix valgrind warning when source and dest stat are 
identical.
  from  bb47e5b... s4-smbtorture: add drsblobs ndr torture test.

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


- Log -
commit eb8e18476c198705a19d375e2f949c6c6df73612
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 24 10:31:43 2010 -0700

Fix bug #7283 - vfs_acl_tdb does not work as expected.

both vfs_acl_common.c and vfs_acl_tdb.c were using the connection
handle, thus conflicted. Fix this.

Jeremy.

commit c5f67891528698e3848c7fc464bf1755c56b4477
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 24 10:31:14 2010 -0700

Fix valgrind warning when source and dest stat are identical.

Jeremy.

---

Summary of changes:
 source3/modules/vfs_acl_tdb.c |   48 -
 source3/smbd/posix_acls.c |4 ++-
 2 files changed, 17 insertions(+), 35 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_acl_tdb.c b/source3/modules/vfs_acl_tdb.c
index bfed0eb..8da0d1e 100644
--- a/source3/modules/vfs_acl_tdb.c
+++ b/source3/modules/vfs_acl_tdb.c
@@ -37,12 +37,11 @@ static struct db_context *acl_db;
  Open acl_db if not already open, increment ref count.
 ***/
 
-static bool acl_tdb_init(struct db_context **pp_db)
+static bool acl_tdb_init(void)
 {
char *dbname;
 
if (acl_db) {
-   *pp_db = acl_db;
ref_count++;
return true;
}
@@ -55,10 +54,10 @@ static bool acl_tdb_init(struct db_context **pp_db)
}
 
become_root();
-   *pp_db = db_open(NULL, dbname, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
+   acl_db = db_open(NULL, dbname, 0, TDB_DEFAULT, O_RDWR|O_CREAT, 0600);
unbecome_root();
 
-   if (*pp_db == NULL) {
+   if (acl_db == NULL) {
 #if defined(ENOTSUP)
errno = ENOTSUP;
 #else
@@ -77,14 +76,12 @@ static bool acl_tdb_init(struct db_context **pp_db)
  Lower ref count and close acl_db if zero.
 ***/
 
-static void free_acl_tdb_data(void **pptr)
+static void disconnect_acl_tdb(struct vfs_handle_struct *handle)
 {
-   struct db_context **pp_db = (struct db_context **)pptr;
-
+   SMB_VFS_NEXT_DISCONNECT(handle);
ref_count--;
if (ref_count == 0) {
-   TALLOC_FREE(*pp_db);
-   acl_db = NULL;
+   TALLOC_FREE(acl_db);
}
 }
 
@@ -146,13 +143,10 @@ static NTSTATUS get_acl_blob(TALLOC_CTX *ctx,
uint8 id_buf[16];
TDB_DATA data;
struct file_id id;
-   struct db_context *db;
+   struct db_context *db = acl_db;
NTSTATUS status = NT_STATUS_OK;
SMB_STRUCT_STAT sbuf;
 
-   SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context,
-   return NT_STATUS_INTERNAL_DB_CORRUPTION);
-
ZERO_STRUCT(sbuf);
 
if (fsp) {
@@ -204,16 +198,13 @@ static NTSTATUS store_acl_blob_fsp(vfs_handle_struct 
*handle,
uint8 id_buf[16];
struct file_id id;
TDB_DATA data;
-   struct db_context *db;
+   struct db_context *db = acl_db;
struct db_record *rec;
NTSTATUS status;
 
DEBUG(10,(store_acl_blob_fsp: storing blob length %u on file %s\n,
  (unsigned int)pblob-length, fsp_str_dbg(fsp)));
 
-   SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context,
-   return NT_STATUS_INTERNAL_DB_CORRUPTION);
-
status = vfs_stat_fsp(fsp);
if (!NT_STATUS_IS_OK(status)) {
return status;
@@ -243,12 +234,10 @@ static int unlink_acl_tdb(vfs_handle_struct *handle,
  const struct smb_filename *smb_fname)
 {
struct smb_filename *smb_fname_tmp = NULL;
-   struct db_context *db;
+   struct db_context *db = acl_db;
NTSTATUS status;
int ret = -1;
 
-   SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);
-
status = copy_smb_filename(talloc_tos(), smb_fname, smb_fname_tmp);
if (!NT_STATUS_IS_OK(status)) {
errno = map_errno_from_nt_status(status);
@@ -284,11 +273,9 @@ static int rmdir_acl_tdb(vfs_handle_struct *handle, const 
char *path)
 {
 
SMB_STRUCT_STAT sbuf;
-   struct db_context *db;
+   struct db_context *db = acl_db;
int ret = -1;
 
-   SMB_VFS_HANDLE_GET_DATA(handle, db, struct db_context, return -1);
-
if (lp_posix_pathnames()) {
ret = vfs_lstat_smb_fname(handle-conn, path, sbuf);
} else {
@@ -316,21 +303,17 @@ static int connect_acl_tdb(struct vfs_handle_struct 

[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Jeremy Allison
The branch, master has been updated
   via  c2d1b01... Missing include guard in 
source4/libcli/security/security.h
  from  eb8e184... Fix bug #7283 - vfs_acl_tdb does not work as expected.

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


- Log -
commit c2d1b01103d63f52c773c83eec52633b7f2032cc
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 24 12:20:03 2010 -0700

Missing include guard in source4/libcli/security/security.h

Jeremy.

---

Summary of changes:
 source4/libcli/security/security.h |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/libcli/security/security.h 
b/source4/libcli/security/security.h
index 2870c41..e3fdb0c 100644
--- a/source4/libcli/security/security.h
+++ b/source4/libcli/security/security.h
@@ -17,6 +17,9 @@
along with this program.  If not, see http://www.gnu.org/licenses/.
 */
 
+#ifndef _LIBCLI_SECURITY_SECURITY_H_
+#define _LIBCLI_SECURITY_SECURITY_H_
+
 #include librpc/gen_ndr/security.h
 
 enum security_user_level {
@@ -43,3 +46,5 @@ struct object_tree {
 #include libcli/security/proto.h
 #include libcli/security/security_descriptor.h
 #include libcli/security/sddl.h
+
+#endif


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Jeremy Allison
The branch, master has been updated
   via  66b7fcc... Fix bug #7233 - print fails with jobs 4GB from Win7 
clients.
  from  c2d1b01... Missing include guard in 
source4/libcli/security/security.h

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


- Log -
commit 66b7fcc8ef6b43c219dcae43a68d861cf71b80fa
Author: Jeremy Allison j...@samba.org
Date:   Wed Mar 24 12:47:01 2010 -0700

Fix bug #7233 - print fails with jobs 4GB from Win7 clients.

Ensure we always write at end-of-file for older write calls.

Jeremy.

---

Summary of changes:
 source3/smbd/reply.c |   78 ++
 1 files changed, 53 insertions(+), 25 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index 43af338..5cb4220 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -3803,6 +3803,11 @@ void reply_writebraw(struct smb_request *req)
startpos = IVAL_TO_SMB_OFF_T(req-vwv+3, 0);
write_through = BITSETW(req-vwv+7,0);
 
+   if (fsp-print_file) {
+   /* Print files ignore the offset - use end of file. */
+   startpos = (SMB_OFF_T)-1;
+   }
+
/* We have to deal with slightly different formats depending
on whether we are using the core+ or lanman1.0 protocol */
 
@@ -3822,15 +3827,17 @@ void reply_writebraw(struct smb_request *req)
return;
}
 
-   init_strict_lock_struct(fsp, (uint32)req-smbpid,
-   (uint64_t)startpos, (uint64_t)tcount, WRITE_LOCK,
-   lock);
+   if (!fsp-print_file) {
+   init_strict_lock_struct(fsp, (uint32)req-smbpid,
+   (uint64_t)startpos, (uint64_t)tcount, WRITE_LOCK,
+   lock);
 
-   if (!SMB_VFS_STRICT_LOCK(conn, fsp, lock)) {
-   reply_nterror(req, NT_STATUS_FILE_LOCK_CONFLICT);
-   error_to_writebrawerr(req);
-   END_PROFILE(SMBwritebraw);
-   return;
+   if (!SMB_VFS_STRICT_LOCK(conn, fsp, lock)) {
+   reply_nterror(req, NT_STATUS_FILE_LOCK_CONFLICT);
+   error_to_writebrawerr(req);
+   END_PROFILE(SMBwritebraw);
+   return;
+   }
}
 
if (numtowrite0) {
@@ -3909,7 +3916,11 @@ void reply_writebraw(struct smb_request *req)
exit_server_cleanly(secondary writebraw failed);
}
 
-   nwritten = 
write_file(req,fsp,buf+4,startpos+nwritten,numtowrite);
+   if (fsp-print_file) {
+   nwritten = 
write_file(req,fsp,buf+4,(SMB_OFF_T)-1,numtowrite);
+   } else {
+   nwritten = 
write_file(req,fsp,buf+4,startpos+nwritten,numtowrite);
+   }
if (nwritten == -1) {
TALLOC_FREE(buf);
reply_nterror(req, map_nt_error_from_unix(errno));
@@ -3944,7 +3955,9 @@ void reply_writebraw(struct smb_request *req)
fsp-fnum, (double)startpos, (int)numtowrite,
(int)total_written));
 
-   SMB_VFS_STRICT_UNLOCK(conn, fsp, lock);
+   if (!fsp-print_file) {
+   SMB_VFS_STRICT_UNLOCK(conn, fsp, lock);
+   }
 
/* We won't return a status if write through is not selected - this
 * follows what WfWg does */
@@ -3968,7 +3981,9 @@ void reply_writebraw(struct smb_request *req)
return;
 
 strict_unlock:
-   SMB_VFS_STRICT_UNLOCK(conn, fsp, lock);
+   if (!fsp-print_file) {
+   SMB_VFS_STRICT_UNLOCK(conn, fsp, lock);
+   }
 
END_PROFILE(SMBwritebraw);
return;
@@ -4018,7 +4033,10 @@ void reply_writeunlock(struct smb_request *req)
startpos = IVAL_TO_SMB_OFF_T(req-vwv+2, 0);
data = (const char *)req-buf + 3;
 
-   if (numtowrite) {
+   if (fsp-print_file) {
+   /* Print files ignore the offset - use end of file. */
+   startpos = (SMB_OFF_T)-1;
+   } else if (numtowrite) {
init_strict_lock_struct(fsp, (uint32)req-smbpid,
(uint64_t)startpos, (uint64_t)numtowrite, WRITE_LOCK,
lock);
@@ -4058,7 +4076,7 @@ void reply_writeunlock(struct smb_request *req)
goto strict_unlock;
}
 
-   if (numtowrite) {
+   if (numtowrite  !fsp-print_file) {
status = do_unlock(smbd_messaging_context(),
fsp,
req-smbpid,
@@ -4080,7 +4098,7 @@ void reply_writeunlock(struct smb_request *req)
 fsp-fnum, (int)numtowrite, (int)nwritten));
 
 strict_unlock:
-   if (numtowrite) {
+   if (numtowrite  !fsp-print_file) {

[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Günther Deschner
The branch, master has been updated
   via  34674e0... s3-selftest: move printing config to global section.
   via  f84f653... s3-selftest: move printing config to global section.
   via  426cb9b... s4-smbtorture: add print test to RPC-SPOOLSS-PRINTER as 
well.
   via  6913c57... s4-smbtorture: create several printjobs during print 
test in RPC-SPOOLSS.
   via  27c5025... s4-smbtorture: mention job id in GetJob test output in 
RPC-SPOOLSS.
   via  1bb8341... s4-smbtorture: mention job id in SetJob test output in 
RPC-SPOOLSS.
  from  66b7fcc... Fix bug #7233 - print fails with jobs 4GB from Win7 
clients.

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


- Log -
commit 34674e0a61fe5b2983176e8c33aa48d43fd840ce
Author: Günther Deschner g...@samba.org
Date:   Thu Mar 25 00:55:32 2010 +0100

s3-selftest: move printing config to global section.

make test variant.

Guenther

commit f84f65306613d2794b14b3eaeba59fe3ca5751cb
Author: Günther Deschner g...@samba.org
Date:   Thu Mar 25 00:55:13 2010 +0100

s3-selftest: move printing config to global section.

Guenther

commit 426cb9be1c882fea5a22475107aad05e8d0e124e
Author: Günther Deschner g...@samba.org
Date:   Thu Mar 25 00:49:38 2010 +0100

s4-smbtorture: add print test to RPC-SPOOLSS-PRINTER as well.

Guenther

commit 6913c57b2f22550102e7fcea75d12c99db1776f7
Author: Günther Deschner g...@samba.org
Date:   Thu Mar 25 00:37:45 2010 +0100

s4-smbtorture: create several printjobs during print test in RPC-SPOOLSS.

Guenther

commit 27c50255f6b05ff68301a3a32c1ede58626cac2c
Author: Günther Deschner g...@samba.org
Date:   Thu Mar 25 00:48:55 2010 +0100

s4-smbtorture: mention job id in GetJob test output in RPC-SPOOLSS.

Guenther

commit 1bb8341871a6d91ec6b2e826c2cbcb395cba13ee
Author: Günther Deschner g...@samba.org
Date:   Thu Mar 25 00:33:35 2010 +0100

s4-smbtorture: mention job id in SetJob test output in RPC-SPOOLSS.

Guenther

---

Summary of changes:
 selftest/target/Samba3.pm|   17 
 source3/script/tests/selftest.sh |   17 
 source4/torture/rpc/spoolss.c|   77 ++---
 3 files changed, 72 insertions(+), 39 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index 94c2f95..be34d94 100644
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -535,6 +535,15 @@ sub provision($$)
create mask = 755
vfs objects = $bindir_abs/xattr_tdb.so $bindir_abs/streams_depot.so
 
+   printing = vlp
+   print command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb print %p %s
+   lpq command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb lpq %p
+   lp rm command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb lprm %p %j
+   lp pause command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb lppause %p 
%j
+   lp resume command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb lpresume 
%p %j
+   queue pause command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb 
queuepause %p
+   queue resume command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb 
queueresume %p
+
# Begin extra options
$extra_options
# End extra options
@@ -558,14 +567,6 @@ sub provision($$)
 [print1]
copy = tmp
printable = yes
-   printing = vlp
-   print command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb print %p %s
-   lpq command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb lpq %p
-   lp rm command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb lprm %p %j
-   lp pause command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb lppause %p 
%j
-   lp resume command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb lpresume 
%p %j
-   queue pause command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb 
queuepause %p
-   queue resume command = $bindir_abs/vlp tdbfile=$lockdir/vlp.tdb 
queueresume %p
 
 [print2]
copy = print1
diff --git a/source3/script/tests/selftest.sh b/source3/script/tests/selftest.sh
index d06af60..40ada28 100755
--- a/source3/script/tests/selftest.sh
+++ b/source3/script/tests/selftest.sh
@@ -307,6 +307,15 @@ cat $SERVERCONFFILEEOF
create mask = 755
vfs objects = $BINDIR/xattr_tdb.so $BINDIR/streams_depot.so
 
+   printing = vlp
+   print command = $BINDIR/vlp tdbfile=$LOCKDIR/vlp.tdb print %p %s
+   lpq command = $BINDIR/vlp tdbfile=$LOCKDIR/vlp.tdb lpq %p
+   lp rm command = $BINDIR/vlp tdbfile=$LOCKDIR/vlp.tdb lprm %p %j
+   lp pause command = $BINDIR/vlp tdbfile=$LOCKDIR/vlp.tdb lppause %p %j
+   lp resume command = $BINDIR/vlp tdbfile=$LOCKDIR/vlp.tdb lpresume %p %j
+   queue pause command = $BINDIR/vlp tdbfile=$LOCKDIR/vlp.tdb queuepause %p
+   queue resume command = $BINDIR/vlp 

[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Jeremy Allison
The branch, master has been updated
   via  845c228... Fix bug #7269 - Job management commands don't work for 
CUPS queues.
  from  34674e0... s3-selftest: move printing config to global section.

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


- Log -
commit 845c2281c7513bd3139a8f50b593658b32dbdb31
Author: Michael Karcher sa...@mkarcher.dialup.fu-berlin.de
Date:   Wed Mar 24 17:33:21 2010 -0700

Fix bug #7269 - Job management commands don't work for CUPS queues.

Samba needs to retrieve pjob-sysjob from the CUPS response (as
is done in the iprint backend).

---

Summary of changes:
 source3/printing/print_cups.c |   10 +-
 1 files changed, 9 insertions(+), 1 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/printing/print_cups.c b/source3/printing/print_cups.c
index 804173f..fc1f52a 100644
--- a/source3/printing/print_cups.c
+++ b/source3/printing/print_cups.c
@@ -905,6 +905,7 @@ static int cups_job_submit(int snum, struct printjob *pjob)
http_t  *http = NULL;   /* HTTP connection to server */
ipp_t   *request = NULL,/* IPP Request */
*response = NULL;   /* IPP Response */
+   ipp_attribute_t *attr_job_id = NULL;/* IPP Attribute job-id */
cups_lang_t *language = NULL;   /* Default language */
charuri[HTTP_MAX_URI]; /* printer-uri attribute */
const char  *clientname = NULL; /* hostname of client for 
job-originating-host attribute */
@@ -919,7 +920,7 @@ static int cups_job_submit(int snum, struct printjob *pjob)
size_t size;
char addr[INET6_ADDRSTRLEN];
 
-   DEBUG(5,(cups_job_submit(%d, %p (%d))\n, snum, pjob, pjob-sysjob));
+   DEBUG(5,(cups_job_submit(%d, %p)\n, snum, pjob));
 
/*
 * Make sure we don't ask for passwords...
@@ -1026,6 +1027,13 @@ static int cups_job_submit(int snum, struct printjob 
*pjob)
 ippErrorString(cupsLastError(;
} else {
ret = 0;
+   attr_job_id = ippFindAttribute(response, job-id, 
IPP_TAG_INTEGER);
+   if(attr_job_id) {
+   pjob-sysjob = attr_job_id-values[0].integer;
+   DEBUG(5,(cups_job_submit: job-id %d\n, 
pjob-sysjob));
+   } else {
+   DEBUG(0,(Missing job-id attribute in IPP 
response));
+   }
}
} else {
DEBUG(0,(Unable to print file to `%s' - %s\n, 
PRINTERNAME(snum),


-- 
Samba Shared Repository


[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Andrew Tridgell
The branch, master has been updated
   via  088096d... python: use '#!/usr/bin/env python' to cope with varying 
install locations
  from  845c228... Fix bug #7269 - Job management commands don't work for 
CUPS queues.

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


- Log -
commit 088096d1bad51428a2e2d487214995d4fdfc7ccc
Author: Andrew Tridgell tri...@samba.org
Date:   Wed Mar 24 16:50:50 2010 +1100

python: use '#!/usr/bin/env python' to cope with varying install locations

this should be much more portable

---

Summary of changes:
 lib/subunit/python/subunit/run.py  |2 +-
 lib/tdb/python/tdbdump.py  |2 +-
 lib/tdb/python/tests/simple.py |2 +-
 source4/lib/ldb/tests/python/acl.py|2 +-
 source4/lib/ldb/tests/python/api.py|2 +-
 source4/lib/ldb/tests/python/deletetest.py |2 +-
 source4/lib/ldb/tests/python/ldap.py   |2 +-
 source4/lib/ldb/tests/python/ldap_schema.py|2 +-
 source4/lib/ldb/tests/python/sec_descriptor.py |2 +-
 source4/lib/ldb/tests/python/urgent_replication.py |2 +-
 source4/lib/messaging/tests/bindings.py|2 +-
 source4/lib/registry/tests/bindings.py |2 +-
 source4/libcli/security/tests/bindings.py  |2 +-
 source4/scripting/bin/autoidl  |2 +-
 source4/scripting/bin/enablerecyclebin |2 +-
 source4/scripting/bin/fullschema   |2 +-
 source4/scripting/bin/get-descriptors  |2 +-
 source4/scripting/bin/machineaccountccache |2 +-
 source4/scripting/bin/minschema|2 +-
 source4/scripting/bin/rebuildextendeddn|2 +-
 source4/scripting/bin/rpcclient|2 +-
 source4/scripting/bin/samba3dump   |2 +-
 source4/scripting/bin/samba_dnsupdate  |2 +-
 source4/scripting/bin/smbstatus|2 +-
 source4/scripting/bin/subunitrun   |2 +-
 source4/scripting/bin/upgradeprovision |2 +-
 source4/scripting/bin/w32err_code.py   |2 +-
 source4/scripting/devel/ldapcmp|2 +-
 source4/setup/provision|2 +-
 source4/setup/upgrade_from_s3  |2 +-
 30 files changed, 30 insertions(+), 30 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/subunit/python/subunit/run.py 
b/lib/subunit/python/subunit/run.py
index 01c0b0e..e57939f 100755
--- a/lib/subunit/python/subunit/run.py
+++ b/lib/subunit/python/subunit/run.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 #
 # Simple subunit testrunner for python
 # Copyright (C) Jelmer Vernooij jel...@samba.org 2007
diff --git a/lib/tdb/python/tdbdump.py b/lib/tdb/python/tdbdump.py
index d759d77..01859eb 100644
--- a/lib/tdb/python/tdbdump.py
+++ b/lib/tdb/python/tdbdump.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # Trivial reimplementation of tdbdump in Python
 
 import tdb, sys
diff --git a/lib/tdb/python/tests/simple.py b/lib/tdb/python/tests/simple.py
index c7443c0..1c5982b 100644
--- a/lib/tdb/python/tests/simple.py
+++ b/lib/tdb/python/tests/simple.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # Some simple tests for the Python bindings for TDB
 # Note that this tests the interface of the Python bindings
 # It does not test tdb itself.
diff --git a/source4/lib/ldb/tests/python/acl.py 
b/source4/lib/ldb/tests/python/acl.py
index 0613689..e4c531a 100755
--- a/source4/lib/ldb/tests/python/acl.py
+++ b/source4/lib/ldb/tests/python/acl.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 # This is unit with tests for LDAP access checks
 
diff --git a/source4/lib/ldb/tests/python/api.py 
b/source4/lib/ldb/tests/python/api.py
index 956908d..001739b 100755
--- a/source4/lib/ldb/tests/python/api.py
+++ b/source4/lib/ldb/tests/python/api.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # Simple tests for the ldb python bindings.
 # Copyright (C) 2007 Jelmer Vernooij jel...@samba.org
 
diff --git a/source4/lib/ldb/tests/python/deletetest.py 
b/source4/lib/ldb/tests/python/deletetest.py
index 3fe28a3..13bec7e 100755
--- a/source4/lib/ldb/tests/python/deletetest.py
+++ b/source4/lib/ldb/tests/python/deletetest.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 
 import getopt
diff --git a/source4/lib/ldb/tests/python/ldap.py 
b/source4/lib/ldb/tests/python/ldap.py
index 6d01fcd..5e84030 100755
--- a/source4/lib/ldb/tests/python/ldap.py
+++ b/source4/lib/ldb/tests/python/ldap.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 # 

[SCM] Samba Shared Repository - branch master updated

2010-03-24 Thread Andrew Tridgell
The branch, master has been updated
   via  6199ae4... s4-ldb: fixed command line parsing in oLschema2ldif
   via  3b29f9c... s4-ldb: removed unused command line options -I and -O
   via  8e1d947... s4-drs: If we are a RODC then do not send DSReplicaSync 
messages
  from  088096d... python: use '#!/usr/bin/env python' to cope with varying 
install locations

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


- Log -
commit 6199ae474589f24180002a22f9c197ab973447b7
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Mar 25 15:45:08 2010 +1100

s4-ldb: fixed command line parsing in oLschema2ldif

It really doesn't make sense to use the ldb command line code

commit 3b29f9c66e68abff8c49390d97b71b4762d28417
Author: Andrew Tridgell tri...@samba.org
Date:   Thu Mar 25 15:06:40 2010 +1100

s4-ldb: removed unused command line options -I and -O

These are not used anywehere, so they just confuse people

Pair-Programmed-With: Andrew Bartlett abart...@samba.org

commit 8e1d94778702ac2ab18983abac630957d8782cf6
Author: Fernando J V da Silva fernandojvsi...@yahoo.com.br
Date:   Wed Mar 24 13:02:36 2010 -0300

s4-drs: If we are a RODC then do not send DSReplicaSync messages

---

Summary of changes:
 source4/dsdb/repl/drepl_service.c |   19 ++
 source4/lib/ldb/tools/cmdline.c   |2 -
 source4/lib/ldb/tools/cmdline.h   |2 -
 source4/utils/oLschema2ldif.c |   70 +++--
 4 files changed, 62 insertions(+), 31 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source4/dsdb/repl/drepl_service.c 
b/source4/dsdb/repl/drepl_service.c
index 3ed5885..4196f94 100644
--- a/source4/dsdb/repl/drepl_service.c
+++ b/source4/dsdb/repl/drepl_service.c
@@ -193,14 +193,17 @@ static void dreplsrv_task_init(struct task_server *task)
return;
}
 
-   service-notify.interval = lp_parm_int(task-lp_ctx, NULL, dreplsrv, 
-  notify_interval, 5); /* in 
seconds */
-   status = dreplsrv_notify_schedule(service, service-notify.interval);
-   if (!W_ERROR_IS_OK(status)) {
-   task_server_terminate(task, talloc_asprintf(task,
- dreplsrv: Failed to setup notify 
schedule: %s\n,
-   
win_errstr(status)), true);
-   return;
+   /* if we are a RODC then we do not send DSReplicaSync*/
+   if (!samdb_rodc(service-samdb)) {
+   service-notify.interval = lp_parm_int(task-lp_ctx, NULL, 
dreplsrv,
+  notify_interval, 
5); /* in seconds */
+   status = dreplsrv_notify_schedule(service, 
service-notify.interval);
+   if (!W_ERROR_IS_OK(status)) {
+   task_server_terminate(task, talloc_asprintf(task,
+ dreplsrv: Failed to setup 
notify schedule: %s\n,
+   
win_errstr(status)), true);
+   return;
+   }
}
 
irpc_add_name(task-msg_ctx, dreplsrv);
diff --git a/source4/lib/ldb/tools/cmdline.c b/source4/lib/ldb/tools/cmdline.c
index 869d5ca..180923f 100644
--- a/source4/lib/ldb/tools/cmdline.c
+++ b/source4/lib/ldb/tools/cmdline.c
@@ -56,8 +56,6 @@ static struct poptOption popt_options[] = {
{ all, 'a',POPT_ARG_NONE, options.all_records, 0, 
(|(objectClass=*)(distinguishedName=*)), NULL },
{ nosync, 0,   POPT_ARG_NONE, options.nosync, 0, non-synchronous 
transactions, NULL },
{ sorted, 'S', POPT_ARG_NONE, options.sorted, 0, sort attributes, 
NULL },
-   { input, 'I', POPT_ARG_STRING, options.input, 0, Input File, 
Input },
-   { output, 'O', POPT_ARG_STRING, options.output, 0, Output File, 
Output },
{ 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 },
diff --git a/source4/lib/ldb/tools/cmdline.h b/source4/lib/ldb/tools/cmdline.h
index 52e7ece..e82b2ee 100644
--- a/source4/lib/ldb/tools/cmdline.h
+++ b/source4/lib/ldb/tools/cmdline.h
@@ -41,8 +41,6 @@ struct ldb_cmdline {
int num_records;
int num_searches;
const char *sasl_mechanism;
-   const char *input;
-   const char *output;
const char **controls;
int show_binary;
int tracing;
diff --git a/source4/utils/oLschema2ldif.c b/source4/utils/oLschema2ldif.c
index 077987a..29ed3bd 100644
--- a/source4/utils/oLschema2ldif.c
+++ b/source4/utils/oLschema2ldif.c
@@ -37,6 +37,7 @@
 #include dsdb/samdb/samdb.h
 #include