svn commit: samba r17550 - in branches/SAMBA_3_0/source: groupdb lib

2006-08-15 Thread vlendec
Author: vlendec
Date: 2006-08-15 08:05:52 + (Tue, 15 Aug 2006)
New Revision: 17550

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17550

Log:
Fix a few bugs in the tdb_multikey code. Thanks to tridge for pointing them
out.

Volker
Modified:
   branches/SAMBA_3_0/source/groupdb/mapping.c
   branches/SAMBA_3_0/source/lib/tdb_multikey.c


Changeset:
Modified: branches/SAMBA_3_0/source/groupdb/mapping.c
===
--- branches/SAMBA_3_0/source/groupdb/mapping.c 2006-08-15 06:03:13 UTC (rev 
17549)
+++ branches/SAMBA_3_0/source/groupdb/mapping.c 2006-08-15 08:05:52 UTC (rev 
17550)
@@ -95,10 +95,10 @@
return NULL;
}
 
-   result[KEYNUM_SID]  = talloc_strdup(mem_ctx,
+   result[KEYNUM_SID]  = talloc_strdup(result,
sid_string_static(&mapp->sid));
-   result[KEYNUM_NAME] = talloc_strdup(mem_ctx, mapp->nt_name);
-   result[KEYNUM_GID]  = talloc_asprintf(mem_ctx, "%d", (int)mapp->gid);
+   result[KEYNUM_NAME] = talloc_strdup(result, mapp->nt_name);
+   result[KEYNUM_GID]  = talloc_asprintf(result, "%d", (int)mapp->gid);
result[3] = NULL;
 
if ((result[0] == NULL) || (result[1] == NULL) ||
@@ -109,7 +109,7 @@
}
 
/* name lookups are case insensitive, store the key in upper case */
-   strupper_m(result[1]);
+   strupper_m(result[KEYNUM_NAME]);
 
return result;
 }

Modified: branches/SAMBA_3_0/source/lib/tdb_multikey.c
===
--- branches/SAMBA_3_0/source/lib/tdb_multikey.c2006-08-15 06:03:13 UTC 
(rev 17549)
+++ branches/SAMBA_3_0/source/lib/tdb_multikey.c2006-08-15 08:05:52 UTC 
(rev 17550)
@@ -159,7 +159,7 @@
if (data.dptr == NULL) {
DEBUG(1, ("Did not find record %s for key %s\n",
  prim.dptr, key.dptr));
-   status = NT_STATUS_INTERNAL_DB_CORRUPTION;
+   status = NT_STATUS_NOT_FOUND;
goto fail;
}
 



svn commit: samba r17551 - in branches/SAMBA_3_0/source: libads utils

2006-08-15 Thread vlendec
Author: vlendec
Date: 2006-08-15 09:53:16 + (Tue, 15 Aug 2006)
New Revision: 17551

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17551

Log:
Move some DEBUG to d_printf in interactive functions and return
NO_LOGON_SERVERS if no domain controller was found.

Thanks to Michael Adam <[EMAIL PROTECTED]>.

Volker
Modified:
   branches/SAMBA_3_0/source/libads/ldap.c
   branches/SAMBA_3_0/source/utils/net_ads.c


Changeset:
Modified: branches/SAMBA_3_0/source/libads/ldap.c
===
--- branches/SAMBA_3_0/source/libads/ldap.c 2006-08-15 08:05:52 UTC (rev 
17550)
+++ branches/SAMBA_3_0/source/libads/ldap.c 2006-08-15 09:53:16 UTC (rev 
17551)
@@ -287,7 +287,7 @@
goto got_connection;
}
 
-   return ADS_ERROR_SYSTEM(errno?errno:ENOENT);
+   return ADS_ERROR_NT(NT_STATUS_NO_LOGON_SERVERS);
 
 got_connection:
DEBUG(3,("Connected to LDAP server %s\n", inet_ntoa(ads->ldap_ip)));

Modified: branches/SAMBA_3_0/source/utils/net_ads.c
===
--- branches/SAMBA_3_0/source/utils/net_ads.c   2006-08-15 08:05:52 UTC (rev 
17550)
+++ branches/SAMBA_3_0/source/utils/net_ads.c   2006-08-15 09:53:16 UTC (rev 
17551)
@@ -278,7 +278,7 @@
second_time = True;
goto retry;
} else {
-   DEBUG(0,("ads_connect: %s\n", ads_errstr(status)));
+   d_printf("%s.\n", ads_errstr(status));
ads_destroy(&ads);
return NULL;
}
@@ -542,7 +542,7 @@
 
rc = ads_find_user_acct(ads, &res, argv[0]);
if (!ADS_ERR_OK(rc)) {
-   DEBUG(0, ("User %s does not exist\n", argv[0]));
+   d_printf("User %s does not exist.\n", argv[0]);
ads_destroy(&ads);
return -1;
}
@@ -668,7 +668,7 @@
 
rc = ads_find_user_acct(ads, &res, argv[0]);
if (!ADS_ERR_OK(rc)) {
-   DEBUG(0, ("Group %s does not exist\n", argv[0]));
+   d_printf("Group %s does not exist.\n", argv[0]);
ads_destroy(&ads);
return -1;
}
@@ -769,7 +769,7 @@
}
 
if (!(ctx = talloc_init("net_ads_leave"))) {
-   DEBUG(0, ("Could not initialise talloc context\n"));
+   d_fprintf(stderr, "Could not initialise talloc context.\n");
return -1;
}
 
@@ -1100,7 +1100,7 @@
/* go ahead and setup the default salt */
 
if ( (std_salt = kerberos_standard_des_salt()) == NULL ) {
-   DEBUG(0,("net_derive_salting_principal: failed to obtain 
stanard DES salt\n"));
+   d_fprintf(stderr, "net_derive_salting_principal: failed to 
obtain stanard DES salt\n");
return False;
}
 
@@ -1199,7 +1199,7 @@
}
 
if (!(ctx = talloc_init("net_ads_join"))) {
-   DEBUG(0, ("Could not initialise talloc context\n"));
+   d_fprintf(stderr, "Could not initialise talloc context.\n");
goto fail;
}
 
@@ -1240,7 +1240,8 @@
password = talloc_strdup(ctx, tmp_password);

if ( net_join_domain( ctx, ads->config.ldap_server_name, &ads->ldap_ip, 
&domain_sid, password ) != 0 ) {
-   d_fprintf(stderr, "Failed to join domain!\n");
+   /* There should be more detailed output here... */
+   d_fprintf(stderr, "call of net_join_domain failed\n");
goto fail;
}

@@ -1341,6 +1342,8 @@
return 0;
 
 fail:
+   /* issue an overall failure message at the end. */
+   d_printf("Failed to join domain!\n");
ads_destroy(&ads);
return -1;
 }



svn commit: samba r17552 - in branches/SAMBA_3_0/source: .

2006-08-15 Thread vlendec
Author: vlendec
Date: 2006-08-15 12:28:23 + (Tue, 15 Aug 2006)
New Revision: 17552

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17552

Log:
Attempt to fix tdb transactions on IRIX
Modified:
   branches/SAMBA_3_0/source/configure.in


Changeset:
Modified: branches/SAMBA_3_0/source/configure.in
===
--- branches/SAMBA_3_0/source/configure.in  2006-08-15 09:53:16 UTC (rev 
17551)
+++ branches/SAMBA_3_0/source/configure.in  2006-08-15 12:28:23 UTC (rev 
17552)
@@ -2750,6 +2750,7 @@
 SMB_CHECK_SYSCONF(_SC_NPROC_ONLN)
 SMB_CHECK_SYSCONF(_SC_NPROCESSORS_ONLN)
 SMB_CHECK_SYSCONF(_SC_PAGESIZE)
+AC_CHECK_FUNCS(getpagesize)
 
 AC_CACHE_CHECK([for root],samba_cv_HAVE_ROOT,[
 AC_TRY_RUN([main() { exit(getuid() != 0); }],



svn commit: samba r17553 - in branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules: .

2006-08-15 Thread abartlet
Author: abartlet
Date: 2006-08-15 12:59:46 + (Tue, 15 Aug 2006)
New Revision: 17553

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17553

Log:
Actually enable the samba3sam module.  Should help 'make test'.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk


Changeset:
Modified: branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk
===
--- branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk  2006-08-15 
12:28:23 UTC (rev 17552)
+++ branches/SAMBA_4_0/source/dsdb/samdb/ldb_modules/config.mk  2006-08-15 
12:59:46 UTC (rev 17553)
@@ -26,7 +26,6 @@
 [MODULE::ldb_samba3sam]
 SUBSYSTEM = ldb
 INIT_FUNCTION = ldb_samba3sam_module_init
-ENABLE = NO
 OBJ_FILES = \
samba3sam.o
 #



svn commit: samba r17554 - in branches/SAMBA_3_0/source: . groupdb include lib passdb rpc_server script/tests tdb torture utils

2006-08-15 Thread vlendec
Author: vlendec
Date: 2006-08-15 14:07:15 + (Tue, 15 Aug 2006)
New Revision: 17554

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17554

Log:
Cleanup
Removed:
   branches/SAMBA_3_0/source/lib/tdb_multikey.c
   branches/SAMBA_3_0/source/torture/local-multikey.c
Modified:
   branches/SAMBA_3_0/source/Makefile.in
   branches/SAMBA_3_0/source/groupdb/mapping.c
   branches/SAMBA_3_0/source/include/passdb.h
   branches/SAMBA_3_0/source/include/smb.h
   branches/SAMBA_3_0/source/lib/talloc.c
   branches/SAMBA_3_0/source/passdb/lookup_sid.c
   branches/SAMBA_3_0/source/passdb/passdb.c
   branches/SAMBA_3_0/source/passdb/pdb_interface.c
   branches/SAMBA_3_0/source/passdb/pdb_ldap.c
   branches/SAMBA_3_0/source/rpc_server/srv_lsa_nt.c
   branches/SAMBA_3_0/source/rpc_server/srv_samr_nt.c
   branches/SAMBA_3_0/source/script/tests/test_smbtorture_s3.sh
   branches/SAMBA_3_0/source/tdb/tdbutil.c
   branches/SAMBA_3_0/source/tdb/tdbutil.h
   branches/SAMBA_3_0/source/torture/local-groupmap.c
   branches/SAMBA_3_0/source/torture/torture.c
   branches/SAMBA_3_0/source/utils/net_groupmap.c
   branches/SAMBA_3_0/source/utils/net_rpc_samsync.c
   branches/SAMBA_3_0/source/utils/net_sam.c


Changeset:
Sorry, the patch is too large (3158 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17554


svn commit: samba r17555 - in branches/SAMBA_3_0/source/torture: .

2006-08-15 Thread vlendec
Author: vlendec
Date: 2006-08-15 14:09:12 + (Tue, 15 Aug 2006)
New Revision: 17555

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17555

Log:
Cleanup
Removed:
   branches/SAMBA_3_0/source/torture/local-groupmap.c


Changeset:
Deleted: branches/SAMBA_3_0/source/torture/local-groupmap.c
===
--- branches/SAMBA_3_0/source/torture/local-groupmap.c  2006-08-15 14:07:15 UTC 
(rev 17554)
+++ branches/SAMBA_3_0/source/torture/local-groupmap.c  2006-08-15 14:09:12 UTC 
(rev 17555)
@@ -1,340 +0,0 @@
-/* 
-   Unix SMB/CIFS implementation.
-   Run some local tests for group mapping
-   Copyright (C) Volker Lendecke 2006
-   
-   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"
-
-#define CHECK_STATUS(_status, _expected) do { \
-   if (!NT_STATUS_EQUAL(_status, _expected)) { \
-   printf("(%d) Incorrect status %s - should be %s\n", \
-  __LINE__, nt_errstr(status), nt_errstr(_expected)); \
-   goto fail; \
-   }} while (0)
-
-static NTSTATUS create_v2_mapping(struct tdb_context *tdb,
- const char *sid, gid_t gid,
- enum SID_NAME_USE type,
- const char *nt_name,
- const char *comment)
-{
-   TDB_DATA key, data;
-   NTSTATUS status;
-
-   ZERO_STRUCT(data);
-
-   if (asprintf(&key.dptr, "UNIXGROUP/%s", sid) < 0) {
-   d_fprintf(stderr, "(%s) asprintf failed\n",
- __location__);
-   return NT_STATUS_NO_MEMORY;
-   }
-   key.dsize = strlen(key.dptr)+1;
-   
-   if (!tdb_pack_append(NULL, &data.dptr, &data.dsize, "ddff",
-(uint32)gid, (uint32)type, nt_name, comment)) {
-   d_fprintf(stderr, "(%s) tdb_pack_append failed\n",
- __location__);
-   SAFE_FREE(key.dptr);
-   return NT_STATUS_NO_MEMORY;
-   }
-
-   if (tdb_store(tdb, key, data, TDB_INSERT) < 0) {
-   status = map_ntstatus_from_tdb(tdb);
-   d_fprintf(stderr, "(%s) tdb_store failed: %s\n", __location__,
- nt_errstr(status));
-   SAFE_FREE(key.dptr);
-   TALLOC_FREE(data.dptr);
-   return status;
-   }
-
-   SAFE_FREE(key.dptr);
-   TALLOC_FREE(data.dptr);
-   return NT_STATUS_OK;
-}
-
-#define NUM_ENTRIES (50)
-
-static NTSTATUS create_v2_db(BOOL invalid)
-{
-   struct tdb_context *tdb;
-   NTSTATUS status;
-   int i;
-
-   tdb = tdb_open_log(lock_path("group_mapping.tdb"), 0, TDB_DEFAULT,
-  O_RDWR|O_CREAT, 0600);
-   if (tdb == NULL) {
-   d_fprintf(stderr, "(%s) tdb_open_log failed: %s\n",
- __location__, strerror(errno));
-   status = map_nt_error_from_unix(errno);
-   goto fail;
-   }
-
-   /* Empty the database */
-   tdb_traverse(tdb, tdb_traverse_delete_fn, NULL);
-
-   if (tdb_store_int32(tdb, "INFO/version", 2) < 0) {
-   status = map_ntstatus_from_tdb(tdb);
-   d_fprintf(stderr, "(%s) tdb_store_uint32 failed: %s\n",
- __location__, nt_errstr(status));
-   goto fail;
-   }
-
-   for (i=1000; i<1000+NUM_ENTRIES; i++) {
-   char *sid, *name;
-   if (asprintf(&sid, "S-1-5-21-744032650-3806004166-77016029-%d",
-i) < 0) {
-   d_fprintf(stderr, "(%s) asprintf failed\n",
- __location__);
-   goto fail;
-   }
-   if (asprintf(&name, "Unix group %d", i) < 0) {
-   d_fprintf(stderr, "(%s) asprintf failed\n",
- __location__);
-   SAFE_FREE(sid);
-   goto fail;
-   }
-   status = create_v2_mapping(tdb, sid, (gid_t)i,
-  SID_NAME_DOM_GRP, name, name);
-   SAFE_FREE(sid);
-   SAFE_FREE(name);
-   CHECK_STATUS(status, NT_STATUS_OK);
- 

svn commit: samba r17556 - in branches/SAMBA_3_0/source/libsmb: .

2006-08-15 Thread vlendec
Author: vlendec
Date: 2006-08-15 14:18:15 + (Tue, 15 Aug 2006)
New Revision: 17556

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17556

Log:
Remove duplicate entries. Thanks to Michael Adam <[EMAIL PROTECTED]>

Volker
Modified:
   branches/SAMBA_3_0/source/libsmb/nterr.c


Changeset:
Modified: branches/SAMBA_3_0/source/libsmb/nterr.c
===
--- branches/SAMBA_3_0/source/libsmb/nterr.c2006-08-15 14:09:12 UTC (rev 
17555)
+++ branches/SAMBA_3_0/source/libsmb/nterr.c2006-08-15 14:18:15 UTC (rev 
17556)
@@ -572,7 +572,6 @@
{ "Unexpected information received",NT_STATUS_INVALID_PARAMETER },
{ "Memory allocation error",NT_STATUS_NO_MEMORY },
{ "No domain controllers located",  
NT_STATUS_DOMAIN_CONTROLLER_NOT_FOUND },
-   { "Account locked out", NT_STATUS_ACCOUNT_LOCKED_OUT },
{ "Named pipe not available",   NT_STATUS_PIPE_NOT_AVAILABLE },
{ "Not implemented",NT_STATUS_NOT_IMPLEMENTED },
{ "Invalid information class",  NT_STATUS_INVALID_INFO_CLASS },
@@ -583,7 +582,6 @@
{ "No memory",  NT_STATUS_NO_MEMORY },
{ "Buffer too small",   NT_STATUS_BUFFER_TOO_SMALL },
{ "Revision mismatch",  NT_STATUS_REVISION_MISMATCH },
-   { "No logon servers",   NT_STATUS_NO_LOGON_SERVERS },
{ "No such logon session",  NT_STATUS_NO_SUCH_LOGON_SESSION 
},
{ "No such privilege",  NT_STATUS_NO_SUCH_PRIVILEGE },
{ "Procedure not found",NT_STATUS_PROCEDURE_NOT_FOUND },



svn commit: samba r17557 - in branches/SAMBA_3_0/source/utils: .

2006-08-15 Thread vlendec
Author: vlendec
Date: 2006-08-15 14:27:20 + (Tue, 15 Aug 2006)
New Revision: 17557

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17557

Log:
Change net_join_domain to return NTSTATUS instead of int.

Thanks to Michael Adam <[EMAIL PROTECTED]>.

Volker
Modified:
   branches/SAMBA_3_0/source/utils/net_ads.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_ads.c
===
--- branches/SAMBA_3_0/source/utils/net_ads.c   2006-08-15 14:18:15 UTC (rev 
17556)
+++ branches/SAMBA_3_0/source/utils/net_ads.c   2006-08-15 14:27:20 UTC (rev 
17557)
@@ -887,28 +887,27 @@
  Do the domain join
  /
 
-static int net_join_domain( TALLOC_CTX *ctx, const char *servername, 
-struct in_addr *ip, DOM_SID **dom_sid, const char 
*password )
+static NTSTATUS net_join_domain(TALLOC_CTX *ctx, const char *servername, 
+   struct in_addr *ip, DOM_SID **dom_sid, 
+   const char *password)
 {
-   int ret = -1;
+   NTSTATUS ret = NT_STATUS_UNSUCCESSFUL;
struct cli_state *cli = NULL;
 
-   if ( !NT_STATUS_IS_OK(connect_to_ipc_krb5(&cli, ip, servername)) )
+   ret = connect_to_ipc_krb5(&cli, ip, servername);
+   if ( !NT_STATUS_IS_OK(ret) ) {
goto done;
+   }

saf_store( cli->server_domain, cli->desthost );
 
-   if ( !NT_STATUS_IS_OK(netdom_get_domain_sid( ctx, cli, dom_sid )) )
+   ret = netdom_get_domain_sid( ctx, cli, dom_sid );
+   if ( !NT_STATUS_IS_OK(ret) ) {
goto done;
-
-   if ( !NT_STATUS_IS_OK(netdom_join_domain( ctx, cli, *dom_sid, 
-   password, ND_TYPE_AD )) )
-   {
-   goto done;
}
-   
-   ret = 0;
 
+   ret = netdom_join_domain( ctx, cli, *dom_sid, password, ND_TYPE_AD );
+
 done:
if ( cli ) 
cli_shutdown(cli);
@@ -1171,6 +1170,7 @@
 {
ADS_STRUCT *ads = NULL;
ADS_STATUS status;
+   NTSTATUS nt_status;
char *machine_account = NULL;
const char *short_domain_name = NULL;
char *tmp_password, *password;
@@ -1239,9 +1239,10 @@
tmp_password = 
generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
password = talloc_strdup(ctx, tmp_password);

-   if ( net_join_domain( ctx, ads->config.ldap_server_name, &ads->ldap_ip, 
&domain_sid, password ) != 0 ) {
-   /* There should be more detailed output here... */
-   d_fprintf(stderr, "call of net_join_domain failed\n");
+   nt_status = net_join_domain(ctx, ads->config.ldap_server_name, 
+   &ads->ldap_ip, &domain_sid, password);
+   if ( !NT_STATUS_IS_OK(nt_status) ) {
+   d_fprintf(stderr, "call of net_join_domain failed: %s\n", 
nt_errstr(nt_status));
goto fail;
}




svn commit: samba r17558 - in branches/SOC/bnh/perl: .

2006-08-15 Thread brad
Author: brad
Date: 2006-08-15 21:27:22 + (Tue, 15 Aug 2006)
New Revision: 17558

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17558

Log:
Moved the VM object out of vm_setup.pl and into its own module, VMHost.pm.

The behaviour of vm_setup.pl has changed in that it takes a snapshot following 
a successful initial setup.
This way, we can revert to that snapshot if something goes wrong during 'make 
wintest'.

As well, the revert_snapshot() function has been rewritten. 
It now requires that the VM configuration setting 'When Powering Off' is set to 
'Revert to snapshot' (snapshot.action="autoRevert" in the guest's .vmx file).
This should not be a permanent change, but I'm not sure why the old 
revert_snapshot() code no longer works for me.


Added:
   branches/SOC/bnh/perl/VMHost.pm
Modified:
   branches/SOC/bnh/perl/initial_setup.conf
   branches/SOC/bnh/perl/vm_setup.pl


Changeset:
Sorry, the patch is too large (778 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17558


svn commit: samba r17559 - in branches/SOC/bnh/vbscript: .

2006-08-15 Thread brad
Author: brad
Date: 2006-08-15 21:32:14 + (Tue, 15 Aug 2006)
New Revision: 17559

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17559

Log:
Modified win_setup.wsf so that the windows telnet server service starts 
automatically, rather than manually.
This way, if the guest is shutdown and restarted, it does not require user 
intervention.


Modified:
   branches/SOC/bnh/vbscript/win_setup.wsf


Changeset:
Modified: branches/SOC/bnh/vbscript/win_setup.wsf
===
--- branches/SOC/bnh/vbscript/win_setup.wsf 2006-08-15 21:27:22 UTC (rev 
17558)
+++ branches/SOC/bnh/vbscript/win_setup.wsf 2006-08-15 21:32:14 UTC (rev 
17559)
@@ -103,10 +103,10 @@
exit function
end if
 
-   ' Set the telnet service start mode to Manual.
+   ' Set the telnet service start mode to Automatic.
set method = telnet_service.methods_("ChangeStartMode")
set inParam = method.inParameters.spawnInstance_()
-   inParam.startMode = "Manual"
+   inParam.startMode = "Automatic"
 
set error_obj = telnet_service.execMethod_("ChangeStartMode", inParam)
if error_obj.returnValue <> 0 then
@@ -115,7 +115,7 @@
start_telnet_service = error_obj.returnValue
exit function
end if
-   stdout.writeline "Telnet service enabled - Manual start mode."
+   stdout.writeline "Telnet service enabled - Automatic start mode."
 
' net start telnet
set shell = wscript.createObject("wscript.shell")



svn commit: samba r17560 - in branches/SOC/bnh: . build_farm

2006-08-15 Thread brad
Author: brad
Date: 2006-08-15 21:50:41 + (Tue, 15 Aug 2006)
New Revision: 17560

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17560

Log:
bnhtest.fns is an example of a hostname.fns file which would be used to run 
'make wintest' in the build farm as root.
It is basically a stripped down version of generic.fns which only tests the 
samba4 tree.
When it is run with 'make test', the status of the wintest is not shown on the 
host information status summary at the top of the page.
The results are displayed in the Build log output under 'test_windows', and its 
status is reflected in the summary when make test is not run.

If you are interested what it looks like in the build farm, please look at the 
host bnhtest (Slackware 10.2).
Once I commit a corrected make_wintest.patch, this will be more useful.


Added:
   branches/SOC/bnh/build_farm/
   branches/SOC/bnh/build_farm/bnhtest.fns


Changeset:
Added: branches/SOC/bnh/build_farm/bnhtest.fns
===
--- branches/SOC/bnh/build_farm/bnhtest.fns 2006-08-15 21:32:14 UTC (rev 
17559)
+++ branches/SOC/bnh/build_farm/bnhtest.fns 2006-08-15 21:50:41 UTC (rev 
17560)
@@ -0,0 +1,38 @@
+
+action_test_windows() {
+   # rebuild
+   do_make wintest
+   w_status=$?
+   echo "WINTEST STATUS: $w_status"
+   return $w_status;
+}
+
+per_run_hook
+
+system=`uname`
+
+for compiler in gcc cc icc; do
+
+  # arrgh, "which" gives no err code on solaris
+  path=`which $compiler`
+  if [ -x "$path" ]; then
+
+if $compiler -v 2>&1 | grep gcc.version > /dev/null; then
+   isgcc=1
+   CFLAGS="-Wall"
+   export CFLAGS
+else
+   CFLAGS=""
+   export CFLAGS
+   isgcc=0
+fi
+if [ $compiler = gcc -o $isgcc = 0 ]; then
+
+  # only attempt samba4 if we have perl
+  if which perl > /dev/null; then
+test_tree samba4 source $compiler configure build install test 
test_windows
+  fi
+
+fi
+  fi
+done



svn commit: samba r17561 - in branches/SOC/bnh/perl: .

2006-08-15 Thread brad
Author: brad
Date: 2006-08-15 21:54:43 + (Tue, 15 Aug 2006)
New Revision: 17561

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17561

Log:
Two small perl scripts which are used in `make wintest', provided here as 
straightforward examples of using the VMHost.pm module.


Added:
   branches/SOC/bnh/perl/vm_get_ip.pl
   branches/SOC/bnh/perl/vm_load_snapshot.pl


Changeset:
Added: branches/SOC/bnh/perl/vm_get_ip.pl
===
--- branches/SOC/bnh/perl/vm_get_ip.pl  2006-08-15 21:50:41 UTC (rev 17560)
+++ branches/SOC/bnh/perl/vm_get_ip.pl  2006-08-15 21:54:43 UTC (rev 17561)
@@ -0,0 +1,48 @@
+#!/usr/bin/perl -w
+
+# A perl script to connect to a VMware server and get the IP address of a VM.
+# Copyright Brad Henry <[EMAIL PROTECTED]> 2006
+# Released under the GNU GPL v2 or later.
+
+use VMHost;
+
+sub check_error {
+   my $vm = VMHost;
+   my $custom_err_str = "";
+   ($vm, $custom_err_str) = @_;
+
+   my ($err_code, $err_str) = $vm->error;
+   if ($err_code != 0) {
+   undef $vm;
+   die $custom_err_str . "Returned $err_code: $err_str.\n";
+   }
+}
+
+# Read in parameters from environment.
+my $vm_cfg_path = $ENV{'VM_CFG_PATH'};
+my $host_server_name = $ENV{'HOST_SERVER_NAME'};
+my $host_server_port = $ENV{'HOST_SERVER_PORT'};
+if (!defined($host_server_port)) {
+   $host_server_port = 902;
+}
+
+my $host_username = $ENV{'HOST_USERNAME'};
+my $host_password = $ENV{'HOST_PASSWORD'};
+my $guest_admin_username = $ENV{'GUEST_ADMIN_USERNAME'};
+my $guest_admin_password = $ENV{'GUEST_ADMIN_PASSWORD'};
+
+my $vm = VMHost;
+
+$vm->host_connect($host_server_name, $host_server_port, $host_username,
+   $host_password, $vm_cfg_path, $guest_admin_username,
+   $guest_admin_password);
+check_error($vm, "Error in \$vm->host_connect().\n");
+
+my $guest_ip = $vm->get_guest_ip();
+check_error($vm, "Error in \$vm->get_guest_ip().\n");
+
+print $guest_ip;
+
+undef $vm;
+
+exit 0;

Added: branches/SOC/bnh/perl/vm_load_snapshot.pl
===
--- branches/SOC/bnh/perl/vm_load_snapshot.pl   2006-08-15 21:50:41 UTC (rev 
17560)
+++ branches/SOC/bnh/perl/vm_load_snapshot.pl   2006-08-15 21:54:43 UTC (rev 
17561)
@@ -0,0 +1,46 @@
+#!/usr/bin/perl -w
+
+# A perl script to connect to a VMware server and revert a VM snapshot.
+# Copyright Brad Henry <[EMAIL PROTECTED]> 2006
+# Released under the GNU GPL v2 or later.
+
+use VMHost;
+
+sub check_error {
+my $vm = VMHost;
+   my $custom_err_str = "";
+   ($vm, $custom_err_str) = @_;
+
+   my ($err_code, $err_str) = $vm->error;
+   if ($err_code != 0) {
+   undef $vm;
+   die $custom_err_str . "Returned $err_code: $err_str.\n";
+   }
+}
+
+# Read in parameters from environment.
+my $vm_cfg_path = $ENV{'VM_CFG_PATH'};
+my $host_server_name = $ENV{'HOST_SERVER_NAME'};
+my $host_server_port = $ENV{'HOST_SERVER_PORT'};
+if (!defined($host_server_port)) {
+   $host_server_port = 902;
+}
+
+my $host_username = $ENV{'HOST_USERNAME'};
+my $host_password = $ENV{'HOST_PASSWORD'};
+my $guest_admin_username = $ENV{'GUEST_ADMIN_USERNAME'};
+my $guest_admin_password = $ENV{'GUEST_ADMIN_PASSWORD'};
+
+my $vm = VMHost;
+
+$vm->host_connect($host_server_name, $host_server_port, $host_username,
+   $host_password, $vm_cfg_path, $guest_admin_username,
+   $guest_admin_password);
+check_error($vm, "Error in \$vm->host_connect().\n");
+
+$vm->revert_snapshot();
+check_error($vm, "Error in \$vm->revert_snapshot().\n");
+
+undef $vm;
+
+exit 0;



svn commit: samba r17562 - in branches/SOC/bnh: .

2006-08-15 Thread brad
Author: brad
Date: 2006-08-15 22:58:39 + (Tue, 15 Aug 2006)
New Revision: 17562

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17562

Log:
This Samba 4 patch (generated against r17553), is a cleaned up version of the 
last patch I created to provide a 'make wintest' framework within the Samba 4 
build system.

Two perl scripts have been added to get the VM guest's IP address (rather than 
specified in the config file), and revert a VM snapshot on error, using the 
VMware scripting api's (abstracted by the VMHost.pm module).
The vmware server can reside on the build farm host or another system.
These scripts are also included in the perl/ subdirectory of my SOC branch.

This test does not run by default, and is implied by the bnhtest.fns file at 
the root of my SOC branch.



Modified:
   branches/SOC/bnh/make_wintest.patch


Changeset:
Sorry, the patch is too large (944 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17562


svn commit: samba r17563 - in branches/SOC/mkhl: . ejs-map

2006-08-15 Thread mkhl
Author: mkhl
Date: 2006-08-15 23:18:20 + (Tue, 15 Aug 2006)
New Revision: 17563

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17563

Log:
Add a subtree for adding support for ldb_map mappings in ejs.
Currently contains incoherent sketches how it might maybe work, someday.

Martin

Added:
   branches/SOC/mkhl/ejs-map/
   branches/SOC/mkhl/ejs-map/ejs.patch
   branches/SOC/mkhl/ejs-map/ejs_map.c
   branches/SOC/mkhl/ejs-map/entryUUID.js
   branches/SOC/mkhl/ejs-map/entryUUID_support.c
   branches/SOC/mkhl/ejs-map/ldbMap.js
   branches/SOC/mkhl/ejs-map/ldb_map.c-privdat.patch
   branches/SOC/mkhl/ejs-map/ldb_map.h-privdat.patch
   branches/SOC/mkhl/ejs-map/samba3sam.c-privdat.patch


Changeset:
Sorry, the patch is too large (892 lines) to include; please use WebSVN to see 
it!
WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17563


Build status as of Wed Aug 16 00:00:02 2006

2006-08-15 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2006-08-15 
00:00:20.0 +
+++ /home/build/master/cache/broken_results.txt 2006-08-16 00:00:05.0 
+
@@ -1,18 +1,18 @@
-Build status as of Tue Aug 15 00:00:02 2006
+Build status as of Wed Aug 16 00:00:02 2006
 
 Build counts:
 Tree Total  Broken Panic 
 SOC  0  0  0 
 ccache   22 4  0 
-distcc   22 2  0 
+distcc   23 2  0 
 lorikeet-heimdal 0  0  0 
 ppp  12 0  0 
 rsync27 2  0 
 samba0  0  0 
 samba-docs   0  0  0 
-samba4   35 18 4 
-samba_3_031 7  0 
-smb-build20 20 0 
-talloc   16 4  0 
+samba4   35 20 4 
+samba_3_031 6  0 
+smb-build19 19 0 
+talloc   15 4  0 
 tdb  23 8  0 
 


svn commit: samba r17564 - in branches/SAMBA_4_0/source/build/m4: .

2006-08-15 Thread metze
Author: metze
Date: 2006-08-16 05:59:24 + (Wed, 16 Aug 2006)
New Revision: 17564

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17564

Log:
we don't need a AC_TRY_RUN to test the compiler warning options

metze
Modified:
   branches/SAMBA_4_0/source/build/m4/check_cc.m4


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/check_cc.m4
===
--- branches/SAMBA_4_0/source/build/m4/check_cc.m4  2006-08-15 23:18:20 UTC 
(rev 17563)
+++ branches/SAMBA_4_0/source/build/m4/check_cc.m4  2006-08-16 05:59:24 UTC 
(rev 17564)
@@ -167,7 +167,7 @@
OLD_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} ${DEVELOPER_CFLAGS}"
AC_MSG_CHECKING([that the C compiler can use the DEVELOPER_CFLAGS])
-   AC_TRY_RUN([#include "${srcdir-.}/build/tests/trivial.c"],
+   AC_TRY_COMPILE([],[],
AC_MSG_RESULT(yes),
DEVELOPER_CFLAGS=""; AC_MSG_RESULT(no))
CFLAGS="${OLD_CFLAGS}"



svn commit: samba r17565 - in branches/SAMBA_4_0/source/build/m4: .

2006-08-15 Thread metze
Author: metze
Date: 2006-08-16 06:04:36 + (Wed, 16 Aug 2006)
New Revision: 17565

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17565

Log:
expand the test for negative enum values, systems like Tru64
truncate the value to INT_MAX...
So a AC_TRY_RUN test is needed here

metze
Modified:
   branches/SAMBA_4_0/source/build/m4/check_cc.m4


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/check_cc.m4
===
--- branches/SAMBA_4_0/source/build/m4/check_cc.m4  2006-08-16 05:59:24 UTC 
(rev 17564)
+++ branches/SAMBA_4_0/source/build/m4/check_cc.m4  2006-08-16 06:04:36 UTC 
(rev 17565)
@@ -86,11 +86,28 @@
 
 
 # check if the compiler can handle negative enum values
+# and don't truncate the values to INT_MAX
+# a runtime test is needed here
 AC_CACHE_CHECK([that the C compiler understands negative enum 
values],SMB_BUILD_CC_NEGATIVE_ENUM_VALUES, [
-AC_TRY_COMPILE([
-#include ],
+AC_TRY_RUN(
 [
+   #include 
enum negative_values { NEGATIVE_VALUE = 0x };
+   int main(void) {
+   enum negative_values v1 = NEGATIVE_VALUE;
+   unsigned v2 = NEGATIVE_VALUE;
+
+   if (v1 != 0x) {
+   printf("%u != 0x\n", v1);
+   return 1;
+   }
+   if (v2 != 0x) {
+   printf("%u != 0x\n", v2);
+   return 1;
+   }
+
+   return 0;
+   }
 ],

SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=yes,SMB_BUILD_CC_NEGATIVE_ENUM_VALUES=no)])
 if test x"$SMB_BUILD_CC_NEGATIVE_ENUM_VALUES" != x"yes"; then



svn commit: samba r17566 - in branches/SAMBA_4_0/source/build/m4: .

2006-08-15 Thread metze
Author: metze
Date: 2006-08-16 06:11:22 + (Wed, 16 Aug 2006)
New Revision: 17566

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17566

Log:
test if the compiler support inline, this results
in 

#define inline

if the compiler doesn't support it

This hopefully fix the build on some hosts,
however we should not start to use inline in our
code this is more to not need to touch imported files
from heimdal or popt.

metze
Modified:
   branches/SAMBA_4_0/source/build/m4/check_cc.m4


Changeset:
Modified: branches/SAMBA_4_0/source/build/m4/check_cc.m4
===
--- branches/SAMBA_4_0/source/build/m4/check_cc.m4  2006-08-16 06:04:36 UTC 
(rev 17565)
+++ branches/SAMBA_4_0/source/build/m4/check_cc.m4  2006-08-16 06:11:22 UTC 
(rev 17566)
@@ -26,6 +26,8 @@
 dnl needed before AC_TRY_COMPILE
 AC_ISC_POSIX
 
+AC_C_INLINE
+
 AC_CACHE_CHECK([that the C compiler can precompile header 
files],samba_cv_precompiled_headers, [
dnl Check whether the compiler can generate precompiled headers
touch conftest.h