svn commit: samba r25315 - in branches/SAMBA_4_0/source/libnet: .

2007-09-25 Thread mimir
Author: mimir
Date: 2007-09-25 05:59:57 + (Tue, 25 Sep 2007)
New Revision: 25315

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25315

Log:
Revert my last change until I find out what's causing the
problem spotted by the builfarm.


rafal


Modified:
   branches/SAMBA_4_0/source/libnet/userman.c


Changeset:
Sorry, the patch is too large (900 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25315


svn commit: samba r25316 - in branches/SAMBA_4_0: . source/librpc/ndr source/librpc/rpc

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-25 16:05:08 + (Tue, 25 Sep 2007)
New Revision: 25316

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25316

Log:
Remove last few instances of old BOOL type in librpc/.
Modified:
   branches/SAMBA_4_0/
   branches/SAMBA_4_0/source/librpc/ndr/ndr.c
   branches/SAMBA_4_0/source/librpc/ndr/ndr_drsuapi.c
   branches/SAMBA_4_0/source/librpc/ndr/ndr_table.c
   branches/SAMBA_4_0/source/librpc/ndr/uuid.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_auth.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_connect.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_smb.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_smb2.c
   branches/SAMBA_4_0/source/librpc/rpc/dcerpc_sock.c


Changeset:

Property changes on: branches/SAMBA_4_0
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c
===
--- branches/SAMBA_4_0/source/librpc/ndr/ndr.c  2007-09-25 05:59:57 UTC (rev 
25315)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr.c  2007-09-25 16:05:08 UTC (rev 
25316)
@@ -572,7 +572,7 @@
   retrieve a token from a ndr context, using cmp_fn to match the tokens
 */
 _PUBLIC_ NTSTATUS ndr_token_retrieve_cmp_fn(struct ndr_token_list **list, 
const void *key, uint32_t *v,
-  comparison_fn_t _cmp_fn, BOOL _remove_tok)
+  comparison_fn_t _cmp_fn, bool _remove_tok)
 {
struct ndr_token_list *tok;
for (tok=*list;tok;tok=tok-next) {
@@ -594,7 +594,7 @@
 */
 _PUBLIC_ NTSTATUS ndr_token_retrieve(struct ndr_token_list **list, const void 
*key, uint32_t *v)
 {
-   return ndr_token_retrieve_cmp_fn(list, key, v, NULL, True);
+   return ndr_token_retrieve_cmp_fn(list, key, v, NULL, true);
 }
 
 /*
@@ -604,7 +604,7 @@
 {
NTSTATUS status;
uint32_t v;
-   status = ndr_token_retrieve_cmp_fn(list, key, v, NULL, False);
+   status = ndr_token_retrieve_cmp_fn(list, key, v, NULL, false);
if (NT_STATUS_IS_OK(status)) return v;
return 0;
 }

Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_drsuapi.c
===
--- branches/SAMBA_4_0/source/librpc/ndr/ndr_drsuapi.c  2007-09-25 05:59:57 UTC 
(rev 25315)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr_drsuapi.c  2007-09-25 16:05:08 UTC 
(rev 25316)
@@ -64,17 +64,17 @@
 }
 
 #define _OID_PUSH_CHECK(call) do { \
-   BOOL _status; \
+   bool _status; \
_status = call; \
-   if (_status != True) { \
+   if (_status != true) { \
return ndr_push_error(ndr, NDR_ERR_SUBCONTEXT, OID Conversion 
Error: %s\n, __location__); \
} \
 } while (0)
 
 #define _OID_PULL_CHECK(call) do { \
-   BOOL _status; \
+   bool _status; \
_status = call; \
-   if (_status != True) { \
+   if (_status != true) { \
return ndr_pull_error(ndr, NDR_ERR_SUBCONTEXT, OID Conversion 
Error: %s\n, __location__); \
} \
 } while (0)

Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_table.c
===
--- branches/SAMBA_4_0/source/librpc/ndr/ndr_table.c2007-09-25 05:59:57 UTC 
(rev 25315)
+++ branches/SAMBA_4_0/source/librpc/ndr/ndr_table.c2007-09-25 16:05:08 UTC 
(rev 25316)
@@ -123,10 +123,10 @@
 
 NTSTATUS ndr_table_init(void)
 {
-   static BOOL initialized = False;
+   static bool initialized = false;
 
if (initialized) return NT_STATUS_OK;
-   initialized = True;
+   initialized = true;
 
ndr_table_register_builtin_tables();
 

Modified: branches/SAMBA_4_0/source/librpc/ndr/uuid.c
===
--- branches/SAMBA_4_0/source/librpc/ndr/uuid.c 2007-09-25 05:59:57 UTC (rev 
25315)
+++ branches/SAMBA_4_0/source/librpc/ndr/uuid.c 2007-09-25 16:05:08 UTC (rev 
25316)
@@ -133,7 +133,7 @@
return guid;
 }
 
-_PUBLIC_ BOOL GUID_all_zero(const struct GUID *u)
+_PUBLIC_ bool GUID_all_zero(const struct GUID *u)
 {
if (u-time_low != 0 ||
u-time_mid != 0 ||
@@ -141,12 +141,12 @@
u-clock_seq[0] != 0 ||
u-clock_seq[1] != 0 ||
!all_zero(u-node, 6)) {
-   return False;
+   return false;
}
-   return True;
+   return true;
 }
 
-_PUBLIC_ BOOL GUID_equal(const struct GUID *u1, const struct GUID *u2)
+_PUBLIC_ bool GUID_equal(const struct GUID *u1, const struct GUID *u2)
 {
if (u1-time_low != u2-time_low ||
u1-time_mid != u2-time_mid ||
@@ -154,9 +154,9 @@
u1-clock_seq[0] != u2-clock_seq[0] ||
u1-clock_seq[1] != u2-clock_seq[1] ||
memcmp(u1-node, u2-node, 6) != 0) {
-

svn commit: samba r25317 - in branches: SAMBA_3_2/source/script/tests SAMBA_3_2_0/source/script/tests

2007-09-25 Thread vlendec
Author: vlendec
Date: 2007-09-25 16:42:53 + (Tue, 25 Sep 2007)
New Revision: 25317

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25317

Log:
Activate raw-samba3rootdirfid

Modified:
   branches/SAMBA_3_2/source/script/tests/test_posix_s3.sh
   branches/SAMBA_3_2_0/source/script/tests/test_posix_s3.sh


Changeset:
Modified: branches/SAMBA_3_2/source/script/tests/test_posix_s3.sh
===
--- branches/SAMBA_3_2/source/script/tests/test_posix_s3.sh 2007-09-25 
16:05:08 UTC (rev 25316)
+++ branches/SAMBA_3_2/source/script/tests/test_posix_s3.sh 2007-09-25 
16:42:53 UTC (rev 25317)
@@ -33,6 +33,7 @@
 raw=$raw RAW-SFILEINFO RAW-SFILEINFO-BUG RAW-STREAMS RAW-UNLINK RAW-WRITE
 raw=$raw RAW-SAMBA3HIDE RAW-SAMBA3BADPATH RAW-SFILEINFO-RENAME
 raw=$raw RAW-SAMBA3CASEINSENSITIVE RAW-SAMBA3POSIXTIMEDLOCK
+raw=$raw RAW-SAMBA3ROOTDIRFID
 
 rpc=RPC-AUTHCONTEXT RPC-BINDSAMBA3 RPC-SAMBA3-SRVSVC RPC-SAMBA3-SHARESEC
 rpc=$rpc RPC-UNIXINFO RPC-SAMBA3-SPOOLSS RPC-SAMBA3-WKSSVC

Modified: branches/SAMBA_3_2_0/source/script/tests/test_posix_s3.sh
===
--- branches/SAMBA_3_2_0/source/script/tests/test_posix_s3.sh   2007-09-25 
16:05:08 UTC (rev 25316)
+++ branches/SAMBA_3_2_0/source/script/tests/test_posix_s3.sh   2007-09-25 
16:42:53 UTC (rev 25317)
@@ -33,6 +33,7 @@
 raw=$raw RAW-SFILEINFO RAW-SFILEINFO-BUG RAW-STREAMS RAW-UNLINK RAW-WRITE
 raw=$raw RAW-SAMBA3HIDE RAW-SAMBA3BADPATH RAW-SFILEINFO-RENAME
 raw=$raw RAW-SAMBA3CASEINSENSITIVE RAW-SAMBA3POSIXTIMEDLOCK
+raw=$raw RAW-SAMBA3ROOTDIRFID
 
 rpc=RPC-AUTHCONTEXT RPC-BINDSAMBA3 RPC-SAMBA3-SRVSVC RPC-SAMBA3-SHARESEC
 rpc=$rpc RPC-SAMBA3-SPOOLSS RPC-SAMBA3-WKSSVC



svn commit: samba r25318 - in branches: . 3.2-perltest 3.2-perltest/source

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-25 18:00:34 + (Tue, 25 Sep 2007)
New Revision: 25318

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25318

Log:
Add gdbtest.
Added:
   branches/3.2-perltest/
Removed:
   branches/3.2-perltest/
Modified:
   branches/3.2-perltest/source/Makefile.in


Changeset:
Copied: branches/3.2-perltest (from rev 24904, branches/3.2-perltest)


Property changes on: branches/3.2-perltest
___
Name: bzr:revision-info
...skipped...
Name: bzr:revprop:branch-nick
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...
Name: bzr:merge
...skipped...
Name: svk:merge
...skipped...


svn commit: samba r25319 - in branches/3.2-perltest: . source source/groupdb source/include source/lib source/libads source/libsmb source/nmbd source/nsswitch source/param source/passdb source/printin

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-25 18:00:51 + (Tue, 25 Sep 2007)
New Revision: 25319

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25319

Log:
Merge upstream.
Removed:
   branches/3.2-perltest/source/smbd/mangle_map.c
Modified:
   branches/3.2-perltest/
   branches/3.2-perltest/source/Makefile.in
   branches/3.2-perltest/source/configure.in
   branches/3.2-perltest/source/groupdb/mapping.c
   branches/3.2-perltest/source/include/mangle.h
   branches/3.2-perltest/source/include/messages.h
   branches/3.2-perltest/source/include/vfs_macros.h
   branches/3.2-perltest/source/lib/charcnv.c
   branches/3.2-perltest/source/lib/hmacmd5.c
   branches/3.2-perltest/source/lib/privileges.c
   branches/3.2-perltest/source/lib/substitute.c
   branches/3.2-perltest/source/lib/talloc_stack.c
   branches/3.2-perltest/source/lib/time.c
   branches/3.2-perltest/source/lib/util.c
   branches/3.2-perltest/source/lib/util_sid.c
   branches/3.2-perltest/source/lib/util_tdb.c
   branches/3.2-perltest/source/libads/kerberos.c
   branches/3.2-perltest/source/libsmb/libsmb_compat.c
   branches/3.2-perltest/source/libsmb/libsmbclient.c
   branches/3.2-perltest/source/libsmb/namequery_dc.c
   branches/3.2-perltest/source/nmbd/nmbd_subnetdb.c
   branches/3.2-perltest/source/nsswitch/winbindd.c
   branches/3.2-perltest/source/nsswitch/winbindd_cache.c
   branches/3.2-perltest/source/nsswitch/winbindd_cm.c
   branches/3.2-perltest/source/nsswitch/winbindd_cred_cache.c
   branches/3.2-perltest/source/nsswitch/winbindd_dual.c
   branches/3.2-perltest/source/nsswitch/winbindd_util.c
   branches/3.2-perltest/source/nsswitch/wins.c
   branches/3.2-perltest/source/param/loadparm.c
   branches/3.2-perltest/source/passdb/passdb.c
   branches/3.2-perltest/source/passdb/secrets.c
   branches/3.2-perltest/source/printing/nt_printing.c
   branches/3.2-perltest/source/profile/profile.c
   branches/3.2-perltest/source/registry/reg_objects.c
   branches/3.2-perltest/source/registry/reg_perfcount.c
   branches/3.2-perltest/source/registry/reg_smbconf.c
   branches/3.2-perltest/source/registry/reg_util.c
   branches/3.2-perltest/source/rpc_client/cli_svcctl.c
   branches/3.2-perltest/source/rpc_parse/parse_prs.c
   branches/3.2-perltest/source/rpc_server/srv_pipe_hnd.c
   branches/3.2-perltest/source/rpc_server/srv_srvsvc_nt.c
   branches/3.2-perltest/source/script/tests/timelimit.c
   branches/3.2-perltest/source/services/services_db.c
   branches/3.2-perltest/source/smbd/dir.c
   branches/3.2-perltest/source/smbd/filename.c
   branches/3.2-perltest/source/smbd/lanman.c
   branches/3.2-perltest/source/smbd/mangle.c
   branches/3.2-perltest/source/smbd/mangle_hash.c
   branches/3.2-perltest/source/smbd/mangle_hash2.c
   branches/3.2-perltest/source/smbd/msdfs.c
   branches/3.2-perltest/source/smbd/nttrans.c
   branches/3.2-perltest/source/smbd/reply.c
   branches/3.2-perltest/source/smbd/statcache.c
   branches/3.2-perltest/source/smbd/trans2.c
   branches/3.2-perltest/source/utils/net.c
   branches/3.2-perltest/source/utils/net_ads.c
   branches/3.2-perltest/source/utils/net_sam.c
   branches/3.2-perltest/source/utils/nmblookup.c
   branches/3.2-perltest/source/utils/pdbedit.c
   branches/3.2-perltest/source/utils/sharesec.c
   branches/3.2-perltest/source/utils/smbcacls.c
   branches/3.2-perltest/source/utils/smbcontrol.c
   branches/3.2-perltest/source/utils/smbcquotas.c
   branches/3.2-perltest/source/utils/smbfilter.c
   branches/3.2-perltest/source/utils/smbget.c
   branches/3.2-perltest/source/utils/smbpasswd.c
   branches/3.2-perltest/source/utils/smbtree.c
   branches/3.2-perltest/source/utils/testparm.c


Changeset:
Sorry, the patch is too large (8710 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25319


svn commit: samba r25320 - in branches/3.2-perltest: . examples/LDAP source/include source/lib source/libads source/locking source/modules source/nsswitch source/param source/passdb source/rpc_server

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-25 18:01:13 + (Tue, 25 Sep 2007)
New Revision: 25320

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25320

Log:
Merge upstream.
Added:
   branches/3.2-perltest/examples/LDAP/samba-schema-FDS.ldif
Modified:
   branches/3.2-perltest/
   branches/3.2-perltest/examples/LDAP/samba.schema
   branches/3.2-perltest/source/include/msdfs.h
   branches/3.2-perltest/source/include/smb_macros.h
   branches/3.2-perltest/source/include/smbldap.h
   branches/3.2-perltest/source/lib/file_id.c
   branches/3.2-perltest/source/libads/kerberos_verify.c
   branches/3.2-perltest/source/locking/brlock.c
   branches/3.2-perltest/source/locking/locking.c
   branches/3.2-perltest/source/modules/vfs_full_audit.c
   branches/3.2-perltest/source/nsswitch/idmap.c
   branches/3.2-perltest/source/nsswitch/idmap_ad.c
   branches/3.2-perltest/source/nsswitch/idmap_ldap.c
   branches/3.2-perltest/source/nsswitch/winbindd_cm.c
   branches/3.2-perltest/source/nsswitch/winbindd_dual.c
   branches/3.2-perltest/source/nsswitch/winbindd_pam.c
   branches/3.2-perltest/source/param/loadparm.c
   branches/3.2-perltest/source/passdb/pdb_ldap.c
   branches/3.2-perltest/source/rpc_server/srv_dfs_nt.c
   branches/3.2-perltest/source/script/tests/selftest.sh
   branches/3.2-perltest/source/smbd/close.c
   branches/3.2-perltest/source/smbd/dir.c
   branches/3.2-perltest/source/smbd/files.c
   branches/3.2-perltest/source/smbd/ipc.c
   branches/3.2-perltest/source/smbd/lanman.c
   branches/3.2-perltest/source/smbd/msdfs.c
   branches/3.2-perltest/source/smbd/nttrans.c
   branches/3.2-perltest/source/smbd/open.c
   branches/3.2-perltest/source/smbd/oplock.c
   branches/3.2-perltest/source/smbd/oplock_irix.c
   branches/3.2-perltest/source/smbd/oplock_linux.c
   branches/3.2-perltest/source/smbd/reply.c
   branches/3.2-perltest/source/smbd/trans2.c
   branches/3.2-perltest/source/torture/locktest.c
   branches/3.2-perltest/source/torture/locktest2.c
   branches/3.2-perltest/source/utils/status.c


Changeset:
Sorry, the patch is too large (7067 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25320


svn commit: samba r25322 - in branches/3.2-perltest: . source

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-25 18:02:17 + (Tue, 25 Sep 2007)
New Revision: 25322

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25322

Log:
Merge metze's changes.
Modified:
   branches/3.2-perltest/
   branches/3.2-perltest/source/Makefile.in
   branches/3.2-perltest/source/configure.in


Changeset:

Property changes on: branches/3.2-perltest
___
Name: bzr:revision-info
...skipped...
Name: bzr:ancestry:v3-trunk0
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...
Name: svk:merge
...skipped...

Modified: branches/3.2-perltest/source/Makefile.in
===
--- branches/3.2-perltest/source/Makefile.in2007-09-25 18:01:40 UTC (rev 
25321)
+++ branches/3.2-perltest/source/Makefile.in2007-09-25 18:02:17 UTC (rev 
25322)
@@ -2095,7 +2095,7 @@
done
 
 
-SELFTEST = $(PERL) $(samba4srcdir)/selftest/selftest.pl 
--prefix=${selftest_prefix}/st \
+SELFTEST = $(PERL) $(samba4srcdir)/selftest/selftest.pl 
--prefix=${selftest_prefix} \
   --srcdir=${samba4srcdir} --bindir=${builddir}/bin 
--testlist=${srcdir}/script/tests/tests_all.sh| \
   --expected-failures=samba3-knownfail --target=samba3 
--skip=samba3-skip
 ##

Modified: branches/3.2-perltest/source/configure.in
===
--- branches/3.2-perltest/source/configure.in   2007-09-25 18:01:40 UTC (rev 
25321)
+++ branches/3.2-perltest/source/configure.in   2007-09-25 18:02:17 UTC (rev 
25322)
@@ -373,7 +373,7 @@
 
 #
 # set prefix for 'make test'
-selftest_prefix=./
+selftest_prefix=./st
 AC_SUBST(selftest_prefix)
 AC_ARG_WITH(selftest-prefix,
 [  --with-selftest-prefix=DIRThe prefix where make test will be runned 
($selftest_prefix)],



Rev 634: merge from volker in http://samba.org/~tridge/3_0-ctdb

2007-09-25 Thread tridge

revno: 634
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Andrew Tridgell [EMAIL PROTECTED]
branch nick: s3-ctdb-tridge
timestamp: Tue 2007-09-25 14:52:20 +1000
message:
  merge from volker
modified:
  source/nsswitch/wb_common.cwb_common.c-20070210173807-1wjifrbwaz6xnmgl-719
=== modified file 'source/nsswitch/wb_common.c'
--- a/source/nsswitch/wb_common.c   2007-09-11 05:25:56 +
+++ b/source/nsswitch/wb_common.c   2007-09-25 04:52:20 +
@@ -34,7 +34,15 @@
 
 int winbindd_fd = -1;   /* fd for winbindd socket */
 static int is_privileged = 0;
-static char *priv_directory;
+
+/*
+ * Location of the winbind privileged directory
+ *
+ * This is used for two purposes: First, this being != NULL is an indication
+ * that winbind is around and we should retry hard on failure. Second, this
+ * saves the child smbd some round-trips to winbind
+ */
+static char *priv_directory = NULL;
 
 /* Free a response structure */
 
@@ -241,6 +249,14 @@
int connect_errno = 0;
socklen_t errnosize;
 
+   if (priv_directory == NULL) {
+   /*
+* Our first connection attempt to winbind at all
+* failed, so directly bail out.
+*/
+   goto error_out;
+   }
+
if (wait_time = CONNECT_TIMEOUT)
goto error_out;
 
@@ -268,6 +284,7 @@
slept = CONNECT_TIMEOUT;
break;
case EAGAIN:
+   case ECONNREFUSED:
slept = rand() % 3 + 1;
sleep(slept);
break;
@@ -295,6 +312,7 @@
static pid_t our_pid;
struct winbindd_request request;
struct winbindd_response response;
+   NSS_STATUS result;
ZERO_STRUCT(request);
ZERO_STRUCT(response);
 
@@ -342,21 +360,27 @@
return -1;
}
 
-   if (need_priv == 0) {
-   return winbindd_fd;
-   }
-
/* try and get priv pipe */
 
request.flags = WBFLAG_RECURSE;
-   if (winbindd_request_response(WINBINDD_PRIV_PIPE_DIR, request, 
response) == NSS_STATUS_SUCCESS) {
+
+   result = winbindd_request_response(WINBINDD_PRIV_PIPE_DIR, request,
+  response);
+
+   if (result == NSS_STATUS_SUCCESS) {
int fd;
-   if ((fd = winbind_named_pipe_sock((char 
*)response.extra_data.data)) != -1) {
+   priv_directory = (char *)response.extra_data.data;
+
+   if (need_priv == 0) {
+   return winbindd_fd;
+   }
+
+   fd = winbind_named_pipe_sock((char *)response.extra_data.data);
+
+   if (fd != -1) {
close(winbindd_fd);
winbindd_fd = fd;
is_privileged = 1;
-   priv_directory = strdup(
-   (char *)response.extra_data.data);
}
}
 
@@ -364,8 +388,6 @@
return -1;
}
 
-   SAFE_FREE(response.extra_data.data);
-
return winbindd_fd;
 #else
return -1;
@@ -651,6 +673,14 @@
 (request-flags  WBFLAG_RECURSE)) {
return status;
}
+   if (priv_directory == NULL) {
+   /*
+* Our first connection attempt to winbind
+* failed, so directly bail out.
+*/
+   return status;
+   }
+   
/*
 * Something might have failed in the previous
 * iteration which caused the filehandle to be closed
@@ -685,6 +715,13 @@
 (request-flags  WBFLAG_RECURSE)) {
return status;
}
+   if (priv_directory == NULL) {
+   /*
+* Our first connection attempt to winbind
+* failed, so directly bail out.
+*/
+   return status;
+   }
/*
 * Something might have failed in the previous
 * iteration which caused the filehandle to be closed



svn commit: samba r25323 - in branches: SAMBA_3_2/source/lib SAMBA_3_2_0/source/lib

2007-09-25 Thread vlendec
Author: vlendec
Date: 2007-09-25 21:32:49 + (Tue, 25 Sep 2007)
New Revision: 25323

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25323

Log:
Fix the build
Modified:
   branches/SAMBA_3_2/source/lib/ctdbd_conn.c
   branches/SAMBA_3_2_0/source/lib/ctdbd_conn.c


Changeset:
Modified: branches/SAMBA_3_2/source/lib/ctdbd_conn.c
===
--- branches/SAMBA_3_2/source/lib/ctdbd_conn.c  2007-09-25 18:02:17 UTC (rev 
25322)
+++ branches/SAMBA_3_2/source/lib/ctdbd_conn.c  2007-09-25 21:32:49 UTC (rev 
25323)
@@ -95,7 +95,7 @@
int32_t cstatus=-1;
NTSTATUS status;
status = ctdbd_control(conn,
-  CTDB_CURRENT_NODE, CTDB_CONTROL_GET_VNN, 0,
+  CTDB_CURRENT_NODE, CTDB_CONTROL_GET_PNN, 0,
   tdb_null, NULL, NULL, cstatus);
if (!NT_STATUS_IS_OK(status)) {
cluster_fatal(ctdbd_control failed\n);

Modified: branches/SAMBA_3_2_0/source/lib/ctdbd_conn.c
===
--- branches/SAMBA_3_2_0/source/lib/ctdbd_conn.c2007-09-25 18:02:17 UTC 
(rev 25322)
+++ branches/SAMBA_3_2_0/source/lib/ctdbd_conn.c2007-09-25 21:32:49 UTC 
(rev 25323)
@@ -95,7 +95,7 @@
int32_t cstatus=-1;
NTSTATUS status;
status = ctdbd_control(conn,
-  CTDB_CURRENT_NODE, CTDB_CONTROL_GET_VNN, 0,
+  CTDB_CURRENT_NODE, CTDB_CONTROL_GET_PNN, 0,
   tdb_null, NULL, NULL, cstatus);
if (!NT_STATUS_IS_OK(status)) {
cluster_fatal(ctdbd_control failed\n);



svn commit: samba r25324 - in branches: SAMBA_3_2/source/smbd SAMBA_3_2_0/source/smbd

2007-09-25 Thread vlendec
Author: vlendec
Date: 2007-09-25 21:41:39 + (Tue, 25 Sep 2007)
New Revision: 25324

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25324

Log:
Fix msdfs proxy

Jeremy, please check!

Modified:
   branches/SAMBA_3_2/source/smbd/msdfs.c
   branches/SAMBA_3_2_0/source/smbd/msdfs.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/msdfs.c
===
--- branches/SAMBA_3_2/source/smbd/msdfs.c  2007-09-25 21:32:49 UTC (rev 
25323)
+++ branches/SAMBA_3_2/source/smbd/msdfs.c  2007-09-25 21:41:39 UTC (rev 
25324)
@@ -771,7 +771,7 @@
}
}
 
-   if (!lp_msdfs_root(snum)) {
+   if (!lp_msdfs_root(snum)  (*lp_msdfs_proxy(snum) == '\0')) {
DEBUG(3,(get_referred_path: |%s| in dfs path %s is not 
a dfs root.\n,
pdp-servicename, dfs_path));

Modified: branches/SAMBA_3_2_0/source/smbd/msdfs.c
===
--- branches/SAMBA_3_2_0/source/smbd/msdfs.c2007-09-25 21:32:49 UTC (rev 
25323)
+++ branches/SAMBA_3_2_0/source/smbd/msdfs.c2007-09-25 21:41:39 UTC (rev 
25324)
@@ -771,7 +771,7 @@
}
}
 
-   if (!lp_msdfs_root(snum)) {
+   if (!lp_msdfs_root(snum)  (*lp_msdfs_proxy(snum) == '\0')) {
DEBUG(3,(get_referred_path: |%s| in dfs path %s is not 
a dfs root.\n,
pdp-servicename, dfs_path));



svn commit: samba r25325 - in branches: SAMBA_3_2/source/include SAMBA_3_2/source/libgpo SAMBA_3_2_0/source/include SAMBA_3_2_0/source/libgpo

2007-09-25 Thread gd
Author: gd
Date: 2007-09-25 21:41:57 + (Tue, 25 Sep 2007)
New Revision: 25325

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25325

Log:
Rename some defines.

Guenther

Modified:
   branches/SAMBA_3_2/source/include/gpo.h
   branches/SAMBA_3_2/source/libgpo/gpo_util.c
   branches/SAMBA_3_2_0/source/include/gpo.h
   branches/SAMBA_3_2_0/source/libgpo/gpo_util.c


Changeset:
Modified: branches/SAMBA_3_2/source/include/gpo.h
===
--- branches/SAMBA_3_2/source/include/gpo.h 2007-09-25 21:41:39 UTC (rev 
25324)
+++ branches/SAMBA_3_2/source/include/gpo.h 2007-09-25 21:41:57 UTC (rev 
25325)
@@ -93,6 +93,6 @@
 #define GPO_CACHE_DIR gpo_cache
 #define GPT_INI GPT.INI
 
-#define GP_EXT_SECURITY 827D319E-6EAC-11D2-A4EA-00C04F79F83A
-#define GP_EXT_REGISTRY 35378EAC-683F-11D2-A89A-00C04FBBCFA2
-#define GP_EXT_SCRIPTS  42B5FAAE-6536-11D2-AE5A-F87571E3
+#define GP_EXT_GUID_SECURITY 827D319E-6EAC-11D2-A4EA-00C04F79F83A
+#define GP_EXT_GUID_REGISTRY 35378EAC-683F-11D2-A89A-00C04FBBCFA2
+#define GP_EXT_GUID_SCRIPTS  42B5FAAE-6536-11D2-AE5A-F87571E3

Modified: branches/SAMBA_3_2/source/libgpo/gpo_util.c
===
--- branches/SAMBA_3_2/source/libgpo/gpo_util.c 2007-09-25 21:41:39 UTC (rev 
25324)
+++ branches/SAMBA_3_2/source/libgpo/gpo_util.c 2007-09-25 21:41:57 UTC (rev 
25325)
@@ -45,7 +45,7 @@
/* Registry Settings
(http://support.microsoft.com/kb/216357/EN-US/) */
{ Registry Settings,
-   GP_EXT_REGISTRY },
+   GP_EXT_GUID_REGISTRY },
{ Microsoft Disc Quota,
3610EDA5-77EF-11D2-8DC5-00C04FA31A66 },
{ EFS recovery,
@@ -59,9 +59,9 @@
{ QoS Packet Scheduler,
426031c0-0b47-4852-b0ca-ac3d37bfcb39 },
{ Scripts,
-   GP_EXT_SCRIPTS },
+   GP_EXT_GUID_SCRIPTS },
{ Security,
-   GP_EXT_SECURITY },
+   GP_EXT_GUID_SECURITY },
{ Software Installation,
C6DC5466-785A-11D2-84D0-00C04FB169F7 },
{ Wireless Group Policy,

Modified: branches/SAMBA_3_2_0/source/include/gpo.h
===
--- branches/SAMBA_3_2_0/source/include/gpo.h   2007-09-25 21:41:39 UTC (rev 
25324)
+++ branches/SAMBA_3_2_0/source/include/gpo.h   2007-09-25 21:41:57 UTC (rev 
25325)
@@ -93,6 +93,6 @@
 #define GPO_CACHE_DIR gpo_cache
 #define GPT_INI GPT.INI
 
-#define GP_EXT_SECURITY 827D319E-6EAC-11D2-A4EA-00C04F79F83A
-#define GP_EXT_REGISTRY 35378EAC-683F-11D2-A89A-00C04FBBCFA2
-#define GP_EXT_SCRIPTS  42B5FAAE-6536-11D2-AE5A-F87571E3
+#define GP_EXT_GUID_SECURITY 827D319E-6EAC-11D2-A4EA-00C04F79F83A
+#define GP_EXT_GUID_REGISTRY 35378EAC-683F-11D2-A89A-00C04FBBCFA2
+#define GP_EXT_GUID_SCRIPTS  42B5FAAE-6536-11D2-AE5A-F87571E3

Modified: branches/SAMBA_3_2_0/source/libgpo/gpo_util.c
===
--- branches/SAMBA_3_2_0/source/libgpo/gpo_util.c   2007-09-25 21:41:39 UTC 
(rev 25324)
+++ branches/SAMBA_3_2_0/source/libgpo/gpo_util.c   2007-09-25 21:41:57 UTC 
(rev 25325)
@@ -45,7 +45,7 @@
/* Registry Settings
(http://support.microsoft.com/kb/216357/EN-US/) */
{ Registry Settings,
-   GP_EXT_REGISTRY },
+   GP_EXT_GUID_REGISTRY },
{ Microsoft Disc Quota,
3610EDA5-77EF-11D2-8DC5-00C04FA31A66 },
{ EFS recovery,
@@ -59,9 +59,9 @@
{ QoS Packet Scheduler,
426031c0-0b47-4852-b0ca-ac3d37bfcb39 },
{ Scripts,
-   GP_EXT_SCRIPTS },
+   GP_EXT_GUID_SCRIPTS },
{ Security,
-   GP_EXT_SECURITY },
+   GP_EXT_GUID_SECURITY },
{ Software Installation,
C6DC5466-785A-11D2-84D0-00C04FB169F7 },
{ Wireless Group Policy,



svn commit: samba r25326 - in branches: SAMBA_3_2/source/lib SAMBA_3_2_0/source/lib

2007-09-25 Thread gd
Author: gd
Date: 2007-09-25 22:43:42 + (Tue, 25 Sep 2007)
New Revision: 25326

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25326

Log:
Free the context from the talloc_stackframe.

Guenther

Modified:
   branches/SAMBA_3_2/source/lib/module.c
   branches/SAMBA_3_2_0/source/lib/module.c


Changeset:
Modified: branches/SAMBA_3_2/source/lib/module.c
===
--- branches/SAMBA_3_2/source/lib/module.c  2007-09-25 21:41:57 UTC (rev 
25325)
+++ branches/SAMBA_3_2/source/lib/module.c  2007-09-25 22:43:42 UTC (rev 
25326)
@@ -108,8 +108,11 @@
 
DEBUG(5, (Probing module '%s'\n, module));
 
-   if (module[0] == '/')
-   return do_smb_load_module(module, True);
+   if (module[0] == '/') {
+   status = do_smb_load_module(module, True);
+   TALLOC_FREE(ctx);
+   return status;
+   }
 
full_path = talloc_asprintf(ctx,
%s/%s.%s,

Modified: branches/SAMBA_3_2_0/source/lib/module.c
===
--- branches/SAMBA_3_2_0/source/lib/module.c2007-09-25 21:41:57 UTC (rev 
25325)
+++ branches/SAMBA_3_2_0/source/lib/module.c2007-09-25 22:43:42 UTC (rev 
25326)
@@ -108,8 +108,11 @@
 
DEBUG(5, (Probing module '%s'\n, module));
 
-   if (module[0] == '/')
-   return do_smb_load_module(module, True);
+   if (module[0] == '/') {
+   status = do_smb_load_module(module, True);
+   TALLOC_FREE(ctx);
+   return status;
+   }
 
full_path = talloc_asprintf(ctx,
%s/%s.%s,



svn commit: samba r25327 - in branches: SAMBA_3_2/source/smbd SAMBA_3_2_0/source/smbd

2007-09-25 Thread vlendec
Author: vlendec
Date: 2007-09-25 23:26:05 + (Tue, 25 Sep 2007)
New Revision: 25327

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25327

Log:
Normalize the path we return for 'msdfs proxy'

We now accept both \\server\tmp and \server\tmp. There are other places
where this might be necessary, but at least the functionality is a bit
easier now.

Modified:
   branches/SAMBA_3_2/source/smbd/msdfs.c
   branches/SAMBA_3_2_0/source/smbd/msdfs.c


Changeset:
Modified: branches/SAMBA_3_2/source/smbd/msdfs.c
===
--- branches/SAMBA_3_2/source/smbd/msdfs.c  2007-09-25 22:43:42 UTC (rev 
25326)
+++ branches/SAMBA_3_2/source/smbd/msdfs.c  2007-09-25 23:26:05 UTC (rev 
25327)
@@ -788,6 +788,7 @@
 */
 
if (pdp-reqpath[0] == '\0') {
+   char *tmp;
struct referral *ref;
 
if (*lp_msdfs_proxy(snum) == '\0') {
@@ -810,7 +811,16 @@
return NT_STATUS_NO_MEMORY;
}
 
-   ref-alternate_path = talloc_strdup(ctx, lp_msdfs_proxy(snum));
+   if (!(tmp = talloc_strdup(ctx, lp_msdfs_proxy(snum {
+   TALLOC_FREE(pdp);
+   return NT_STATUS_NO_MEMORY;
+   }
+
+   trim_string(tmp, \\, 0);
+
+   ref-alternate_path = talloc_asprintf(ctx, \\%s, tmp);
+   TALLOC_FREE(tmp);
+
if (!ref-alternate_path) {
TALLOC_FREE(pdp);
return NT_STATUS_NO_MEMORY;

Modified: branches/SAMBA_3_2_0/source/smbd/msdfs.c
===
--- branches/SAMBA_3_2_0/source/smbd/msdfs.c2007-09-25 22:43:42 UTC (rev 
25326)
+++ branches/SAMBA_3_2_0/source/smbd/msdfs.c2007-09-25 23:26:05 UTC (rev 
25327)
@@ -788,6 +788,7 @@
 */
 
if (pdp-reqpath[0] == '\0') {
+   char *tmp;
struct referral *ref;
 
if (*lp_msdfs_proxy(snum) == '\0') {
@@ -810,7 +811,16 @@
return NT_STATUS_NO_MEMORY;
}
 
-   ref-alternate_path = talloc_strdup(ctx, lp_msdfs_proxy(snum));
+   if (!(tmp = talloc_strdup(ctx, lp_msdfs_proxy(snum {
+   TALLOC_FREE(pdp);
+   return NT_STATUS_NO_MEMORY;
+   }
+
+   trim_string(tmp, \\, 0);
+
+   ref-alternate_path = talloc_asprintf(ctx, \\%s, tmp);
+   TALLOC_FREE(tmp);
+
if (!ref-alternate_path) {
TALLOC_FREE(pdp);
return NT_STATUS_NO_MEMORY;



Build status as of Wed Sep 26 00:00:02 2007

2007-09-25 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2007-09-25 
00:01:48.0 +
+++ /home/build/master/cache/broken_results.txt 2007-09-26 00:01:31.0 
+
@@ -1,4 +1,4 @@
-Build status as of Tue Sep 25 00:00:02 2007
+Build status as of Wed Sep 26 00:00:02 2007
 
 Build counts:
 Tree Total  Broken Panic 
@@ -16,7 +16,7 @@
 rsync32 13 0 
 samba-docs   0  0  0 
 samba-gtk3  3  0 
-samba4   29 19 3 
+samba4   29 17 2 
 samba_3_232 16 0 
 smb-build30 30 0 
 talloc   32 1  0 


svn commit: samba r25328 - in branches: SAMBA_3_2/source/libads SAMBA_3_2_0/source/libads

2007-09-25 Thread gd
Author: gd
Date: 2007-09-26 01:02:52 + (Wed, 26 Sep 2007)
New Revision: 25328

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25328

Log:
When using ldap sasl wrapping with gssapi it's important to receive warnings
for clock-skew errors.

Guenther

Modified:
   branches/SAMBA_3_2/source/libads/sasl.c
   branches/SAMBA_3_2_0/source/libads/sasl.c


Changeset:
Modified: branches/SAMBA_3_2/source/libads/sasl.c
===
--- branches/SAMBA_3_2/source/libads/sasl.c 2007-09-25 23:26:05 UTC (rev 
25327)
+++ branches/SAMBA_3_2/source/libads/sasl.c 2007-09-26 01:02:52 UTC (rev 
25328)
@@ -811,6 +811,11 @@
 
if (ADS_ERR_OK(status)) {
status = ads_sasl_spnego_krb5_bind(ads, p);
+   if (!ADS_ERR_OK(status)) {
+   DEBUG(0,(kinit succeeded but 
+   ads_sasl_spnego_krb5_bind failed: 
%s\n,
+   ads_errstr(status)));
+   }
}
 
ads_free_service_principal(p);

Modified: branches/SAMBA_3_2_0/source/libads/sasl.c
===
--- branches/SAMBA_3_2_0/source/libads/sasl.c   2007-09-25 23:26:05 UTC (rev 
25327)
+++ branches/SAMBA_3_2_0/source/libads/sasl.c   2007-09-26 01:02:52 UTC (rev 
25328)
@@ -811,6 +811,11 @@
 
if (ADS_ERR_OK(status)) {
status = ads_sasl_spnego_krb5_bind(ads, p);
+   if (!ADS_ERR_OK(status)) {
+   DEBUG(0,(kinit succeeded but 
+   ads_sasl_spnego_krb5_bind failed: 
%s\n,
+   ads_errstr(status)));
+   }
}
 
ads_free_service_principal(p);



svn commit: samba r25329 - in branches/SAMBA_4_0/source/libcli/swig: .

2007-09-25 Thread tpot
Author: tpot
Date: 2007-09-26 01:26:36 + (Wed, 26 Sep 2007)
New Revision: 25329

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25329

Log:
A solution to SWIG not being able to handle a structure and a function
having the same name.  Hey we can now query nbt names from Python.

Modified:
   branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i
===
--- branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i  2007-09-26 01:02:52 UTC 
(rev 25328)
+++ branches/SAMBA_4_0/source/libcli/swig/libcli_nbt.i  2007-09-26 01:26:36 UTC 
(rev 25329)
@@ -37,10 +37,6 @@
 
 #undef strcpy
 
-/* Loadparm parameters */
-
-static struct loadparm_context lp_ctx;
-
 %}
 
 %apply bool { BOOL };
@@ -132,11 +128,17 @@
 %include carrays.i
 %array_functions(char *, char_ptr_array);
 
-%rename(do_nbt_name_query) nbt_name_query;
+NTSTATUS do_nbt_name_query(struct nbt_name_socket *nbtsock, 
+  TALLOC_CTX *mem_ctx, struct nbt_name_query *io);
 
-NTSTATUS nbt_name_query(struct nbt_name_socket *nbtsock, 
-   TALLOC_CTX *mem_ctx, struct nbt_name_query *io);
+%{
+NTSTATUS do_nbt_name_query(struct nbt_name_socket *nbtsock, 
+  TALLOC_CTX *mem_ctx, struct nbt_name_query *io)
+{
+   return nbt_name_query(nbtsock, mem_ctx, io);
+}
+%}
 
 %init %{
-  loadparm_init(lp_ctx);
+  lp_load();
 %}



svn commit: samba r25331 - in branches/4.0-python: . source source/lib/python source/lib/replace

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 01:34:11 + (Wed, 26 Sep 2007)
New Revision: 25331

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25331

Log:
Integrate pythons' configure.
Removed:
   branches/4.0-python/source/lib/python/install-sh
Modified:
   branches/4.0-python/
   branches/4.0-python/source/configure.ac
   branches/4.0-python/source/lib/python/configure.in
   branches/4.0-python/source/lib/replace/autoconf-2.60.m4


Changeset:
Sorry, the patch is too large (1083 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25331


svn commit: samba r25332 - in branches/4.0-python: . source/lib source/lib/python source/lib/python/Python

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 01:34:16 + (Wed, 26 Sep 2007)
New Revision: 25332

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25332

Log:
Fix python build.
Added:
   branches/4.0-python/source/lib/python/config.m4
   branches/4.0-python/source/lib/python/config.mk
Removed:
   branches/4.0-python/source/lib/python/Makefile.pre.in
   branches/4.0-python/source/lib/python/configure.in
   branches/4.0-python/source/lib/python/pyconfig.h.in
Modified:
   branches/4.0-python/
   branches/4.0-python/source/lib/basic.mk
   branches/4.0-python/source/lib/python/Python/sysmodule.c


Changeset:
Sorry, the patch is too large (8076 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25332


svn commit: samba r25333 - in branches/4.0-python: . source/lib/python

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 01:34:20 + (Wed, 26 Sep 2007)
New Revision: 25333

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25333

Log:
 Some more changes to the python build, add bzrignore.

Modified:
   branches/4.0-python/
   branches/4.0-python/.bzrignore
   branches/4.0-python/source/lib/python/config.m4


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/.bzrignore
===
--- branches/4.0-python/.bzrignore  2007-09-26 01:34:16 UTC (rev 25332)
+++ branches/4.0-python/.bzrignore  2007-09-26 01:34:20 UTC (rev 25333)
@@ -202,3 +202,8 @@
 torture/winbind/proto.h
 source/rpc_server/lsa/proto.h
 source/torture/winbind/proto.h
+source/lib/python/Modules/config.c
+source/lib/python/Modules/Setup.local
+source/lib/python/Modules/Setup.local
+source/lib/python/Modules/Setup
+source/lib/python/Modules/Setup.config

Modified: branches/4.0-python/source/lib/python/config.m4
===
--- branches/4.0-python/source/lib/python/config.m4 2007-09-26 01:34:16 UTC 
(rev 25332)
+++ branches/4.0-python/source/lib/python/config.m4 2007-09-26 01:34:20 UTC 
(rev 25333)
@@ -178,122 +178,6 @@
 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
 EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
 
-# checks for alternative programs
-
-# compiler flags are generated in two sets, BASECFLAGS and OPT.  OPT is just
-# for debug/optimization stuff.  BASECFLAGS is for flags that are required
-# just to get things to compile and link.  Users are free to override OPT
-# when running configure or make.  The build should not break if they do.
-# BASECFLAGS should generally not be messed with, however.
-
-# XXX shouldn't some/most/all of this code be merged with the stuff later
-# on that fiddles with OPT and BASECFLAGS?
-AC_MSG_CHECKING(for --without-gcc)
-AC_ARG_WITH(gcc,
-AC_HELP_STRING(--without-gcc,never use gcc),
-[
-   case $withval in
-   no) CC=cc
-   without_gcc=yes;;
-   yes)CC=gcc
-   without_gcc=no;;
-   *)  CC=$withval
-   without_gcc=$withval;;
-   esac], [
-   case $ac_sys_system in
-   AIX*)   CC=cc_r
-   without_gcc=;;
-   BeOS*)
-   case $BE_HOST_CPU in
-   ppc)
-   CC=mwcc
-   without_gcc=yes
-   BASECFLAGS=$BASECFLAGS -export pragma
-   OPT=$OPT -O
-   LDFLAGS=$LDFLAGS -nodup
-   ;;
-   x86)
-   CC=gcc
-   without_gcc=no
-   OPT=$OPT -O
-   ;;
-   *)
-   AC_MSG_ERROR([Unknown BeOS platform $BE_HOST_CPU])
-   ;;
-   esac
-   AR=\$(srcdir)/lib/python/Modules/ar_beos
-   RANLIB=:
-   ;;
-Monterey*)
-RANLIB=:
-without_gcc=;;
-   *)  without_gcc=no;;
-   esac])
-AC_MSG_RESULT($without_gcc)
-
-# If the user switches compilers, we can't believe the cache
-if test ! -z $ac_cv_prog_CC -a ! -z $CC -a $CC != $ac_cv_prog_CC
-then
-  AC_MSG_ERROR([cached CC is different -- throw away $cache_file
-(it is also a good idea to do 'make clean' before compiling)])
-fi
-
-AC_PROG_CC
-
-AC_SUBST(CXX)
-AC_SUBST(MAINCC)
-AC_MSG_CHECKING(for --with-cxx-main=compiler)
-AC_ARG_WITH(cxx_main,
-AC_HELP_STRING([--with-cxx-main=compiler],
-   [compile main() and link python executable with C++ 
compiler]),
-[
-   
-   case $withval in
-   no) with_cxx_main=no
-   MAINCC='$(CC)';;
-   yes)with_cxx_main=yes
-   MAINCC='$(CXX)';;
-   *)  with_cxx_main=yes
-   MAINCC=$withval
-   if test -z $CXX
-   then
-   CXX=$withval
-   fi;;
-   esac], [
-   with_cxx_main=no
-   MAINCC='$(CC)'
-])
-AC_MSG_RESULT($with_cxx_main)
-
-preset_cxx=$CXX
-if test -z $CXX
-then
-case $CC in
-gcc)AC_PATH_PROG(CXX, [g++], [g++], [notfound]) ;;
-cc) AC_PATH_PROG(CXX, [c++], [c++], [notfound]) ;;
-esac
-   if test $CXX = notfound
-   then
-   CXX=
-   fi
-fi
-if test -z $CXX
-then
-   AC_CHECK_PROGS(CXX, $CCC c++ g++ gcc CC cxx cc++ cl, notfound)
-   if test $CXX = notfound
-   then
-   CXX=
-   fi
-fi
-if test $preset_cxx != $CXX
-then
-AC_MSG_WARN([
-
-  By default, distutils will build C++ extension modules with $CXX.
-  If this is not intended, then set CXX on the configure command line.

svn commit: samba r25334 - in branches/4.0-python: . source/lib/python source/lib/python/Lib source/lib/python/Lib/ctypes source/lib/python/Modules source/lib/python/Python

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 01:34:23 + (Wed, 26 Sep 2007)
New Revision: 25334

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25334

Log:
Clean up some more files, fix the build.
Added:
   branches/4.0-python/source/lib/python/config.c
   branches/4.0-python/source/lib/python/pyconfig.h
Removed:
   branches/4.0-python/source/lib/python/Lib/bsddb/
   branches/4.0-python/source/lib/python/Lib/ctypes/test/
   branches/4.0-python/source/lib/python/Lib/email/
   branches/4.0-python/source/lib/python/Lib/idlelib/
   branches/4.0-python/source/lib/python/Lib/sqlite3/
   branches/4.0-python/source/lib/python/Modules/config.c.in
Modified:
   branches/4.0-python/
   branches/4.0-python/source/lib/python/Python/getplatform.c
   branches/4.0-python/source/lib/python/config.m4
   branches/4.0-python/source/lib/python/config.mk


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Deleted: branches/4.0-python/source/lib/python/Modules/config.c.in
===
--- branches/4.0-python/source/lib/python/Modules/config.c.in   2007-09-26 
01:34:20 UTC (rev 25333)
+++ branches/4.0-python/source/lib/python/Modules/config.c.in   2007-09-26 
01:34:23 UTC (rev 25334)
@@ -1,66 +0,0 @@
-/* -*- C -*- ***
-Copyright (c) 2000, BeOpen.com.
-Copyright (c) 1995-2000, Corporation for National Research Initiatives.
-Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
-All rights reserved.
-
-See the file Misc/COPYRIGHT for information on usage and
-redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-**/
-
-/* Module configuration */
-
-/* !!! !!! !!! This file is edited by the makesetup script !!! !!! !!! */
-
-/* This file contains the table of built-in modules.
-   See init_builtin() in import.c. */
-
-#include Python.h
-
-#ifdef __cplusplus
-extern C {
-#endif
-
-
-/* -- ADDMODULE MARKER 1 -- */
-
-extern void PyMarshal_Init(void);
-extern void initimp(void);
-extern void initgc(void);
-extern void init_ast(void);
-extern void init_types(void);
-
-struct _inittab _PyImport_Inittab[] = {
-
-/* -- ADDMODULE MARKER 2 -- */
-
-   /* This module lives in marshal.c */
-   {marshal, PyMarshal_Init},
-
-   /* This lives in import.c */
-   {imp, initimp},
-
-   /* This lives in Python/Python-ast.c */
-   {_ast, init_ast},
-
-   /* This lives in Python/_types.c */
-   {_types, init_types},
-
-   /* These entries are here for sys.builtin_module_names */
-   {__main__, NULL},
-   {__builtin__, NULL},
-   {sys, NULL},
-   {exceptions, NULL},
-
-   /* This lives in gcmodule.c */
-   {gc, initgc},
-
-   /* Sentinel */
-   {0, 0}
-};
-
-
-#ifdef __cplusplus
-}
-#endif
-

Modified: branches/4.0-python/source/lib/python/Python/getplatform.c
===
--- branches/4.0-python/source/lib/python/Python/getplatform.c  2007-09-26 
01:34:20 UTC (rev 25333)
+++ branches/4.0-python/source/lib/python/Python/getplatform.c  2007-09-26 
01:34:23 UTC (rev 25334)
@@ -1,4 +1,3 @@
-
 #include Python.h
 
 #ifndef PLATFORM

Added: branches/4.0-python/source/lib/python/config.c
===
--- branches/4.0-python/source/lib/python/config.c  2007-09-26 01:34:20 UTC 
(rev 25333)
+++ branches/4.0-python/source/lib/python/config.c  2007-09-26 01:34:23 UTC 
(rev 25334)
@@ -0,0 +1,69 @@
+/* Generated automatically from ./Modules/config.c.in by makesetup. */
+/* -*- C -*- ***
+Copyright (c) 2000, BeOpen.com.
+Copyright (c) 1995-2000, Corporation for National Research Initiatives.
+Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
+All rights reserved.
+
+See the file Misc/COPYRIGHT for information on usage and
+redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
+**/
+
+/* Module configuration */
+
+/* !!! !!! !!! This file is edited by the makesetup script !!! !!! !!! */
+
+/* This file contains the table of built-in modules.
+   See init_builtin() in import.c. */
+
+#include Python.h
+
+#ifdef __cplusplus
+extern C {
+#endif
+
+
+
+/* -- ADDMODULE MARKER 1 -- */
+
+extern void PyMarshal_Init(void);
+extern void initimp(void);
+extern void initgc(void);
+extern void init_ast(void);
+extern void init_types(void);
+
+struct _inittab _PyImport_Inittab[] = {
+
+
+/* -- ADDMODULE MARKER 2 -- */
+
+   /* This module lives in marshal.c */
+   {marshal, PyMarshal_Init},
+
+   /* This lives in import.c */
+   {imp, initimp},
+
+   /* This lives in 

svn commit: samba r25335 - in branches/4.0-python: . source/lib/python/Modules

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 01:34:26 + (Wed, 26 Sep 2007)
New Revision: 25335

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25335

Log:
 Fix paths.

Modified:
   branches/4.0-python/
   branches/4.0-python/source/lib/python/Modules/getpath.c


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/lib/python/Modules/getpath.c
===
--- branches/4.0-python/source/lib/python/Modules/getpath.c 2007-09-26 
01:34:23 UTC (rev 25334)
+++ branches/4.0-python/source/lib/python/Modules/getpath.c 2007-09-26 
01:34:26 UTC (rev 25335)
@@ -502,6 +502,7 @@
 #endif /* HAVE_READLINK */
 
 reduce(argv0_path);
+   joinpath(argv0_path, ../lib/python);
 /* At this point, argv0_path is guaranteed to be less than
MAXPATHLEN bytes long.
 */



svn commit: samba r25336 - in branches/4.0-python: . source/lib/python

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 01:34:29 + (Wed, 26 Sep 2007)
New Revision: 25336

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25336

Log:
Remove some more cruft.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/lib/python/config.m4
   branches/4.0-python/source/lib/python/config.mk


Changeset:
Sorry, the patch is too large (923 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25336


svn commit: samba r25337 - in branches/4.0-python: . source/lib/python source/lib/python/Lib

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 01:34:32 + (Wed, 26 Sep 2007)
New Revision: 25337

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25337

Log:
Remove more cruft.
Removed:
   branches/4.0-python/source/lib/python/Lib/lib-tk/
   branches/4.0-python/source/lib/python/Lib/msilib/
Modified:
   branches/4.0-python/
   branches/4.0-python/source/lib/python/config.m4


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/lib/python/config.m4
===
--- branches/4.0-python/source/lib/python/config.m4 2007-09-26 01:34:29 UTC 
(rev 25336)
+++ branches/4.0-python/source/lib/python/config.m4 2007-09-26 01:34:32 UTC 
(rev 25337)
@@ -249,128 +249,6 @@
 AC_DEFINE_UNQUOTED(SIZEOF_TIME_T, $ac_cv_sizeof_time_t, 
 [The number of bytes in a time_t.])
 
-
-AC_SUBST(OTHER_LIBTOOL_OPT)
-case $ac_sys_system/$ac_sys_release in
-  Darwin/@:@01567@:@\..*) 
-OTHER_LIBTOOL_OPT=-prebind -seg1addr 0x1000
-;;
-  Darwin/*)
-OTHER_LIBTOOL_OPT=
-;;
-esac
-
-AC_SUBST(LIBTOOL_CRUFT)
-case $ac_sys_system/$ac_sys_release in
-  Darwin/@:@01567@:@\..*) 
-LIBTOOL_CRUFT=-framework System -lcc_dynamic
-if test ${enable_universalsdk}; then
-   :
-else
-   LIBTOOL_CRUFT=${LIBTOOL_CRUFT} -arch_only `arch`
-fi
-LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name 
$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
-LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) 
-current_version $(VERSION)';;
-  Darwin/*)
-gcc_version=`gcc -v 21 |  grep version | cut -d\  -f3`
-if test ${gcc_version} '' 4.0
-then
-LIBTOOL_CRUFT=-lcc_dynamic
-else 
-LIBTOOL_CRUFT=
-fi
-LIBTOOL_CRUFT=$LIBTOOL_CRUFT -lSystem -lSystemStubs -arch_only `arch`
-LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name 
$(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
-LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) 
-current_version $(VERSION)';;
-esac
-
-AC_MSG_CHECKING(for dyld)
-case $ac_sys_system/$ac_sys_release in
-  Darwin/*)
-   AC_DEFINE(WITH_DYLD, 1, 
-[Define if you want to use the new-style (Openstep, Rhapsody, MacOS)
- dynamic linker (dyld) instead of the old-style (NextStep) dynamic
- linker (rld). Dyld is necessary to support frameworks.])
-   AC_MSG_RESULT(always on for Darwin)
-   ;;
-  *)
-   AC_MSG_RESULT(no)
-   ;;
-esac
-
-# Set info about shared libraries.
-AC_SUBST(SO)
-AC_SUBST(LDSHARED)
-AC_SUBST(BLDSHARED)
-AC_SUBST(CCSHARED)
-AC_SUBST(LINKFORSHARED)
-# SO is the extension of shared libraries `(including the dot!)
-# -- usually .so, .sl on HP-UX, .dll on Cygwin
-AC_MSG_CHECKING(SO)
-if test -z $SO
-then
-   case $ac_sys_system in
-   hp*|HP*)
-   case `uname -m` in
-   ia64) SO=.so;;
-   *)SO=.sl;;
-   esac
-   ;;
-   CYGWIN*)   SO=.dll;;
-   *) SO=.so;;
-   esac
-else
-   # this might also be a termcap variable, see #610332
-echo
-echo 
'='
-echo '+
   +'
-   echo '+ WARNING: You have set SO in your environment.   
  +'
-echo '+ Do you really mean to change the extension for shared 
libraries?  +'
-echo '+ Continuing in 10 seconds to let you to ponder. 
   +'
-echo '+
   +'
-echo 
'='
-   sleep 10
-fi
-AC_MSG_RESULT($SO)
-AC_MSG_RESULT($LDSHARED)
-BLDSHARED=${BLDSHARED-$LDSHARED}
-# CCSHARED are the C *flags* used to create objects to go into a shared
-# library (module) -- this is only needed for a few systems
-AC_MSG_CHECKING(CCSHARED)
-if test -z $CCSHARED
-then
-   case $ac_sys_system/$ac_sys_release in
-   SunOS*) if test $GCC = yes;
-   then CCSHARED=-fPIC;
-   elif test `uname -p` = sparc;
-   then CCSHARED=-xcode=pic32;
-   else CCSHARED=-Kpic;
-   fi;;
-   hp*|HP*) if test $GCC = yes;
-then CCSHARED=-fPIC;
-else CCSHARED=+z;
-fi;;
-   Linux*|GNU*) CCSHARED=-fPIC;;
-   BSD/OS*/4*) CCSHARED=-fpic;;
-   FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED=-fPIC;;
-   OpenUNIX*|UnixWare*)
-   if test $GCC = yes
-   then CCSHARED=-fPIC
-   else CCSHARED=-KPIC
-   fi;;
-   SCO_SV*)
-   if test $GCC = yes
-  

svn commit: samba r25338 - in branches/4.0-python: . source/build/m4 source/build/smb_build source/lib/ldb source/lib/python source/lib/python/Modules source/lib/tdb source/libcli source/scripting/swi

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 01:34:35 + (Wed, 26 Sep 2007)
New Revision: 25338

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25338

Log:
Allow using system python.
Removed:
   branches/4.0-python/source/lib/python/Modules/linuxaudiodev.c
Modified:
   branches/4.0-python/
   branches/4.0-python/source/build/m4/public.m4
   branches/4.0-python/source/build/smb_build/makefile.pm
   branches/4.0-python/source/lib/ldb/libldb.m4
   branches/4.0-python/source/lib/python/config.m4
   branches/4.0-python/source/lib/python/config.mk
   branches/4.0-python/source/lib/tdb/libtdb.m4
   branches/4.0-python/source/libcli/config.m4
   branches/4.0-python/source/scripting/swig/config.m4


Changeset:
Sorry, the patch is too large (996 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25338


svn commit: samba r25339 - in branches/4.0-python: . source/setup

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 01:34:42 + (Wed, 26 Sep 2007)
New Revision: 25339

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25339

Log:
Start converting provision to python.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/setup/provision


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/setup/provision
===
--- branches/4.0-python/source/setup/provision  2007-09-26 01:34:35 UTC (rev 
25338)
+++ branches/4.0-python/source/setup/provision  2007-09-26 01:34:42 UTC (rev 
25339)
@@ -1,12 +1,13 @@
-#!/bin/sh
-exec smbscript $0 ${1+$@}
-/*
-   provision a Samba4 server
-   Copyright Andrew Tridgell 2005
-   Released under the GNU GPL v2 or later
-*/
+#!/usr/bin/python
+#
+#  provision a Samba4 server
+#  Copyright Andrew Tridgell 2005
+#  Released under the GNU GPL v2 or later
+#
 
-options = GetOptions(ARGV,
+from samba import getopt
+
+options = getopt(
POPT_AUTOHELP,
POPT_COMMON_SAMBA,
POPT_COMMON_VERSION,
@@ -35,33 +36,23 @@
'partitions-only',
'ldap-base',
'ldap-backend=s',
-'ldap-module=s',
-'aci=s');
+'ldap-module=s',
+'aci=s');
 
-if (options == undefined) {
-   println(Failed to parse options);
-   return -1;
-}
+from provision import provision
 
-libinclude(base.js);
-libinclude(provision.js);
+#
+#  print a message if quiet is not set
+#
+def message(text):
+   if options[quiet] == undefined:
+   print text
 
-/*
-  print a message if quiet is not set
-*/
-function message()
-{
-   if (options[quiet] == undefined) {
-   print(vsprintf(arguments));
-   }
-}
-
-/*
- show some help
-*/
-function ShowHelp()
-{
-   print(
+#
+# show some help
+#
+def ShowHelp():
+   print 
 Samba4 provisioning
 
 provision [options]
@@ -100,16 +91,16 @@
options['host-name'] = hostname();
 }
 
-/*
-   main program
-*/
+#
+#   main program
+#
 if (options[realm] == undefined ||
 options[domain] == undefined ||
 options[host-name] == undefined) {
ShowHelp();
 }
 
-/* cope with an initially blank smb.conf */
+# cope with an initially blank smb.conf 
 var lp = loadparm_init();
 lp.set(realm, options.realm);
 lp.set(workgroup, options.domain);
@@ -152,34 +143,31 @@
message(LDAP module: %s on backend: %s\n, subobj.LDAPMODULE, 
subobj.LDAPBACKEND);
 }
 
-if (!provision_validate(subobj, message)) {
-   return -1;
-}
+if not provision_validate(subobj, message):
+   return -1
 
-var system_session = system_session();
-var creds = options.get_credentials();
-message(Provisioning for %s in realm %s\n, subobj.DOMAIN, subobj.REALM);
-message(Using administrator password: %s\n, subobj.ADMINPASS);
-if (ldapbase) {
-   provision_ldapbase(subobj, message, paths);
-   message(Please install the LDIF located in  + paths.ldap_basedn_ldif 
+ ,  + paths.ldap_config_basedn_ldif +  and  + 
paths.ldap_schema_basedn_ldif +  into your LDAP server, and re-run with 
--ldap-backend=ldap://my.ldap.server\n;);
-} else if (partitions_only) {
-   provision_become_dc(subobj, message, false, paths, system_session);
-} else {
-   provision(subobj, message, blank, paths, system_session, creds, 
ldapbackend);
-   provision_dns(subobj, message, paths, system_session, creds);
-   message(To reproduce this provision, run with:\n);
-   message(--realm=' + subobj.REALM_CONF + ' --domain=' + 
subobj.DOMAIN_CONF + ' --domain-guid=' + subobj.DOMAINGUID + ' \\\n);
-   message(--policy-guid=' + subobj.POLICYGUID + ' --host-name=' + 
subobj.HOSTNAME + ' --host-ip=' + subobj.HOSTIP + ' \\\n);
-   message(--host-guid=' + subobj.HOSTGUID + ' --invocationid=' + 
subobj.INVOCATIONID + ' \\\n);
-   message(--adminpass=' + subobj.ADMINPASS + ' --krbtgtpass=' + 
subobj.KRBTGTPASS + ' \\\n);
-   message(--machinepass=' + subobj.MACHINEPASS + ' --dnspass=' + 
subobj.DNSPASS + ' \\\n);
-   message(--root=' + subobj.ROOT + ' --nobody=' + subobj.NOBODY + ' 
--nogroup-' + subobj.NOGROUP + ' \\\n);
-   message(--wheel=' + subobj.WHEEL + ' --users=' + subobj.USERS + ' 
--server-role=' + subobj.SERVERROLE + ' \\\n);
-   message(--ldap-backend=' + subobj.LDAPBACKEND + ' --ldap-mdoule=' + 
subobj.LDAPMODULE + ' \\\n);
+system_session = system_session()
+creds = options.get_credentials()
+message(Provisioning for %s in realm %s\n, subobj.DOMAIN, subobj.REALM)
+message(Using administrator password: %s\n, subobj.ADMINPASS)
+if ldapbase:
+   provision_ldapbase(subobj, message, paths)
+   message(Please install the LDIF located in  + paths.ldap_basedn_ldif 
+ ,  + 

svn commit: samba r25340 - in branches/4.0-python: . source/scripting source/scripting/python source/setup

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 01:34:45 + (Wed, 26 Sep 2007)
New Revision: 25340

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25340

Log:
Fix some more of the python code.
Added:
   branches/4.0-python/source/scripting/python/
   branches/4.0-python/source/scripting/python/options.py
   branches/4.0-python/source/scripting/python/provision.py
   branches/4.0-python/source/scripting/python/upgrade.py
Modified:
   branches/4.0-python/
   branches/4.0-python/source/setup/provision


Changeset:
Sorry, the patch is too large (1770 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25340


svn commit: samba r25341 - in branches/4.0-python: . source source/build/smb_build source/lib/ldb source/lib/python source/lib/tdb source/libcli source/scripting/swig

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 02:06:12 + (Wed, 26 Sep 2007)
New Revision: 25341

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25341

Log:
Revive tim's swig code.
Removed:
   branches/4.0-python/source/libcli/config.m4
   branches/4.0-python/source/scripting/swig/config.m4
Modified:
   branches/4.0-python/
   branches/4.0-python/.bzrignore
   branches/4.0-python/source/build/smb_build/config_mk.pm
   branches/4.0-python/source/build/smb_build/input.pm
   branches/4.0-python/source/build/smb_build/main.pl
   branches/4.0-python/source/configure.ac
   branches/4.0-python/source/lib/ldb/config.mk
   branches/4.0-python/source/lib/ldb/libldb.m4
   branches/4.0-python/source/lib/python/config.m4
   branches/4.0-python/source/lib/tdb/config.mk
   branches/4.0-python/source/libcli/config.mk
   branches/4.0-python/source/scripting/swig/config.mk


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/.bzrignore
===
--- branches/4.0-python/.bzrignore  2007-09-26 01:34:45 UTC (rev 25340)
+++ branches/4.0-python/.bzrignore  2007-09-26 02:06:12 UTC (rev 25341)
@@ -207,3 +207,5 @@
 source/lib/python/Modules/Setup.local
 source/lib/python/Modules/Setup
 source/lib/python/Modules/Setup.config
+lib/ldb/swig/ldb.py
+source/lib/ldb/swig/ldb.py

Modified: branches/4.0-python/source/build/smb_build/config_mk.pm
===
--- branches/4.0-python/source/build/smb_build/config_mk.pm 2007-09-26 
01:34:45 UTC (rev 25340)
+++ branches/4.0-python/source/build/smb_build/config_mk.pm 2007-09-26 
02:06:12 UTC (rev 25341)
@@ -19,6 +19,12 @@
CPPFLAGS  = list,
LDFLAGS   = list,
},
+   SWIG = {
+   SWIG_FILE = string,
+   PRIVATE_DEPENDENCIES  = list,
+   PUBLIC_DEPENDENCIES   = list,
+   ENABLE= bool,
+   },
SUBSYSTEM = {
OBJ_FILES = list,
 

Modified: branches/4.0-python/source/build/smb_build/input.pm
===
--- branches/4.0-python/source/build/smb_build/input.pm 2007-09-26 01:34:45 UTC 
(rev 25340)
+++ branches/4.0-python/source/build/smb_build/input.pm 2007-09-26 02:06:12 UTC 
(rev 25341)
@@ -8,6 +8,7 @@
 use smb_build::config;
 use strict;
 package smb_build::input;
+use File::Basename;
 
 my $srcdir = $config::config{srcdir};
 
@@ -134,6 +135,22 @@
add_libreplace($lib);
 }
 
+sub check_swig($$)
+{
+   my ($INPUT, $swig) = @_;
+
+   return if ($swig-{ENABLE} ne YES);
+   
+   my $dirname = dirname($swig-{SWIG_FILE});
+   my $basename = basename($swig-{SWIG_FILE}, .i);
+
+   $swig-{OUTPUT_TYPE} = [SHARED_LIBRARY];
+   $swig-{LIBRARY_REALNAME} = $dirname/_$basename.\$(SHLIBEXT);
+   $swig-{OBJ_FILES} = [$dirname/$basename\_wrap\.o];
+
+   check_library($INPUT, $swig, [SHARED_LIBRARY]);
+}
+
 sub check_binary($$)
 {
my ($INPUT, $bin) = @_;
@@ -234,10 +251,20 @@
$part-{LINK_FLAGS} = [];
$part-{FULL_OBJ_LIST} = 
[\$($part-{TYPE}_$part-{NAME}_OBJ_LIST)];
 
-   check_subsystem($INPUT, $part, $subsys_ot) if ($part-{TYPE} eq 
SUBSYSTEM);
-   check_module($INPUT, $part, $module_ot) if ($part-{TYPE} eq 
MODULE);
-   check_library($INPUT, $part, $lib_ot) if ($part-{TYPE} eq 
LIBRARY);
-   check_binary($INPUT, $part) if ($part-{TYPE} eq BINARY);
+   if ($part-{TYPE} eq SUBSYSTEM) { 
+   check_subsystem($INPUT, $part, $subsys_ot);
+   } elsif ($part-{TYPE} eq MODULE) {
+   check_module($INPUT, $part, $module_ot);
+   } elsif ($part-{TYPE} eq LIBRARY) {
+   check_library($INPUT, $part, $lib_ot);
+   } elsif ($part-{TYPE} eq BINARY) {
+   check_binary($INPUT, $part);
+   } elsif ($part-{TYPE} eq SWIG) {
+   check_swig($INPUT, $part);
+   } elsif ($part-{TYPE} eq EXT_LIB) {
+   } else {
+   die(Unknown type $part-{TYPE});
+   }
}
 
foreach my $part (values %$INPUT) {

Modified: branches/4.0-python/source/build/smb_build/main.pl
===
--- branches/4.0-python/source/build/smb_build/main.pl  2007-09-26 01:34:45 UTC 
(rev 25340)
+++ branches/4.0-python/source/build/smb_build/main.pl  2007-09-26 02:06:12 UTC 
(rev 25341)
@@ -74,7 +74,6 @@
 cflags::create_cflags($OUTPUT, $config::config{srcdir},

svn commit: samba r25342 - in branches/4.0-python: . source source/build/smb_build source/lib/python source/lib/tdb source/lib/tdb/swig source/lib/tdb/swig/tests

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 02:06:20 + (Wed, 26 Sep 2007)
New Revision: 25342

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25342

Log:
Some more work getting the ldb and tdb python bindings to work again.
Added:
   branches/4.0-python/source/lib/tdb/swig/tests/
   branches/4.0-python/source/lib/tdb/swig/tests/simple.py
Modified:
   branches/4.0-python/
   branches/4.0-python/source/build/smb_build/input.pm
   branches/4.0-python/source/build/smb_build/output.pm
   branches/4.0-python/source/lib/python/config.m4
   branches/4.0-python/source/lib/tdb/libtdb.m4
   branches/4.0-python/source/main.mk


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/build/smb_build/input.pm
===
--- branches/4.0-python/source/build/smb_build/input.pm 2007-09-26 02:06:12 UTC 
(rev 25341)
+++ branches/4.0-python/source/build/smb_build/input.pm 2007-09-26 02:06:20 UTC 
(rev 25342)
@@ -131,7 +131,9 @@
$lib-{INIT_FUNCTION_TYPE} = NTSTATUS (*) (void);
}
 
-   $lib-{INSTALLDIR} = LIBDIR;
+   unless(defined($lib-{INSTALLDIR})) {
+   $lib-{INSTALLDIR} = LIBDIR;
+   }
add_libreplace($lib);
 }
 
@@ -147,6 +149,8 @@
$swig-{OUTPUT_TYPE} = [SHARED_LIBRARY];
$swig-{LIBRARY_REALNAME} = $dirname/_$basename.\$(SHLIBEXT);
$swig-{OBJ_FILES} = [$dirname/$basename\_wrap\.o];
+   $swig-{INSTALLDIR} = PYTHONDIR;
+   push (@{$swig-{PUBLIC_DEPENDENCIES}}, LIBPYTHON);
 
check_library($INPUT, $swig, [SHARED_LIBRARY]);
 }

Modified: branches/4.0-python/source/build/smb_build/output.pm
===
--- branches/4.0-python/source/build/smb_build/output.pm2007-09-26 
02:06:12 UTC (rev 25341)
+++ branches/4.0-python/source/build/smb_build/output.pm2007-09-26 
02:06:20 UTC (rev 25342)
@@ -51,7 +51,6 @@
 
if (defined($lib-{LIBRARY_REALNAME})) {
$lib-{BASEDIR} =~ s/^\.\///g;
-   $lib-{LIBRARY_REALNAME} = $lib-{LIBRARY_REALNAME};
$lib-{SHAREDDIR} = $lib-{BASEDIR};
} else {
if ($lib-{TYPE} eq MODULE) {

Modified: branches/4.0-python/source/lib/python/config.m4
===
--- branches/4.0-python/source/lib/python/config.m4 2007-09-26 02:06:12 UTC 
(rev 25341)
+++ branches/4.0-python/source/lib/python/config.m4 2007-09-26 02:06:20 UTC 
(rev 25342)
@@ -1520,8 +1520,8 @@
 
 AC_DEFINE_UNQUOTED(PLATFORM, $MACHDEP, [Platforms])
 SMB_SUBSYSTEM(LIBPYTHON, [], [INTERNAL_PYTHON], [-Ilib/python/Include 
-Ilib/python])
-SMB_ENABLE(python)
-SMB_ENABLE(pgen)
+SMB_ENABLE(python, YES)
+SMB_ENABLE(pgen, YES)
 PYTHON=$builddir/bin/python
 
 else

Modified: branches/4.0-python/source/lib/tdb/libtdb.m4
===
--- branches/4.0-python/source/lib/tdb/libtdb.m42007-09-26 02:06:12 UTC 
(rev 25341)
+++ branches/4.0-python/source/lib/tdb/libtdb.m42007-09-26 02:06:20 UTC 
(rev 25342)
@@ -28,5 +28,3 @@
 
 AC_HAVE_DECL(pread, [#include unistd.h])
 AC_HAVE_DECL(pwrite, [#include unistd.h])
-
-SMB_ENABLE(swig_tdb, NO)

Added: branches/4.0-python/source/lib/tdb/swig/tests/simple.py
===
--- branches/4.0-python/source/lib/tdb/swig/tests/simple.py 2007-09-26 
02:06:12 UTC (rev 25341)
+++ branches/4.0-python/source/lib/tdb/swig/tests/simple.py 2007-09-26 
02:06:20 UTC (rev 25342)
@@ -0,0 +1,9 @@
+#!/usr/bin/python
+# Some simple tests for the TDB python interface
+
+from unittest import TestCase
+from tdb import Tdb
+
+class SimpleTdb(TestCase):
+def test_open(self):
+db = Tdb(bla)

Modified: branches/4.0-python/source/main.mk
===
--- branches/4.0-python/source/main.mk  2007-09-26 02:06:12 UTC (rev 25341)
+++ branches/4.0-python/source/main.mk  2007-09-26 02:06:20 UTC (rev 25342)
@@ -29,6 +29,7 @@
 include client/config.mk
 include libcli/config.mk
 include scripting/ejs/config.mk
+include scripting/python/config.mk
 include scripting/swig/config.mk
 include kdc/config.mk
 



svn commit: samba r25343 - in branches/4.0-python: . source/scripting/python

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 02:06:23 + (Wed, 26 Sep 2007)
New Revision: 25343

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25343

Log:
Add initial work on wrapper for loadparm.
Added:
   branches/4.0-python/source/scripting/python/config.mk
   branches/4.0-python/source/scripting/python/param.c
Modified:
   branches/4.0-python/
   branches/4.0-python/.bzrignore


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/.bzrignore
===
--- branches/4.0-python/.bzrignore  2007-09-26 02:06:20 UTC (rev 25342)
+++ branches/4.0-python/.bzrignore  2007-09-26 02:06:23 UTC (rev 25343)
@@ -209,3 +209,4 @@
 source/lib/python/Modules/Setup.config
 lib/ldb/swig/ldb.py
 source/lib/ldb/swig/ldb.py
+source/lib/tdb/swig/tdb.py

Added: branches/4.0-python/source/scripting/python/config.mk
===
--- branches/4.0-python/source/scripting/python/config.mk   2007-09-26 
02:06:20 UTC (rev 25342)
+++ branches/4.0-python/source/scripting/python/config.mk   2007-09-26 
02:06:23 UTC (rev 25343)
@@ -0,0 +1,4 @@
+[SUBSYSTEM::python_param]
+PUBLIC_DEPENDENCIES = LIBPYTHON LIBSAMBA-CONFIG
+OBJ_FILES = \
+   param.o

Added: branches/4.0-python/source/scripting/python/param.c
===
--- branches/4.0-python/source/scripting/python/param.c 2007-09-26 02:06:20 UTC 
(rev 25342)
+++ branches/4.0-python/source/scripting/python/param.c 2007-09-26 02:06:23 UTC 
(rev 25343)
@@ -0,0 +1,56 @@
+/* 
+   Unix SMB/CIFS implementation.
+
+   Python wrapper for reading smb.conf files
+
+   Copyright (C) Jelmer Vernooij 2007
+   
+   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 2 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, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include includes.h
+#include scripting/ejs/smbcalls.h
+#include Python.h
+#include param/param.h
+
+static PyObject *param_load(PyObject *self, PyObject *args)
+{
+   char *filename;
+   PyObject *param;
+
+   if (!PyArg_ParseTuple(args, s:new, filename))
+   return NULL;
+
+   param = PyObject_New();
+
+   
+}
+
+static PyMethodDef methods[] = {
+   { load, (PyCFunction)param_load, METH_VARARGS, NULL},
+   { NULL, NULL }
+};
+
+PyDoc_STRVAR(param_doc, Simple wrappers around the smb.conf parsers);
+
+PyMODINIT_FUNC initparam(void)
+{
+   PyObject *mod = Py_InitModule3(param, methods, param_doc);
+   if (mod == NULL)
+   return;
+
+   PyModule_AddObject
+
+}



svn commit: samba r25344 - in branches/4.0-python: . source/lib/tdb source/lib/tdb/python source/lib/tdb/python/tests

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 02:06:26 + (Wed, 26 Sep 2007)
New Revision: 25344

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25344

Log:
Add some simple tests that define the interface of the tdb python bindings.
Added:
   branches/4.0-python/source/lib/tdb/python/
   branches/4.0-python/source/lib/tdb/python/tests/
   branches/4.0-python/source/lib/tdb/python/tests/simple.py
Modified:
   branches/4.0-python/


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Added: branches/4.0-python/source/lib/tdb/python/tests/simple.py
===
--- branches/4.0-python/source/lib/tdb/python/tests/simple.py   2007-09-26 
02:06:23 UTC (rev 25343)
+++ branches/4.0-python/source/lib/tdb/python/tests/simple.py   2007-09-26 
02:06:26 UTC (rev 25344)
@@ -0,0 +1,84 @@
+#!/usr/bin/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.
+#
+# Copyright (C) 2007 Jelmer Vernooij [EMAIL PROTECTED]
+# Published under the GNU LGPL
+from tdb import Tdb
+from unittest import TestCase
+
+class SimpleTdbTests(TestCase):
+def setUp(self):
+super(SimpleTdbTests, self).setUp()
+self.tdb = Tdb(sometempfile)
+
+def test_lockall(self):
+self.tdb.lockall()
+
+def test_max_dead(self):
+self.tdb.max_dead = 20
+
+def test_unlockall(self):
+self.tdb.lock_all()
+self.tdb.unlock_all()
+
+def test_lockall_read(self):
+self.tdb.read_lock_all()
+self.tdb.read_unlock_all()
+
+def test_reopen(self):
+self.tdb.reopen()
+
+def test_set_logging_fn(self):
+self.tdb.log_fn = lambda tdb, level, txt: 
+
+def test_get_logging_fn(self):
+self.tdb.log_fn
+
+def test_fetch(self):
+self.tdb[bar] = foo
+self.tdb.reopen()
+self.assertEquals(foo, self.tdb[bar])
+
+def test_delete(self):
+self.tdb[bar] = foo
+del self.tdb[bar]
+self.assertIs(None, self.tdb[bar])
+
+def test_contains(self):
+self.tdb[bla] = bloe
+self.assertTrue(bla in self.tdb)
+
+def test_hash_size(self):
+self.tdb.hash_size
+
+def test_map_size(self):
+self.tdb.map_size
+
+def test_name(self):
+self.tdb.name
+
+def test_iterator(self):
+self.tdb[bla] = 1
+self.tdb[brainslug] = 2
+self.assertEquals([bla, brainslug], list(self.tdb))
+
+def test_items(self):
+self.tdb[bla] = 1
+self.tdb[brainslug] = 2
+self.assertEquals([(bla, 1), (brainslug, 2)], self.tdb.items())
+
+def test_transaction_cancel(self):
+self.tdb[bloe] = 2
+self.tdb.transaction_start()
+self.tdb[bloe] = 1
+self.tdb.transaction_cancel()
+self.assertEquals(2, self.tdb[bloe])
+
+def test_transaction_commit(self):
+self.tdb[bloe] = 2
+self.tdb.transaction_start()
+self.tdb[bloe] = 1
+self.tdb.transaction_commit()
+self.assertEquals(1, self.tdb[bloe])



svn commit: samba r25345 - in branches/4.0-python: . source/scripting/python source/selftest/env source/setup

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 02:06:29 + (Wed, 26 Sep 2007)
New Revision: 25345

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25345

Log:
More work converting the provisioning code to python.
Modified:
   branches/4.0-python/
   branches/4.0-python/source/scripting/python/provision.py
   branches/4.0-python/source/scripting/python/upgrade.py
   branches/4.0-python/source/selftest/env/Samba4.pm
   branches/4.0-python/source/setup/provision


Changeset:
Sorry, the patch is too large (805 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25345


svn commit: samba r25346 - in branches/4.0-python: . source/build/m4 source/build/smb_build source/lib/ldb source/lib/python source/lib/tdb source/libcli source/scripting/python source/scripting/pytho

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 02:06:32 + (Wed, 26 Sep 2007)
New Revision: 25346

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25346

Log:
Some more work on python bindings.
Added:
   branches/4.0-python/source/scripting/python/credentials.py
   branches/4.0-python/source/scripting/python/parammodule.c
   branches/4.0-python/source/scripting/python/tests/
   branches/4.0-python/source/scripting/python/tests/param.py
Removed:
   branches/4.0-python/source/scripting/python/param.c
Modified:
   branches/4.0-python/
   branches/4.0-python/.bzrignore
   branches/4.0-python/source/build/m4/public.m4
   branches/4.0-python/source/build/smb_build/config_mk.pm
   branches/4.0-python/source/build/smb_build/input.pm
   branches/4.0-python/source/lib/ldb/config.mk
   branches/4.0-python/source/lib/python/config.m4
   branches/4.0-python/source/lib/python/config.mk
   branches/4.0-python/source/lib/tdb/config.mk
   branches/4.0-python/source/libcli/config.mk
   branches/4.0-python/source/scripting/python/config.mk
   branches/4.0-python/source/scripting/python/provision.py
   branches/4.0-python/source/scripting/python/upgrade.py
   branches/4.0-python/source/scripting/swig/config.mk
   branches/4.0-python/source/setup/provision


Changeset:
Sorry, the patch is too large (949 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25346


svn commit: samba r25347 - in branches/4.0-python: . source/scripting/python

2007-09-25 Thread jelmer
Author: jelmer
Date: 2007-09-26 02:06:36 + (Wed, 26 Sep 2007)
New Revision: 25347

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25347

Log:
Fix param module.
Added:
   branches/4.0-python/source/scripting/python/talloc.c
Modified:
   branches/4.0-python/
   branches/4.0-python/source/scripting/python/config.mk
   branches/4.0-python/source/scripting/python/parammodule.c


Changeset:

Property changes on: branches/4.0-python
___
Name: bzr:revision-info
...skipped...
Name: bzr:file-ids
...skipped...
Name: bzr:revision-id:v3-trunk0
...skipped...

Modified: branches/4.0-python/source/scripting/python/config.mk
===
--- branches/4.0-python/source/scripting/python/config.mk   2007-09-26 
02:06:32 UTC (rev 25346)
+++ branches/4.0-python/source/scripting/python/config.mk   2007-09-26 
02:06:36 UTC (rev 25347)
@@ -1,4 +1,9 @@
+[SUBSYSTEM::talloc_python]
+PRIVATE_DEPENDENCIES = LIBTALLOC LIBPYTHON
+OBJ_FILES = talloc.o
+PUBLIC_PROTO_HEADER = talloc.h
+
 [PYTHON::python_param]
-PRIVATE_DEPENDENCIES = LIBSAMBA-CONFIG
+PRIVATE_DEPENDENCIES = LIBSAMBA-CONFIG talloc_python
 OBJ_FILES = \
parammodule.o

Modified: branches/4.0-python/source/scripting/python/parammodule.c
===
--- branches/4.0-python/source/scripting/python/parammodule.c   2007-09-26 
02:06:32 UTC (rev 25346)
+++ branches/4.0-python/source/scripting/python/parammodule.c   2007-09-26 
02:06:36 UTC (rev 25347)
@@ -21,43 +21,56 @@
 */
 
 #include includes.h
-#include scripting/ejs/smbcalls.h
+#include scripting/python/talloc.h
 #include Python.h
 #include param/param.h
 
-PyTypeObject noddy_NoddyType;
+staticforward PyTypeObject param_ParamFileType;
 
 typedef struct {
-   PyObject_HEAD
-} noddy_NoddyObject;
+   PyObject_HEAD
+} param_ParamFileObject;
 
-static PyObject *loadparm_object(void)
-{
-   PyObject *self = PyObject_New();
-
-   /* FIXME */
-
-   return self;
-}
-
 static PyObject *param_load(PyObject *self, PyObject *args)
 {
+   int ret;
char *filename;
-   PyObject *param;
+   param_ParamFileObject *param;
 
if (!PyArg_ParseTuple(args, s:new, filename))
return NULL;
 
-   param = PyObject_New();
+   param = PyObject_New(param_ParamFileObject, param_ParamFileType);
 
+   ret = param_read(PyMemCtx(), filename);
+
+   if (ret == -1) {
+   PyErr_SetString(PyExc_TypeError, reading file failed);
+   return NULL;
+   }
+
/* FIXME: Add members:
 *   globals
 *   shares
 */
 
-   return param;
+   return (PyObject *)param;
 }
 
+static void
+param_dealloc(PyObject* self)
+{
+   PyObject_Del(self);
+}
+
+static PyTypeObject param_ParamFileType = {
+   PyObject_HEAD_INIT(NULL) 0,
+   .tp_name = ParamFile,
+   .tp_basicsize = sizeof(param_ParamFileObject),
+   .tp_dealloc = param_dealloc,
+};
+
+
 static PyMethodDef methods[] = {
{ ParamFile, (PyCFunction)param_load, METH_VARARGS, NULL},
{ NULL, NULL }
@@ -65,6 +78,12 @@
 
 PyDoc_STRVAR(param_doc, Simple wrappers around the smb.conf parsers);
 
+PyObject *loadparm_object(void)
+{
+
+   return NULL; /* FIXME */
+}
+
 PyMODINIT_FUNC initparam(void)
 {
PyObject *mod = Py_InitModule3(param, methods, param_doc);
@@ -72,5 +91,5 @@
return;
 
/* FIXME: Check error code */
-   PyModule_AddObject(mod, default_config, loadparm_object());
+   /*PyModule_AddObject(mod, default_config, loadparm_object());*/
 }

Added: branches/4.0-python/source/scripting/python/talloc.c
===
--- branches/4.0-python/source/scripting/python/talloc.c2007-09-26 
02:06:32 UTC (rev 25346)
+++ branches/4.0-python/source/scripting/python/talloc.c2007-09-26 
02:06:36 UTC (rev 25347)
@@ -0,0 +1,30 @@
+/* 
+   Unix SMB/CIFS implementation.
+
+   Helper functions for using talloc and Python together
+
+   Copyright (C) Jelmer Vernooij 2007
+   
+   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 2 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, write to the Free Software
+   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#include includes.h
+#include 

svn commit: samba r25348 - in branches/SAMBA_4_0/source: libcli libcli/swig scripting/swig

2007-09-25 Thread tpot
Author: tpot
Date: 2007-09-26 03:08:40 + (Wed, 26 Sep 2007)
New Revision: 25348

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25348

Log:
Start working on another Python wrapper.

Added:
   branches/SAMBA_4_0/source/libcli/swig/libcli_smb.i
Modified:
   branches/SAMBA_4_0/source/libcli/config.mk
   branches/SAMBA_4_0/source/scripting/swig/config.mk


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/config.mk
===
--- branches/SAMBA_4_0/source/libcli/config.mk  2007-09-26 02:06:36 UTC (rev 
25347)
+++ branches/SAMBA_4_0/source/libcli/config.mk  2007-09-26 03:08:40 UTC (rev 
25348)
@@ -59,6 +59,11 @@
 OBJ_FILES = swig/libcli_nbt_wrap.o
 PUBLIC_DEPENDENCIES = LIBCLI_NBT DYNCONFIG LIBSAMBA-CONFIG
 
+[LIBRARY::swig_libcli_smb]
+LIBRARY_REALNAME = swig/_libcli_smb.$(SHLIBEXT)
+OBJ_FILES = swig/libcli_smb_wrap.o
+PUBLIC_DEPENDENCIES = LIBCLI_SMB DYNCONFIG LIBSAMBA-CONFIG
+
 [SUBSYSTEM::LIBCLI_DGRAM]
 OBJ_FILES = \
dgram/dgramsocket.o \

Added: branches/SAMBA_4_0/source/libcli/swig/libcli_smb.i
===
--- branches/SAMBA_4_0/source/libcli/swig/libcli_smb.i  2007-09-26 02:06:36 UTC 
(rev 25347)
+++ branches/SAMBA_4_0/source/libcli/swig/libcli_smb.i  2007-09-26 03:08:40 UTC 
(rev 25348)
@@ -0,0 +1,18 @@
+%module libcli_smb
+
+%{
+#include includes.h
+#include lib/talloc/talloc.h
+#include lib/events/events.h
+#include libcli/raw/libcliraw.h
+%}
+
+TALLOC_CTX *talloc_init(char *name);
+int talloc_free(TALLOC_CTX *ptr);
+struct event_context *event_context_init(TALLOC_CTX *mem_ctx);
+
+struct smbcli_socket *smbcli_sock_connect_byname(const char *host, int port,
+TALLOC_CTX *mem_ctx,
+struct event_context 
*event_ctx);
+
+void smbcli_sock_dead(struct smbcli_socket *sock);

Modified: branches/SAMBA_4_0/source/scripting/swig/config.mk
===
--- branches/SAMBA_4_0/source/scripting/swig/config.mk  2007-09-26 02:06:36 UTC 
(rev 25347)
+++ branches/SAMBA_4_0/source/scripting/swig/config.mk  2007-09-26 03:08:40 UTC 
(rev 25348)
@@ -9,7 +9,7 @@
 
 # Swig extensions
 swig: lib/tdb/swig/_tdb.$(SHLIBEXT) lib/ldb/swig/_ldb.$(SHLIBEXT) \
-   libcli/swig/_libcli_nbt.$(SHLIBEXT)
+   libcli/swig/_libcli_nbt.$(SHLIBEXT) libcli/swig/_libcli_smb.$(SHLIBEXT)
 
 .SUFFIXES: _wrap.c .i
 



svn commit: samba r25349 - in branches/SAMBA_4_0/source/torture/winbind: .

2007-09-25 Thread metze
Author: metze
Date: 2007-09-26 04:53:16 + (Wed, 26 Sep 2007)
New Revision: 25349

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=25349

Log:
add WINBIND-STRUCT-DSGETDCNAME test

metze
Modified:
   branches/SAMBA_4_0/source/torture/winbind/struct_based.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/winbind/struct_based.c
===
--- branches/SAMBA_4_0/source/torture/winbind/struct_based.c2007-09-26 
03:08:40 UTC (rev 25348)
+++ branches/SAMBA_4_0/source/torture/winbind/struct_based.c2007-09-26 
04:53:16 UTC (rev 25349)
@@ -23,6 +23,7 @@
 #include torture/winbind/proto.h
 #include nsswitch/winbind_client.h
 #include libcli/security/security.h
+#include librpc/gen_ndr/netlogon.h
 #include param/param.h
 #include auth/pam_errors.h
 
@@ -490,6 +491,70 @@
return true;
 }
 
+static bool torture_winbind_struct_dsgetdcname(struct torture_context *torture)
+{
+   bool ok;
+   bool strict = torture_setting_bool(torture, strict mode, false);
+   struct torture_trust_domain *listd = NULL;
+   uint32_t i;
+   uint32_t count = 0;
+
+   torture_comment(torture, Running WINBINDD_DSGETDCNAME (struct 
based)\n);
+
+   ok = get_trusted_domains(torture, listd);
+   torture_assert(torture, ok, failed to get trust list);
+
+   for (i=0; listd[i].netbios_name; i++) {
+   struct winbindd_request req;
+   struct winbindd_response rep;
+
+   ZERO_STRUCT(req);
+   ZERO_STRUCT(rep);
+
+   if (strlen(listd[i].dns_name) == 0) continue;
+
+   /*
+* TODO: remove this and let winbindd give no dns name
+*   for NT4 domains
+*/
+   if (strcmp(listd[i].dns_name, listd[i].netbios_name) == 0) {
+   continue;
+   }
+
+   fstrcpy(req.domain_name, listd[i].dns_name);
+
+   /* TODO: test more flag combinations */
+   req.flags = DS_DIRECTORY_SERVICE_REQUIRED;
+
+   ok = true;
+   DO_STRUCT_REQ_REP_EXT(WINBINDD_DSGETDCNAME, req, rep,
+ NSS_STATUS_SUCCESS,
+ strict, ok = false,
+ talloc_asprintf(torture, DOMAIN '%s',
+ req.domain_name));
+   if (!ok) continue;
+
+   /* TODO: check rep.data.dc_name; */
+   torture_comment(torture, DOMAIN '%s' = DCNAME '%s'\n,
+   req.domain_name, rep.data.dc_name);
+
+   count++;
+   }
+
+   if (count == 0) {
+   torture_warning(torture, WINBINDD_DSGETDCNAME
+was not tested with %d non-AD domains,
+   i);
+   }
+
+   if (strict) {
+   torture_assert(torture, count  0,
+  WiNBINDD_DSGETDCNAME was not tested);
+   }
+
+   return true;
+}
+
 struct torture_suite *torture_winbind_struct_init(void)
 {
struct torture_suite *suite = 
torture_suite_create(talloc_autofree_context(), STRUCT);
@@ -504,6 +569,7 @@
torture_suite_add_simple_test(suite, LIST_TRUSTDOM, 
torture_winbind_struct_list_trustdom);
torture_suite_add_simple_test(suite, DOMAIN_INFO, 
torture_winbind_struct_domain_info);
torture_suite_add_simple_test(suite, GETDCNAME, 
torture_winbind_struct_getdcname);
+   torture_suite_add_simple_test(suite, DSGETDCNAME, 
torture_winbind_struct_dsgetdcname);
 
suite-description = talloc_strdup(suite, WINBIND - struct based 
protocol tests);