svn commit: samba r10527 - in branches/SAMBA_4_0/source/script: .

2005-09-27 Thread tridge
Author: tridge
Date: 2005-09-27 07:11:33 + (Tue, 27 Sep 2005)
New Revision: 10527

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

Log:

don't attempt self gdb attach if running under valgrind. This was
causing fort to get rather unhappy


Modified:
   branches/SAMBA_4_0/source/script/gdb_backtrace


Changeset:
Modified: branches/SAMBA_4_0/source/script/gdb_backtrace
===
--- branches/SAMBA_4_0/source/script/gdb_backtrace  2005-09-27 05:11:14 UTC 
(rev 10526)
+++ branches/SAMBA_4_0/source/script/gdb_backtrace  2005-09-27 07:11:33 UTC 
(rev 10527)
@@ -1,5 +1,10 @@
 #!/bin/sh
 
+if [ -n $VALGRIND -o -n $SMBD_VALGRIND ]; then
+echo Not running gdb under valgrind
+exit 1
+fi
+
 # we want everything on stderr, so the program is not disturbed
 exec 12
 



svn commit: samba-docs r815 - in trunk/smbdotconf/tuning: .

2005-09-27 Thread ab
Author: ab
Date: 2005-09-27 08:42:49 + (Tue, 27 Sep 2005)
New Revision: 815

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

Log:
Code in Samba 3 states use sendfile = false so documentation must reflect it
Modified:
   trunk/smbdotconf/tuning/usesendfile.xml


Changeset:
Modified: trunk/smbdotconf/tuning/usesendfile.xml
===
--- trunk/smbdotconf/tuning/usesendfile.xml 2005-09-16 19:06:50 UTC (rev 
814)
+++ trunk/smbdotconf/tuning/usesendfile.xml 2005-09-27 08:42:49 UTC (rev 
815)
@@ -13,5 +13,5 @@
 /para
 /description
 
-value type=defaultyes/value
+value type=defaultfalse/value
 /samba:parameter



svn commit: samba r10528 - in branches/SAMBA_4_0/source: client gtk/common include lib lib/cmdline lib/samba3 ntvfs/cifs rpc_server/remote scripting/ejs torture torture/basic torture/rpc utils

2005-09-27 Thread jelmer
Author: jelmer
Date: 2005-09-27 10:00:27 + (Tue, 27 Sep 2005)
New Revision: 10528

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

Log:
Add credentials.h back into includes.h as some compilers don't 
seem to be able to handle incomplete enum types.

Modified:
   branches/SAMBA_4_0/source/client/client.c
   branches/SAMBA_4_0/source/gtk/common/credentials.c
   branches/SAMBA_4_0/source/include/includes.h
   branches/SAMBA_4_0/source/include/structs.h
   branches/SAMBA_4_0/source/lib/cmdline/popt_common.c
   branches/SAMBA_4_0/source/lib/credentials.c
   branches/SAMBA_4_0/source/lib/samba3/secrets.c
   branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c
   branches/SAMBA_4_0/source/rpc_server/remote/dcesrv_remote.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_cli.c
   branches/SAMBA_4_0/source/scripting/ejs/smbcalls_creds.c
   branches/SAMBA_4_0/source/torture/basic/secleak.c
   branches/SAMBA_4_0/source/torture/gentest.c
   branches/SAMBA_4_0/source/torture/locktest.c
   branches/SAMBA_4_0/source/torture/masktest.c
   branches/SAMBA_4_0/source/torture/rpc/samlogon.c
   branches/SAMBA_4_0/source/torture/rpc/samsync.c
   branches/SAMBA_4_0/source/torture/rpc/schannel.c
   branches/SAMBA_4_0/source/utils/ntlm_auth.c


Changeset:
Modified: branches/SAMBA_4_0/source/client/client.c
===
--- branches/SAMBA_4_0/source/client/client.c   2005-09-27 07:11:33 UTC (rev 
10527)
+++ branches/SAMBA_4_0/source/client/client.c   2005-09-27 10:00:27 UTC (rev 
10528)
@@ -32,7 +32,6 @@
 #include system/dir.h
 #include system/filesys.h
 #include dlinklist.h
-#include credentials.h
 #include system/readline.h
 #include pstring.h
 

Modified: branches/SAMBA_4_0/source/gtk/common/credentials.c
===
--- branches/SAMBA_4_0/source/gtk/common/credentials.c  2005-09-27 07:11:33 UTC 
(rev 10527)
+++ branches/SAMBA_4_0/source/gtk/common/credentials.c  2005-09-27 10:00:27 UTC 
(rev 10528)
@@ -20,7 +20,6 @@
 
 #include includes.h
 #include gtk/common/gtk-smb.h
-#include include/credentials.h
 
 static void gtk_get_credentials(struct cli_credentials *credentials)
 {

Modified: branches/SAMBA_4_0/source/include/includes.h
===
--- branches/SAMBA_4_0/source/include/includes.h2005-09-27 07:11:33 UTC 
(rev 10527)
+++ branches/SAMBA_4_0/source/include/includes.h2005-09-27 10:00:27 UTC 
(rev 10528)
@@ -114,6 +114,7 @@
 #include ntvfs/ntvfs.h
 #include cli_context.h
 #include lib/com/com.h
+#include credentials.h
 
 #define malloc_p(type) (type *)malloc(sizeof(type))
 #define malloc_array_p(type, count) (type *)realloc_array(NULL, sizeof(type), 
count)

Modified: branches/SAMBA_4_0/source/include/structs.h
===
--- branches/SAMBA_4_0/source/include/structs.h 2005-09-27 07:11:33 UTC (rev 
10527)
+++ branches/SAMBA_4_0/source/include/structs.h 2005-09-27 10:00:27 UTC (rev 
10528)
@@ -297,7 +297,3 @@
 struct param_context;
 struct param_section;
 struct param;
-
-enum credentials_obtained;
-struct cli_credentials;
-struct ccache_container;

Modified: branches/SAMBA_4_0/source/lib/cmdline/popt_common.c
===
--- branches/SAMBA_4_0/source/lib/cmdline/popt_common.c 2005-09-27 07:11:33 UTC 
(rev 10527)
+++ branches/SAMBA_4_0/source/lib/cmdline/popt_common.c 2005-09-27 10:00:27 UTC 
(rev 10528)
@@ -25,7 +25,6 @@
 #include system/filesys.h
 #include system/passwd.h
 #include lib/cmdline/popt_common.h
-#include credentials.h
 
 /* Handle command line options:
  * -d,--debuglevel 

Modified: branches/SAMBA_4_0/source/lib/credentials.c
===
--- branches/SAMBA_4_0/source/lib/credentials.c 2005-09-27 07:11:33 UTC (rev 
10527)
+++ branches/SAMBA_4_0/source/lib/credentials.c 2005-09-27 10:00:27 UTC (rev 
10528)
@@ -27,7 +27,6 @@
 #include librpc/gen_ndr/ndr_samr.h /* for struct samrPassword */
 #include system/kerberos.h
 #include auth/kerberos/kerberos.h
-#include include/credentials.h
 
 
 /**

Modified: branches/SAMBA_4_0/source/lib/samba3/secrets.c
===
--- branches/SAMBA_4_0/source/lib/samba3/secrets.c  2005-09-27 07:11:33 UTC 
(rev 10527)
+++ branches/SAMBA_4_0/source/lib/samba3/secrets.c  2005-09-27 10:00:27 UTC 
(rev 10528)
@@ -30,7 +30,6 @@
 #include system/filesys.h
 #include librpc/gen_ndr/ndr_security.h
 #include lib/tdb/include/tdbutil.h
-#include credentials.h
 
 /**
  * Unpack SID into a pointer

Modified: branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c
===
--- branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c 2005-09-27 07:11:33 UTC 
(rev 10527)
+++ 

svn commit: samba r10529 - in branches/SAMBA_4_0/source/libcli/composite: .

2005-09-27 Thread metze
Author: metze
Date: 2005-09-27 10:29:13 + (Tue, 27 Sep 2005)
New Revision: 10529

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

Log:
fix a crash bug in full async code the uses the composite_trigger_done() code
the event subsystem wants to free timed_events!

metze
Modified:
   branches/SAMBA_4_0/source/libcli/composite/composite.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/composite/composite.c
===
--- branches/SAMBA_4_0/source/libcli/composite/composite.c  2005-09-27 
10:00:27 UTC (rev 10528)
+++ branches/SAMBA_4_0/source/libcli/composite/composite.c  2005-09-27 
10:29:13 UTC (rev 10529)
@@ -52,6 +52,12 @@
 {
struct composite_context *c = talloc_get_type(ptr, struct 
composite_context);
if (c-async.fn) {
+   /*
+* the event is a child of req,
+* and req will be free'ed by the callback fn
+* but the events code wants to free the event itself
+*/
+   talloc_steal(ev, te);   
c-async.fn(c);
}
 }



svn commit: samba r10530 - in branches/SAMBA_4_0/source/libcli/wrepl: .

2005-09-27 Thread metze
Author: metze
Date: 2005-09-27 10:31:57 + (Tue, 27 Sep 2005)
New Revision: 10530

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

Log:
- fix some crash bugs when we lost the connection...

metze
Modified:
   branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c
   branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.h


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c
===
--- branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c   2005-09-27 10:29:13 UTC 
(rev 10529)
+++ branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c   2005-09-27 10:31:57 UTC 
(rev 10530)
@@ -31,6 +31,8 @@
 */
 static void wrepl_socket_dead(struct wrepl_socket *wrepl_socket)
 {
+   wrepl_socket-dead = True;
+
event_set_fd_flags(wrepl_socket-fde, 0);
 
while (wrepl_socket-send_queue) {
@@ -118,7 +120,10 @@
  req-buffer.data + req-num_read,
  4 - req-num_read,
  nread, 0);
-   if (NT_STATUS_IS_ERR(req-status)) goto failed;
+   if (NT_STATUS_IS_ERR(req-status)) {
+   wrepl_socket_dead(wrepl_socket);
+   return;
+   }
if (!NT_STATUS_IS_OK(req-status)) return;
 
req-num_read += nread;
@@ -140,7 +145,10 @@
  req-buffer.data + req-num_read,
  req-buffer.length - req-num_read,
  nread, 0);
-   if (NT_STATUS_IS_ERR(req-status)) goto failed;
+   if (NT_STATUS_IS_ERR(req-status)) {
+   wrepl_socket_dead(wrepl_socket);
+   return;
+   }
if (!NT_STATUS_IS_OK(req-status)) return;
 
req-num_read += nread;
@@ -275,6 +283,7 @@
 
wrepl_socket-send_queue = NULL;
wrepl_socket-recv_queue = NULL;
+   wrepl_socket-dead   = False;
 
wrepl_socket-fde = event_add_fd(wrepl_socket-event_ctx, wrepl_socket, 
 socket_get_fd(wrepl_socket-sock), 
@@ -368,8 +377,37 @@
return wrepl_connect_recv(req);
 }
 
+/* 
+   callback from wrepl_request_trigger() 
+*/
+static void wrepl_request_trigger_handler(struct event_context *ev, struct 
timed_event *te,
+ struct timeval t, void *ptr)
+{
+   struct wrepl_request *req = talloc_get_type(ptr, struct wrepl_request);
+   if (req-async.fn) {
+   /*
+* the event is a child of req,
+* and req will be free'ed by the callback fn
+* but the events code wants to free the event itself
+*/
+   talloc_steal(ev, te);
+   req-async.fn(req);
+   }
+}
 
 /*
+  trigger an immediate event on a wrepl_request
+*/
+static void wrepl_request_trigger(struct wrepl_request *req)
+{
+   /* a zero timeout means immediate */
+   event_add_timed(req-wrepl_socket-event_ctx,
+   req, timeval_zero(),
+   wrepl_request_trigger_handler, req);
+}
+
+
+/*
   send a generic wins replication request
 */
 struct wrepl_request *wrepl_request_send(struct wrepl_socket *wrepl_socket,
@@ -381,12 +419,20 @@
req = talloc_zero(wrepl_socket, struct wrepl_request);
if (req == NULL) goto failed;
 
+   if (wrepl_socket-dead) {
+   req-wrepl_socket = wrepl_socket;
+   req-state= WREPL_REQUEST_ERROR;
+   req-status   = NT_STATUS_INVALID_CONNECTION;
+   wrepl_request_trigger(req);
+   return req;
+   }
+
req-wrepl_socket = wrepl_socket;
req-state= WREPL_REQUEST_SEND;
 
wrap.packet = *packet;
req-status = ndr_push_struct_blob(req-buffer, req, wrap,
-  
(ndr_push_flags_fn_t)ndr_push_wrepl_wrap);   
+  
(ndr_push_flags_fn_t)ndr_push_wrepl_wrap);
if (!NT_STATUS_IS_OK(req-status)) goto failed;
 
if (DEBUGLVL(10)) {
@@ -468,6 +514,7 @@
struct wrepl_packet *packet=NULL;
NTSTATUS status;
status = wrepl_request_recv(req, req-wrepl_socket, packet);
+   NT_STATUS_NOT_OK_RETURN(status);
if (packet-mess_type != WREPL_START_ASSOCIATION_REPLY) {
status = NT_STATUS_UNEXPECTED_NETWORK_ERROR;
}
@@ -527,6 +574,7 @@
int i;
 
status = wrepl_request_recv(req, req-wrepl_socket, packet);
+   NT_STATUS_NOT_OK_RETURN(status);
if (packet-mess_type != WREPL_REPLICATION) {
status = NT_STATUS_NETWORK_ACCESS_DENIED;
} else if (packet-message.replication.command != 
WREPL_REPL_TABLE_REPLY) {
@@ -630,6 +678,7 @@
int i;
 
status = wrepl_request_recv(req, req-wrepl_socket, packet);
+   

svn commit: samba r10531 - in branches/SAMBA_4_0/source: heimdal_build lib/socket

2005-09-27 Thread jelmer
Author: jelmer
Date: 2005-09-27 10:32:49 + (Tue, 27 Sep 2005)
New Revision: 10531

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

Log:
(hopefully) improve detection of socket-related functions in external libraries

Modified:
   branches/SAMBA_4_0/source/heimdal_build/config.mk
   branches/SAMBA_4_0/source/lib/socket/config.m4
   branches/SAMBA_4_0/source/lib/socket/config.mk


Changeset:
Modified: branches/SAMBA_4_0/source/heimdal_build/config.mk
===
--- branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-09-27 10:31:57 UTC 
(rev 10530)
+++ branches/SAMBA_4_0/source/heimdal_build/config.mk   2005-09-27 10:32:49 UTC 
(rev 10531)
@@ -324,7 +324,6 @@
HEIMDAL_ROKEN_ADDRINFO \
HEIMDAL_ROKEN_GAI_STRERROR \
HEIMDAL_ROKEN_INET_ATON \
-   EXT_LIB_SOCKET \
EXT_LIB_XNET
 NOPROTO = YES
 # End SUBSYSTEM HEIMDAL_ROKEN

Modified: branches/SAMBA_4_0/source/lib/socket/config.m4
===
--- branches/SAMBA_4_0/source/lib/socket/config.m4  2005-09-27 10:31:57 UTC 
(rev 10530)
+++ branches/SAMBA_4_0/source/lib/socket/config.m4  2005-09-27 10:32:49 UTC 
(rev 10531)
@@ -18,32 +18,17 @@
 # it.
 AC_CHECK_FUNCS(connect)
 if test x$ac_cv_func_connect = xno; then
-case $LIBS $SOCKET_LIBS in
-*-lnsl*) ;;
-*) AC_CHECK_LIB_EXT(nsl_s, SOCKET_LIBS, printf) ;;
-esac
-case $LIBS $SOCKET_LIBS in
-*-lnsl*) ;;
-*) AC_CHECK_LIB_EXT(nsl, SOCKET_LIBS, printf) ;;
-esac
-case $LIBS $SOCKET_LIBS in
-*-lsocket*) ;;
-*) AC_CHECK_LIB_EXT(socket,  SOCKET_LIBS, connect) ;;
-esac
-case $LIBS $SOCKET_LIBS in
-*-linet*) ;;
-*) AC_CHECK_LIB_EXT(inet, SOCKET_LIBS, connect) ;;
-esac
+AC_CHECK_LIB(nsl_s, printf)
+AC_CHECK_LIB(nsl, printf)
+AC_CHECK_LIB(socket, connect)
+AC_CHECK_LIB_EXT(inet, connect)
 dnl We can't just call AC_CHECK_FUNCS(connect) here, because the value
 dnl has been cached.
 if test x$ac_cv_lib_ext_socket_connect = xyes ||
test x$ac_cv_lib_ext_inet_connect = xyes; then
-# ac_cv_func_connect=yes
-# don't!  it would cause AC_CHECK_FUNC to succeed next time configure 
is run
 AC_DEFINE(HAVE_CONNECT,1,[Whether the system has connect()])
 fi
 fi
-SMB_EXT_LIB(SOCKET,[${SOCKET_LIBS}],[${SOCKET_CFLAGS}],[${SOCKET_CPPFLAGS}],[${SOCKET_LDFLAGS}])
 
 
 # check for unix domain sockets

Modified: branches/SAMBA_4_0/source/lib/socket/config.mk
===
--- branches/SAMBA_4_0/source/lib/socket/config.mk  2005-09-27 10:31:57 UTC 
(rev 10530)
+++ branches/SAMBA_4_0/source/lib/socket/config.mk  2005-09-27 10:32:49 UTC 
(rev 10531)
@@ -6,7 +6,6 @@
 INIT_OBJ_FILES = \
lib/socket/socket_ipv4.o
 NOPROTO=YES
-REQUIRED_SUBSYSTEMS = EXT_LIB_SOCKET
 # End MODULE socket_ipv4
 
 
@@ -17,7 +16,6 @@
 INIT_OBJ_FILES = \
lib/socket/socket_ipv6.o
 NOPROTO=YES
-REQUIRED_SUBSYSTEMS = EXT_LIB_SOCKET
 # End MODULE socket_ipv6
 
 
@@ -28,7 +26,6 @@
 INIT_OBJ_FILES = \
lib/socket/socket_unix.o
 NOPROTO=YES
-REQUIRED_SUBSYSTEMS = EXT_LIB_SOCKET
 # End MODULE socket_unix
 
 



svn commit: samba r10532 - in branches/SAMBA_4_0/source/auth: .

2005-09-27 Thread jelmer
Author: jelmer
Date: 2005-09-27 11:02:06 + (Tue, 27 Sep 2005)
New Revision: 10532

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

Log:
Replace next_token() with str_list_make()

Modified:
   branches/SAMBA_4_0/source/auth/auth_sam.c


Changeset:
Modified: branches/SAMBA_4_0/source/auth/auth_sam.c
===
--- branches/SAMBA_4_0/source/auth/auth_sam.c   2005-09-27 10:32:49 UTC (rev 
10531)
+++ branches/SAMBA_4_0/source/auth/auth_sam.c   2005-09-27 11:02:06 UTC (rev 
10532)
@@ -25,7 +25,6 @@
 #include system/time.h
 #include auth/auth.h
 #include lib/ldb/include/ldb.h
-#include pstring.h
 
 /
  Do a specific test for an smb password being correct, given a smb_password and
@@ -161,21 +160,21 @@
/* Test workstation. Workstation list is comma separated. */
if (workstation_list  *workstation_list) {
BOOL invalid_ws = True;
-   const char *s = workstation_list;
-   
-   fstring tok;
-   
-   while (next_token(s, tok, ,, sizeof(tok))) {
+   int i;
+   const char **workstations = str_list_make(mem_ctx, 
workstation_list, ,);
+   
+   for (i = 0; workstations[i]; i++) {
DEBUG(10,(sam_account_ok: checking for workstation 
match '%s' and '%s'\n,
- tok, user_info-workstation_name));
+ workstations[i], 
user_info-workstation_name));
 
-   if (strequal(tok, user_info-workstation_name)) {
+   if (strequal(workstations[i], 
user_info-workstation_name)) {
invalid_ws = False;
-
break;
}
}
 
+   talloc_free(workstations);
+
if (invalid_ws) {
return NT_STATUS_INVALID_WORKSTATION;
}



svn commit: samba r10533 - in branches/SAMBA_4_0/source/lib: .

2005-09-27 Thread jelmer
Author: jelmer
Date: 2005-09-27 11:10:57 + (Tue, 27 Sep 2005)
New Revision: 10533

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

Log:
Eliminate another use of next_token()

Modified:
   branches/SAMBA_4_0/source/lib/util_sock.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/util_sock.c
===
--- branches/SAMBA_4_0/source/lib/util_sock.c   2005-09-27 11:02:06 UTC (rev 
10532)
+++ branches/SAMBA_4_0/source/lib/util_sock.c   2005-09-27 11:10:57 UTC (rev 
10533)
@@ -21,20 +21,16 @@
 
 #include includes.h
 #include system/network.h
-#include pstring.h
 
-
 enum SOCK_OPT_TYPES {OPT_BOOL,OPT_INT,OPT_ON};
 
-typedef struct smb_socket_option {
+static const struct {
const char *name;
int level;
int option;
int value;
int opttype;
-} smb_socket_option;
-
-static const smb_socket_option socket_options[] = {
+} socket_options[] = {
   {SO_KEEPALIVE,  SOL_SOCKET,SO_KEEPALIVE,0, 
OPT_BOOL},
   {SO_REUSEADDR,  SOL_SOCKET,SO_REUSEADDR,0, 
OPT_BOOL},
   {SO_BROADCAST,  SOL_SOCKET,SO_BROADCAST,0, 
OPT_BOOL},
@@ -76,9 +72,11 @@
 /
 void set_socket_options(int fd, const char *options)
 {
-   fstring tok;
+   const char **options_list = str_list_make(NULL, options,  \t,);
+   int j;
 
-   while (next_token(options,tok, \t,, sizeof(tok))) {
+   for (j = 0; options_list[j]; j++) {
+   const char *tok = options_list[j];
int ret=0,i;
int value = 1;
char *p;
@@ -121,5 +119,7 @@
if (ret != 0)
DEBUG(0,(Failed to set socket option %s (Error 
%s)\n,tok, strerror(errno) ));
}
+
+   talloc_free(options_list);
 }
 



svn commit: samba r10534 - in branches/tmp/samba4-winsrepl: . source/auth source/auth/kerberos source/build/m4 source/build/smb_build source/client source/gtk/common source/heimdal_build source/includ

2005-09-27 Thread metze
Author: metze
Date: 2005-09-27 11:24:03 + (Tue, 27 Sep 2005)
New Revision: 10534

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

Log:
 [EMAIL PROTECTED] (orig r10513):  jelmer | 2005-09-26 18:57:08 +0200
 Reduce some use of pstring. The main reason some parts of the code still 
 use pstring is next_token() now.
 
 [EMAIL PROTECTED] (orig r10514):  jelmer | 2005-09-26 19:42:12 +0200
 Add str_list_make_shell() and str_list_join_shell()
 
 [EMAIL PROTECTED] (orig r10515):  jelmer | 2005-09-26 20:15:24 +0200
 Handle replacement of domain logons and domain master by server role
 
 [EMAIL PROTECTED] (orig r10516):  jelmer | 2005-09-26 20:16:23 +0200
 Add seperator argument to str_list_{make,join}_shell()
 
 [EMAIL PROTECTED] (orig r10517):  jelmer | 2005-09-26 20:16:38 +0200
 Get rid of use of next_token() in lib/samba3/
 
 [EMAIL PROTECTED] (orig r10520):  abartlet | 2005-09-27 00:27:44 +0200
 The join is a nice quick RPC test.
 
 Andrew Bartlett
 
 [EMAIL PROTECTED] (orig r10521):  jelmer | 2005-09-27 02:11:21 +0200
 Also check sys/socket.h for definition of socklen_t (needed for AIX)
 
 [EMAIL PROTECTED] (orig r10522):  tridge | 2005-09-27 03:26:34 +0200
 
 finally got the locking working on solaris10. This adds a read lock on
 the transaction lock in tdb_traverse_read(). This prevents a pattern
 of locks which triggers the deadlock detection code in solaris10. I
 suspect solaris10 is trying to prevent lock starvation by granting
 locks in the order they were requested, which makes it much easier to
 produce deadlocks.
 
 [EMAIL PROTECTED] (orig r10523):  tridge | 2005-09-27 04:36:56 +0200
 
 fixed timegm() to not depend on get_time_zone(), so it works in lib/replace/
 
 the old timegm() replacement was also broken (it returned the wrong value)
 
 [EMAIL PROTECTED] (orig r10524):  tridge | 2005-09-27 05:09:38 +0200
 
 SAFE_FREE() in tdb does not need the discard_const_p() 
 
 the discard_const_p() was causing problems on openbsd where intptr_t is not 
defined
 
 [EMAIL PROTECTED] (orig r10525):  tridge | 2005-09-27 05:11:08 +0200
 
 change from AC_CHECK_TYPES() to AC_CHECK_TYPE() for intptr_t, so the
 type is always available, which means we need less #ifdefs
 
 [EMAIL PROTECTED] (orig r10526):  tridge | 2005-09-27 07:11:14 +0200
 BASEDIR must be set or we end up installing most of the binaries into lib/
 
 [EMAIL PROTECTED] (orig r10527):  tridge | 2005-09-27 09:11:33 +0200
 
 don't attempt self gdb attach if running under valgrind. This was
 causing fort to get rather unhappy
 
 
 [EMAIL PROTECTED] (orig r10528):  jelmer | 2005-09-27 12:00:27 +0200
 Add credentials.h back into includes.h as some compilers don't 
 seem to be able to handle incomplete enum types.
 
 [EMAIL PROTECTED] (orig r10529):  metze | 2005-09-27 12:29:13 +0200
 fix a crash bug in full async code the uses the composite_trigger_done() code
 the event subsystem wants to free timed_events!
 
 metze
 [EMAIL PROTECTED] (orig r10530):  metze | 2005-09-27 12:31:57 +0200
 - fix some crash bugs when we lost the connection...
 
 metze
 [EMAIL PROTECTED] (orig r10531):  jelmer | 2005-09-27 12:32:49 +0200
 (hopefully) improve detection of socket-related functions in external libraries
 
 [EMAIL PROTECTED] (orig r10532):  jelmer | 2005-09-27 13:02:06 +0200
 Replace next_token() with str_list_make()
 
 [EMAIL PROTECTED] (orig r10533):  jelmer | 2005-09-27 13:10:57 +0200
 Eliminate another use of next_token()
 

Added:
   branches/tmp/samba4-winsrepl/source/torture/local/util_strlist.c
Modified:
   branches/tmp/samba4-winsrepl/
   branches/tmp/samba4-winsrepl/source/auth/auth_developer.c
   branches/tmp/samba4-winsrepl/source/auth/auth_sam.c
   branches/tmp/samba4-winsrepl/source/auth/kerberos/kerberos.c
   branches/tmp/samba4-winsrepl/source/auth/kerberos/kerberos_verify.c
   branches/tmp/samba4-winsrepl/source/build/m4/rewrite.m4
   branches/tmp/samba4-winsrepl/source/build/smb_build/makefile.pm
   branches/tmp/samba4-winsrepl/source/client/client.c
   branches/tmp/samba4-winsrepl/source/gtk/common/credentials.c
   branches/tmp/samba4-winsrepl/source/heimdal_build/config.mk
   branches/tmp/samba4-winsrepl/source/include/enums.h
   branches/tmp/samba4-winsrepl/source/include/includes.h
   branches/tmp/samba4-winsrepl/source/include/structs.h
   branches/tmp/samba4-winsrepl/source/lib/cmdline/popt_common.c
   branches/tmp/samba4-winsrepl/source/lib/cmdline/popt_common.h
   branches/tmp/samba4-winsrepl/source/lib/credentials.c
   branches/tmp/samba4-winsrepl/source/lib/ldb/include/includes.h
   branches/tmp/samba4-winsrepl/source/lib/pidfile.c
   branches/tmp/samba4-winsrepl/source/lib/replace/config.m4
   branches/tmp/samba4-winsrepl/source/lib/replace/replace.c
   branches/tmp/samba4-winsrepl/source/lib/samba3/group.c
   branches/tmp/samba4-winsrepl/source/lib/samba3/secrets.c
   branches/tmp/samba4-winsrepl/source/lib/samba3/winsdb.c
   branches/tmp/samba4-winsrepl/source/lib/socket/config.m4
   

svn commit: samba r10535 - in branches/SAMBA_4_0/source/lib: .

2005-09-27 Thread tridge
Author: tridge
Date: 2005-09-27 11:59:39 + (Tue, 27 Sep 2005)
New Revision: 10535

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

Log:

fixed the pidfile code (it didn't survive the recent pstring changes)

Modified:
   branches/SAMBA_4_0/source/lib/pidfile.c


Changeset:
Modified: branches/SAMBA_4_0/source/lib/pidfile.c
===
--- branches/SAMBA_4_0/source/lib/pidfile.c 2005-09-27 11:24:03 UTC (rev 
10534)
+++ branches/SAMBA_4_0/source/lib/pidfile.c 2005-09-27 11:59:39 UTC (rev 
10535)
@@ -39,9 +39,9 @@
asprintf(pidFile, %s/%s.pid, lp_piddir(), name);
 
fd = open(pidFile, O_NONBLOCK | O_RDONLY, 0644);
-   SAFE_FREE(pidFile);
 
if (fd == -1) {
+   SAFE_FREE(pidFile);
return 0;
}
 
@@ -63,11 +63,13 @@
}
 
close(fd);
+   SAFE_FREE(pidFile);
return (pid_t)ret;
 
  noproc:
close(fd);
unlink(pidFile);
+   SAFE_FREE(pidFile);
return 0;
 }
 



svn commit: samba r10536 - in branches/tmp/samba4-winsrepl: . source/lib

2005-09-27 Thread metze
Author: metze
Date: 2005-09-27 12:07:01 + (Tue, 27 Sep 2005)
New Revision: 10536

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

Log:
 [EMAIL PROTECTED] (orig r10535):  tridge | 2005-09-27 13:59:39 +0200
 
 fixed the pidfile code (it didn't survive the recent pstring changes)
 

Modified:
   branches/tmp/samba4-winsrepl/
   branches/tmp/samba4-winsrepl/source/lib/pidfile.c


Changeset:

Property changes on: branches/tmp/samba4-winsrepl
___
Name: svk:merge
   - 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:10533
3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba4:9495
a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11632
   + 0c0555d6-39d7-0310-84fc-f1cc0bd64818:/branches/SAMBA_4_0:10535
3a72dc49-98ff-0310-ab52-9b7ed7945d91:/local/samba4:9495
a953eb74-4aff-0310-a63c-855d20285ebb:/local/samba4:11632

Modified: branches/tmp/samba4-winsrepl/source/lib/pidfile.c
===
--- branches/tmp/samba4-winsrepl/source/lib/pidfile.c   2005-09-27 11:59:39 UTC 
(rev 10535)
+++ branches/tmp/samba4-winsrepl/source/lib/pidfile.c   2005-09-27 12:07:01 UTC 
(rev 10536)
@@ -39,9 +39,9 @@
asprintf(pidFile, %s/%s.pid, lp_piddir(), name);
 
fd = open(pidFile, O_NONBLOCK | O_RDONLY, 0644);
-   SAFE_FREE(pidFile);
 
if (fd == -1) {
+   SAFE_FREE(pidFile);
return 0;
}
 
@@ -63,11 +63,13 @@
}
 
close(fd);
+   SAFE_FREE(pidFile);
return (pid_t)ret;
 
  noproc:
close(fd);
unlink(pidFile);
+   SAFE_FREE(pidFile);
return 0;
 }
 



svn commit: samba r10537 - in branches/SAMBA_4_0/source: gtk/common lib/events libcli/composite libcli/wrepl

2005-09-27 Thread metze
Author: metze
Date: 2005-09-27 12:54:08 + (Tue, 27 Sep 2005)
New Revision: 10537

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

Log:
- we now use a much nicer way to handle talloc_free(timed_event)
  the events code replaces a destructor to one that returns allways -1
  while it's calling the event handler
- we don't need the composite and winsrepl specific fixes any more
- this also fixes the problem with smbcli, dcerpc, cldap, ldap and nbt
  request timeouts

metze
Modified:
   branches/SAMBA_4_0/source/gtk/common/gtk_events.c
   branches/SAMBA_4_0/source/lib/events/events_liboop.c
   branches/SAMBA_4_0/source/lib/events/events_standard.c
   branches/SAMBA_4_0/source/libcli/composite/composite.c
   branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c


Changeset:
Modified: branches/SAMBA_4_0/source/gtk/common/gtk_events.c
===
--- branches/SAMBA_4_0/source/gtk/common/gtk_events.c   2005-09-27 12:07:01 UTC 
(rev 10536)
+++ branches/SAMBA_4_0/source/gtk/common/gtk_events.c   2005-09-27 12:54:08 UTC 
(rev 10537)
@@ -209,46 +209,44 @@
 }
 
 struct gtk_timed_event {
-   BOOL running;
guint te_id;
 };
 
-static gboolean gtk_event_timed_handler(gpointer data)
+/*
+  destroy a timed event
+*/
+static int gtk_event_timed_destructor(void *ptr)
 {
-   struct timed_event *te = talloc_get_type(data, struct timed_event);
+   struct timed_event *te = talloc_get_type(ptr, struct timed_event);
struct gtk_timed_event *gtk_te = talloc_get_type(te-additional_data,
 struct 
gtk_timed_event);
-   struct timeval t = timeval_current();
 
-   gtk_te-running = True;
-   te-handler(te-event_ctx, te, t, te-private_data);
-   gtk_te-running = False;
+   g_source_remove(gtk_te-te_id);
 
-   talloc_free(te);
+   return 0;
+}
 
-   /* return FALSE mean this event should be removed */
-   return gtk_false();
+static int gtk_event_timed_deny_destructor(void *ptr)
+{
+   return -1;
 }
 
-/*
-  destroy a timed event
-*/
-static int gtk_event_timed_destructor(void *ptr)
+static gboolean gtk_event_timed_handler(gpointer data)
 {
-   struct timed_event *te = talloc_get_type(ptr, struct timed_event);
+   struct timed_event *te = talloc_get_type(data, struct timed_event);
struct gtk_timed_event *gtk_te = talloc_get_type(te-additional_data,
 struct 
gtk_timed_event);
+   struct timeval t = timeval_current();
 
-   if (gtk_te-running) {
-   /* the event is running reject the talloc_free()
-  as it's done by the gtk_event_timed_handler()
-*/
-   return -1;
-   }
+   /* deny the handler to free the event */
+   talloc_set_destructor(te, gtk_event_timed_deny_destructor);
+   te-handler(te-event_ctx, te, t, te-private_data);
 
-   g_source_remove(gtk_te-te_id);
+   talloc_set_destructor(te, gtk_event_timed_destructor);
+   talloc_free(te);
 
-   return 0;
+   /* return FALSE mean this event should be removed */
+   return gtk_false();
 }
 
 /*
@@ -285,7 +283,6 @@
timeout = 
((diff_tv.tv_usec+999)/1000)+(diff_tv.tv_sec*1000);
 
gtk_te-te_id   = g_timeout_add(timeout, 
gtk_event_timed_handler, te);
-   gtk_te-running = False;
 
talloc_set_destructor(te, gtk_event_timed_destructor);
 

Modified: branches/SAMBA_4_0/source/lib/events/events_liboop.c
===
--- branches/SAMBA_4_0/source/lib/events/events_liboop.c2005-09-27 
12:07:01 UTC (rev 10536)
+++ branches/SAMBA_4_0/source/lib/events/events_liboop.c2005-09-27 
12:54:08 UTC (rev 10537)
@@ -172,12 +172,23 @@
fde-flags = flags;
 }
 
+static int oop_event_timed_destructor(void *ptr);
+static int oop_event_timed_deny_destructor(void *ptr)
+{
+   return -1;
+}
+
 static void *oop_event_timed_handler(oop_source *oop, struct timeval t, void 
*ptr)
 {
struct timed_event *te = ptr;
 
+   /* deny the handler to free the event */
+   talloc_set_destructor(te, oop_event_timed_deny_destructor);
te-handler(te-event_ctx, te, t, te-private_data);
 
+   talloc_set_destructor(te, oop_event_timed_destructor);
+   talloc_free(te);
+
return OOP_CONTINUE;
 }
 
@@ -218,7 +229,7 @@
te-private_data= private_data;
te-additional_data = NULL;
 
-   oop-cancel_time(oop, te-next_event, oop_event_timed_handler, te);
+   oop-on_time(oop, te-next_event, oop_event_timed_handler, te);
 
talloc_set_destructor(te, oop_event_timed_destructor);
 

Modified: branches/SAMBA_4_0/source/lib/events/events_standard.c
===
--- 

svn commit: samba r10540 - in branches/SAMBA_4_0/source/gtk/common: .

2005-09-27 Thread metze
Author: metze
Date: 2005-09-27 13:04:07 + (Tue, 27 Sep 2005)
New Revision: 10540

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

Log:
fix compiler warning

metze
Modified:
   branches/SAMBA_4_0/source/gtk/common/gtk_events.c


Changeset:
Modified: branches/SAMBA_4_0/source/gtk/common/gtk_events.c
===
--- branches/SAMBA_4_0/source/gtk/common/gtk_events.c   2005-09-27 12:59:47 UTC 
(rev 10539)
+++ branches/SAMBA_4_0/source/gtk/common/gtk_events.c   2005-09-27 13:04:07 UTC 
(rev 10540)
@@ -234,8 +234,6 @@
 static gboolean gtk_event_timed_handler(gpointer data)
 {
struct timed_event *te = talloc_get_type(data, struct timed_event);
-   struct gtk_timed_event *gtk_te = talloc_get_type(te-additional_data,
-struct 
gtk_timed_event);
struct timeval t = timeval_current();
 
/* deny the handler to free the event */



svn commit: samba r10541 - in branches/tmp/samba4-winsrepl/source/nbt_server/wins: .

2005-09-27 Thread metze
Author: metze
Date: 2005-09-27 13:05:33 + (Tue, 27 Sep 2005)
New Revision: 10541

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

Log:
use a transaction when we allocate a new version

metze
Modified:
   branches/tmp/samba4-winsrepl/source/nbt_server/wins/winsdb.c


Changeset:
Modified: branches/tmp/samba4-winsrepl/source/nbt_server/wins/winsdb.c
===
--- branches/tmp/samba4-winsrepl/source/nbt_server/wins/winsdb.c
2005-09-27 13:04:07 UTC (rev 10540)
+++ branches/tmp/samba4-winsrepl/source/nbt_server/wins/winsdb.c
2005-09-27 13:05:33 UTC (rev 10541)
@@ -33,6 +33,7 @@
 */
 static uint64_t winsdb_allocate_version(struct wins_server *winssrv)
 {
+   int trans;
int ret;
struct ldb_context *ldb = winssrv-wins_db;
struct ldb_dn *dn;
@@ -41,6 +42,9 @@
TALLOC_CTX *tmp_ctx = talloc_new(winssrv);
uint64_t maxVersion = 0;
 
+   trans = ldb_transaction_start(ldb);
+   if (trans != LDB_SUCCESS) goto failed;
+
dn = ldb_dn_explode(tmp_ctx, CN=VERSION);
if (!dn) goto failed;
 
@@ -72,10 +76,14 @@
if (ret != 0) ret = ldb_add(ldb, msg);
if (ret != 0) goto failed;
 
+   trans = ldb_transaction_commit(ldb);
+   if (trans != LDB_SUCCESS) goto failed;
+
talloc_free(tmp_ctx);
return maxVersion;
 
 failed:
+   if (trans == LDB_SUCCESS) ldb_transaction_cancel(ldb);
talloc_free(tmp_ctx);
return 0;
 }



svn commit: samba r10542 - in branches/SAMBA_4_0/source/libcli/raw: .

2005-09-27 Thread metze
Author: metze
Date: 2005-09-27 13:31:17 + (Tue, 27 Sep 2005)
New Revision: 10542

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

Log:
if the transport is dead we need to return

tridge: I think this is correct, comments?

metze
Modified:
   branches/SAMBA_4_0/source/libcli/raw/clitransport.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/raw/clitransport.c
===
--- branches/SAMBA_4_0/source/libcli/raw/clitransport.c 2005-09-27 13:05:33 UTC 
(rev 10541)
+++ branches/SAMBA_4_0/source/libcli/raw/clitransport.c 2005-09-27 13:31:17 UTC 
(rev 10542)
@@ -353,6 +353,7 @@
   req-out.size, nwritten);
if (NT_STATUS_IS_ERR(status)) {
smbcli_transport_dead(transport);
+   return;
}
if (!NT_STATUS_IS_OK(status)) {
return;
@@ -540,6 +541,7 @@
  nread);
if (NT_STATUS_IS_ERR(status)) {
smbcli_transport_dead(transport);
+   return;
}
if (!NT_STATUS_IS_OK(status)) {
return;
@@ -571,6 +573,7 @@
  nread);
if (NT_STATUS_IS_ERR(status)) {
smbcli_transport_dead(transport);
+   return;
}
if (!NT_STATUS_IS_OK(status)) {
return;



svn commit: samba-web r816 - in trunk/support: .

2005-09-27 Thread deryck
Author: deryck
Date: 2005-09-27 14:17:47 + (Tue, 27 Sep 2005)
New Revision: 816

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

Log:

Add India support provider at the request of the company.

deryck
Modified:
   trunk/support/india.html


Changeset:
Modified: trunk/support/india.html
===
--- trunk/support/india.html2005-09-18 13:08:28 UTC (rev 815)
+++ trunk/support/india.html2005-09-27 14:17:47 UTC (rev 816)
@@ -25,6 +25,32 @@
 /small/pre
 
 
+!-- Added: 27 Sept 2005 --
+hr /
+presmall
+Yukthi Systems is an IT consulting company providing cost-effective 
+solutions on Linux platform.  We have core competency in providing 
+IT Infrastructure and Security solutions on Linux.
+
+We are also specialized in Linux/Windows network integration, 
+implementing SAMBA Domain Controllers, Single-Signon and migrating 
+from Windows to Linux networks.
+
+We also manage and support existing Linux servers. Support will be 
+provided over phone, email, remote and onsite.
+
+
+Yukthi Systems Pvt. Ltd.
+Fazal Manor, 3rd Floor,
+# 89, Richmond Road,
+Bangalore 560 025,
+
+Tel: +91 80 2248 3813 / 2248 3222
+URL: a href=http://www.yukthi.com/;www.yukthi.com/a
+Email: a href=mailto:[EMAIL PROTECTED][EMAIL PROTECTED]/a
+/small/pre
+
+
 !-- Added: 14 July 2005 --
 hr /
 h3Coimbatore/h3



svn commit: samba r10543 - in trunk/source: include printing

2005-09-27 Thread jerry
Author: jerry
Date: 2005-09-27 14:25:24 + (Tue, 27 Sep 2005)
New Revision: 10543

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

Log:
fixing job deletion to call the lprm command during teh tdb traversal instead 
of just skipping it when we don't know the unix jobid
Modified:
   trunk/source/include/printing.h
   trunk/source/printing/print_cups.c
   trunk/source/printing/print_generic.c
   trunk/source/printing/print_iprint.c
   trunk/source/printing/printing.c


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


svn commit: samba r10544 - in trunk/source: . param

2005-09-27 Thread jerry
Author: jerry
Date: 2005-09-27 14:45:31 + (Tue, 27 Sep 2005)
New Revision: 10544

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

Log:
removing config_ldap so we can just copy trunk over to SAMBA_3_0 when it is 
time to do the merge.  We can get this back later if we want
Removed:
   trunk/source/param/config_ldap.c
   trunk/source/param/modconf.c
Modified:
   trunk/source/Makefile.in
   trunk/source/configure.in
   trunk/source/param/loadparm.c


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


svn commit: samba r10545 - in branches/SAMBA_4_0/source/libcli/util: .

2005-09-27 Thread metze
Author: metze
Date: 2005-09-27 16:20:17 + (Tue, 27 Sep 2005)
New Revision: 10545

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

Log:
map ECONNRESET to NT_STATUS_CONNECTION_RESET

metze
Modified:
   branches/SAMBA_4_0/source/libcli/util/errormap.c


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/util/errormap.c
===
--- branches/SAMBA_4_0/source/libcli/util/errormap.c2005-09-27 14:45:31 UTC 
(rev 10544)
+++ branches/SAMBA_4_0/source/libcli/util/errormap.c2005-09-27 16:20:17 UTC 
(rev 10545)
@@ -1277,6 +1277,9 @@
{ ENOMEM,   NT_STATUS_NO_MEMORY },
{ EPIPE,NT_STATUS_CONNECTION_DISCONNECTED },
{ ECONNREFUSED, NT_STATUS_CONNECTION_REFUSED },
+#ifdef ECONNRESET
+   { ECONNRESET,   NT_STATUS_CONNECTION_RESET },
+#endif
{ EBUSY,NT_STATUS_SHARING_VIOLATION },
 #ifdef ENOTSUP
{ ENOTSUP,  NT_STATUS_NOT_SUPPORTED},



svn commit: samba r10546 - in trunk/source/rpc_server: .

2005-09-27 Thread jerry
Author: jerry
Date: 2005-09-27 16:40:32 + (Tue, 27 Sep 2005)
New Revision: 10546

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

Log:
remove extra reload_services() call in update_printer()
Modified:
   trunk/source/rpc_server/srv_spoolss_nt.c


Changeset:
Modified: trunk/source/rpc_server/srv_spoolss_nt.c
===
--- trunk/source/rpc_server/srv_spoolss_nt.c2005-09-27 16:20:17 UTC (rev 
10545)
+++ trunk/source/rpc_server/srv_spoolss_nt.c2005-09-27 16:40:32 UTC (rev 
10546)
@@ -6122,17 +6122,12 @@
|| !strequal(printer-info_2-portname, 
old_printer-info_2-portname)
|| !strequal(printer-info_2-location, 
old_printer-info_2-location)) )
{
+   /* add_printer_hook() will call reload_services() */
+
if ( !add_printer_hook(p-pipe_user.nt_user_token, printer) ) {
result = WERR_ACCESS_DENIED;
goto done;
}
-
-   /* 
-* make sure we actually reload the services after 
-* this as smb.conf could have a new section in it 
-*  shouldn't  but could
-*/
-   reload_services(False); 
}

/*



svn commit: samba r10547 - in branches/SAMBA_4_0/source/libcli/wrepl: .

2005-09-27 Thread metze
Author: metze
Date: 2005-09-27 16:53:08 + (Tue, 27 Sep 2005)
New Revision: 10547

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

Log:
- add wrepl_request timeout handling
- when we got an unexpected READ event, we need to do a socket_recv() to find 
connection errors
  and we need to mark the socket as dead (and remove the fde_event) to prevent,
  endless loops on broken connections

tridge: we should look carefull at other protocol, to handle broken connections 
without spinning

metze
Modified:
   branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c
   branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.h


Changeset:
Modified: branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c
===
--- branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c   2005-09-27 16:40:32 UTC 
(rev 10546)
+++ branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c   2005-09-27 16:53:08 UTC 
(rev 10547)
@@ -29,17 +29,28 @@
 /*
   mark all pending requests as dead - called when a socket error happens
 */
-static void wrepl_socket_dead(struct wrepl_socket *wrepl_socket)
+static void wrepl_socket_dead(struct wrepl_socket *wrepl_socket, NTSTATUS 
status)
 {
wrepl_socket-dead = True;
 
-   event_set_fd_flags(wrepl_socket-fde, 0);
+   if (wrepl_socket-fde) {
+   talloc_free(wrepl_socket-fde);
+   wrepl_socket-fde = NULL;
+   }
 
+   if (wrepl_socket-sock) {
+   talloc_free(wrepl_socket-sock);
+   wrepl_socket-sock = NULL;
+   }
+
+   if (NT_STATUS_EQUAL(NT_STATUS_UNSUCCESSFUL, status)) {
+   status = NT_STATUS_UNEXPECTED_NETWORK_ERROR;
+   }
while (wrepl_socket-send_queue) {
struct wrepl_request *req = wrepl_socket-send_queue;
DLIST_REMOVE(wrepl_socket-send_queue, req);
req-state = WREPL_REQUEST_ERROR;
-   req-status = NT_STATUS_UNEXPECTED_NETWORK_ERROR;
+   req-status = status;
if (req-async.fn) {
req-async.fn(req);
}
@@ -48,13 +59,20 @@
struct wrepl_request *req = wrepl_socket-recv_queue;
DLIST_REMOVE(wrepl_socket-recv_queue, req);
req-state = WREPL_REQUEST_ERROR;
-   req-status = NT_STATUS_UNEXPECTED_NETWORK_ERROR;
+   req-status = status;
if (req-async.fn) {
req-async.fn(req);
}
}
 }
 
+static void wrepl_request_timeout_handler(struct event_context *ev, struct 
timed_event *te,
+ struct timeval t, void *ptr)
+{
+   struct wrepl_request *req = talloc_get_type(ptr, struct wrepl_request);
+   wrepl_socket_dead(req-wrepl_socket, NT_STATUS_IO_TIMEOUT);
+}
+
 /*
   handle send events 
 */
@@ -67,7 +85,7 @@
 
status = socket_send(wrepl_socket-sock, req-buffer, nsent, 
0);
if (NT_STATUS_IS_ERR(status)) {
-   wrepl_socket_dead(wrepl_socket);
+   wrepl_socket_dead(wrepl_socket, status);
return;
}
if (!NT_STATUS_IS_OK(status) || nsent == 0) return;
@@ -99,7 +117,16 @@
DATA_BLOB blob;
 
if (req == NULL) {
+   NTSTATUS status;
+
EVENT_FD_NOT_READABLE(wrepl_socket-fde);
+
+   status = socket_recv(wrepl_socket-sock, NULL, 0, nread, 0);
+   if (NT_STATUS_EQUAL(NT_STATUS_END_OF_FILE,status)) return;
+   if (NT_STATUS_IS_ERR(status)) {
+   wrepl_socket_dead(wrepl_socket, status);
+   return;
+   }
return;
}
 
@@ -121,7 +148,7 @@
  4 - req-num_read,
  nread, 0);
if (NT_STATUS_IS_ERR(req-status)) {
-   wrepl_socket_dead(wrepl_socket);
+   wrepl_socket_dead(wrepl_socket, req-status);
return;
}
if (!NT_STATUS_IS_OK(req-status)) return;
@@ -146,7 +173,7 @@
  req-buffer.length - req-num_read,
  nread, 0);
if (NT_STATUS_IS_ERR(req-status)) {
-   wrepl_socket_dead(wrepl_socket);
+   wrepl_socket_dead(wrepl_socket, req-status);
return;
}
if (!NT_STATUS_IS_OK(req-status)) return;
@@ -225,7 +252,8 @@
struct 
wrepl_socket);
struct wrepl_request *req = wrepl_socket-recv_queue;
 
-   talloc_free(fde);
+   talloc_free(wrepl_socket-fde);
+   wrepl_socket-fde = NULL;
 
if (req == NULL) return;
 
@@ -255,6 +283,15 @@
}
 }
 
+/*
+  destroy a wrepl_socket destructor
+*/
+static int 

svn commit: samba r10548 - in branches/tmp/samba4-winsrepl: . source/gtk/common source/libcli/raw source/libcli/util source/libcli/wrepl

2005-09-27 Thread metze
Author: metze
Date: 2005-09-27 16:54:37 + (Tue, 27 Sep 2005)
New Revision: 10548

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

Log:
 [EMAIL PROTECTED] (orig r10540):  metze | 2005-09-27 15:04:07 +0200
 fix compiler warning
 
 metze
 [EMAIL PROTECTED] (orig r10542):  metze | 2005-09-27 15:31:17 +0200
 if the transport is dead we need to return
 
 tridge: I think this is correct, comments?
 
 metze
 [EMAIL PROTECTED] (orig r10545):  metze | 2005-09-27 18:20:17 +0200
 map ECONNRESET to NT_STATUS_CONNECTION_RESET
 
 metze
 [EMAIL PROTECTED] (orig r10547):  metze | 2005-09-27 18:53:08 +0200
 - add wrepl_request timeout handling
 - when we got an unexpected READ event, we need to do a socket_recv() to find 
connection errors
   and we need to mark the socket as dead (and remove the fde_event) to prevent,
   endless loops on broken connections
 
 tridge: we should look carefull at other protocol, to handle broken 
connections without spinning
 
 metze

Modified:
   branches/tmp/samba4-winsrepl/
   branches/tmp/samba4-winsrepl/source/gtk/common/gtk_events.c
   branches/tmp/samba4-winsrepl/source/libcli/raw/clitransport.c
   branches/tmp/samba4-winsrepl/source/libcli/util/errormap.c
   branches/tmp/samba4-winsrepl/source/libcli/wrepl/winsrepl.c
   branches/tmp/samba4-winsrepl/source/libcli/wrepl/winsrepl.h


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


svn commit: samba r10549 - in branches/tmp/samba4-winsrepl/source/wrepl_server: .

2005-09-27 Thread metze
Author: metze
Date: 2005-09-27 16:58:37 + (Tue, 27 Sep 2005)
New Revision: 10549

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

Log:
- add first start of wins pull replication
- we not yet apply records to our database but we fetch them correct form our 
partners
  (we need conflict handling for this)
- we also need to filter out our own records!

metze
Modified:
   branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_out_connection.c
   branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_server.c
   branches/tmp/samba4-winsrepl/source/wrepl_server/wrepl_server.h


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


svn commit: samba r10550 - in trunk/source/smbd: .

2005-09-27 Thread jra
Author: jra
Date: 2005-09-27 17:41:56 + (Tue, 27 Sep 2005)
New Revision: 10550

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

Log:
We need to check if the source path is a parent directory of the destination
(ie. a rename of /foo/bar/baz - /foo/bar/baz/bibble/bobble. If so we must
refuse the rename with a sharing violation. Under UNIX the above call can
*succeed* if /foo/bar/baz is a symlink to another area in the share. We
probably need to check that the client is a Windows one before disallowing
this as a UNIX client (one with UNIX extensions) can know the source is a
symlink and make this decision intelligently. Found by an excellent bug
report from [EMAIL PROTECTED].
Jeremy.

Modified:
   trunk/source/smbd/reply.c


Changeset:
Modified: trunk/source/smbd/reply.c
===
--- trunk/source/smbd/reply.c   2005-09-27 16:58:37 UTC (rev 10549)
+++ trunk/source/smbd/reply.c   2005-09-27 17:41:56 UTC (rev 10550)
@@ -4066,6 +4066,35 @@
 }
 
 /
+ We need to check if the source path is a parent directory of the destination
+ (ie. a rename of /foo/bar/baz - /foo/bar/baz/bibble/bobble. If so we must
+ refuse the rename with a sharing violation. Under UNIX the above call can
+ *succeed* if /foo/bar/baz is a symlink to another area in the share. We
+ probably need to check that the client is a Windows one before disallowing
+ this as a UNIX client (one with UNIX extensions) can know the source is a
+ symlink and make this decision intelligently. Found by an excellent bug
+ report from [EMAIL PROTECTED].
+/
+
+static BOOL rename_path_prefix_equal(const char *src, const char *dest)
+{
+   const char *psrc = src;
+   const char *pdst = dest;
+   size_t slen;
+
+   if (psrc[0] == '.'  psrc[1] == '/') {
+   psrc += 2;
+   }
+   if (pdst[0] == '.'  pdst[1] == '/') {
+   pdst += 2;
+   }
+   if ((slen = strlen(psrc))  strlen(pdst)) {
+   return False;
+   }
+   return ((memcmp(psrc, pdst, slen) == 0)  pdst[slen] == '/');
+}
+
+/
  Rename an open file - given an fsp.
 /
 
@@ -4160,6 +4189,10 @@
return error;
}
 
+   if (rename_path_prefix_equal(fsp-fsp_name, newname)) {
+   return NT_STATUS_ACCESS_DENIED;
+   }
+
if(SMB_VFS_RENAME(conn,fsp-fsp_name, newname) == 0) {
DEBUG(3,(rename_internals_fsp: succeeded doing rename on %s - 
%s\n,
fsp-fsp_name,newname));
@@ -4381,6 +4414,10 @@
return NT_STATUS_OBJECT_NAME_COLLISION;
}
 
+   if (rename_path_prefix_equal(directory, newname)) {
+   return NT_STATUS_SHARING_VIOLATION;
+   }
+
if(SMB_VFS_RENAME(conn,directory, newname) == 0) {
DEBUG(3,(rename_internals: succeeded doing rename on 
%s - %s\n,
directory,newname));
@@ -4479,6 +4516,10 @@
continue;
}

+   if (rename_path_prefix_equal(fname, destname)) {
+   return NT_STATUS_SHARING_VIOLATION;
+   }
+
if (!SMB_VFS_RENAME(conn,fname,destname)) {
rename_open_files(conn, sbuf1.st_dev, 
sbuf1.st_ino, newname);
count++;



svn commit: samba r10551 - in branches/SAMBA_3_0/source/smbd: .

2005-09-27 Thread jra
Author: jra
Date: 2005-09-27 17:42:11 + (Tue, 27 Sep 2005)
New Revision: 10551

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

Log:
We need to check if the source path is a parent directory of the destination
(ie. a rename of /foo/bar/baz - /foo/bar/baz/bibble/bobble. If so we must
refuse the rename with a sharing violation. Under UNIX the above call can
*succeed* if /foo/bar/baz is a symlink to another area in the share. We
probably need to check that the client is a Windows one before disallowing
this as a UNIX client (one with UNIX extensions) can know the source is a
symlink and make this decision intelligently. Found by an excellent bug
report from [EMAIL PROTECTED].
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/reply.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/reply.c
===
--- branches/SAMBA_3_0/source/smbd/reply.c  2005-09-27 17:41:56 UTC (rev 
10550)
+++ branches/SAMBA_3_0/source/smbd/reply.c  2005-09-27 17:42:11 UTC (rev 
10551)
@@ -4076,6 +4076,35 @@
 }
 
 /
+ We need to check if the source path is a parent directory of the destination
+ (ie. a rename of /foo/bar/baz - /foo/bar/baz/bibble/bobble. If so we must
+ refuse the rename with a sharing violation. Under UNIX the above call can
+ *succeed* if /foo/bar/baz is a symlink to another area in the share. We
+ probably need to check that the client is a Windows one before disallowing
+ this as a UNIX client (one with UNIX extensions) can know the source is a
+ symlink and make this decision intelligently. Found by an excellent bug
+ report from [EMAIL PROTECTED].
+/
+
+static BOOL rename_path_prefix_equal(const char *src, const char *dest)
+{
+   const char *psrc = src;
+   const char *pdst = dest;
+   size_t slen;
+
+   if (psrc[0] == '.'  psrc[1] == '/') {
+   psrc += 2;
+   }
+   if (pdst[0] == '.'  pdst[1] == '/') {
+   pdst += 2;
+   }
+   if ((slen = strlen(psrc))  strlen(pdst)) {
+   return False;
+   }
+   return ((memcmp(psrc, pdst, slen) == 0)  pdst[slen] == '/');
+}
+
+/
  Rename an open file - given an fsp.
 /
 
@@ -4170,6 +4199,10 @@
return error;
}
 
+   if (rename_path_prefix_equal(fsp-fsp_name, newname)) {
+   return NT_STATUS_ACCESS_DENIED;
+   }
+
if(SMB_VFS_RENAME(conn,fsp-fsp_name, newname) == 0) {
DEBUG(3,(rename_internals_fsp: succeeded doing rename on %s - 
%s\n,
fsp-fsp_name,newname));
@@ -4391,6 +4424,10 @@
return NT_STATUS_OBJECT_NAME_COLLISION;
}
 
+   if (rename_path_prefix_equal(directory, newname)) {
+   return NT_STATUS_SHARING_VIOLATION;
+   }
+
if(SMB_VFS_RENAME(conn,directory, newname) == 0) {
DEBUG(3,(rename_internals: succeeded doing rename on 
%s - %s\n,
directory,newname));
@@ -4489,6 +4526,10 @@
continue;
}

+   if (rename_path_prefix_equal(fname, destname)) {
+   return NT_STATUS_SHARING_VIOLATION;
+   }
+
if (!SMB_VFS_RENAME(conn,fname,destname)) {
rename_open_files(conn, sbuf1.st_dev, 
sbuf1.st_ino, newname);
count++;



svn commit: samba r10552 - in trunk/source/printing: .

2005-09-27 Thread jerry
Author: jerry
Date: 2005-09-27 17:48:52 + (Tue, 27 Sep 2005)
New Revision: 10552

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

Log:
fix compile breakage
Modified:
   trunk/source/printing/printing.c


Changeset:
Modified: trunk/source/printing/printing.c
===
--- trunk/source/printing/printing.c2005-09-27 17:42:11 UTC (rev 10551)
+++ trunk/source/printing/printing.c2005-09-27 17:48:52 UTC (rev 10552)
@@ -752,11 +752,12 @@

if ( pjob.smbjob ) {
for (i=0;its-qcount;i++) {
+   uint32 curr_jobid;
 
if ( pjob.status == LPQ_DELETED )
continue;
 
-   uint32 curr_jobid = 
print_parse_jobid(ts-queue[i].fs_file);
+   curr_jobid = print_parse_jobid(ts-queue[i].fs_file);
 
if (jobid == curr_jobid) {
 



svn commit: samba r10553 - in branches/SAMBA_3_0/source/auth: .

2005-09-27 Thread jerry
Author: jerry
Date: 2005-09-27 19:01:27 + (Tue, 27 Sep 2005)
New Revision: 10553

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

Log:
ignore .po files
Modified:
   branches/SAMBA_3_0/source/auth/


Changeset:

Property changes on: branches/SAMBA_3_0/source/auth
___
Name: svn:ignore
   + *.po




svn commit: samba r10554 - branches/SAMBA_3_0/source/client branches/SAMBA_3_0/source/printing trunk/source/client trunk/source/printing

2005-09-27 Thread jerry
Author: jerry
Date: 2005-09-27 19:18:20 + (Tue, 27 Sep 2005)
New Revision: 10554

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

Log:
* BUG 3057: assume x64 drivers are v3 drivers
* BUG 3087: allow smbspool to establisha geust connection 
  using a username with no password
 

Modified:
   branches/SAMBA_3_0/source/client/smbspool.c
   branches/SAMBA_3_0/source/printing/nt_printing.c
   trunk/source/client/smbspool.c
   trunk/source/printing/nt_printing.c


Changeset:
Modified: branches/SAMBA_3_0/source/client/smbspool.c
===
--- branches/SAMBA_3_0/source/client/smbspool.c 2005-09-27 19:01:27 UTC (rev 
10553)
+++ branches/SAMBA_3_0/source/client/smbspool.c 2005-09-27 19:18:20 UTC (rev 
10554)
@@ -457,15 +457,15 @@
 
   get_myname(myname);  
 
-  if ( (username)  ( *username )  (password)  (*password) ) 
+  /* See if we have a username first.  This is for backwards compatible 
+ behavior with 3.0.14a */
+
+  if ( username   *username )
   {
-  /* 
-   * User/password specified in the DEVICE_URI, use those credentials 
-   * to connect to the server 
-   */
   cli = smb_complete_connection(myname, server, port, username, 
 password, workgroup, share, 0 );
-  if (cli ) { return cli; }
+  if (cli) 
+return cli;
   }
   
   /* 

Modified: branches/SAMBA_3_0/source/printing/nt_printing.c
===
--- branches/SAMBA_3_0/source/printing/nt_printing.c2005-09-27 19:01:27 UTC 
(rev 10553)
+++ branches/SAMBA_3_0/source/printing/nt_printing.c2005-09-27 19:18:20 UTC 
(rev 10554)
@@ -1386,12 +1386,19 @@
*perr = WERR_INVALID_PARAM;
 
/* If architecture is Windows 95/98/ME, the version is always 0. */
-   if (strcmp(architecture, WIN40) == 0) {
+   if (strcmp(architecture, SPL_ARCH_WIN40) == 0) {
DEBUG(10,(get_correct_cversion: Driver is Win9x, cversion = 
0\n));
*perr = WERR_OK;
return 0;
}
 
+   /* If architecture is Windows x64, the version is always 3. */
+   if (strcmp(architecture, SPL_ARCH_X64) == 0) {
+   DEBUG(10,(get_correct_cversion: Driver is x64, cversion = 
3\n));
+   *perr = WERR_OK;
+   return 3;
+   }
+
/*
 * Connect to the print$ share under the same account as the user 
connected
 * to the rpc pipe. Note we must still be root to do this.

Modified: trunk/source/client/smbspool.c
===
--- trunk/source/client/smbspool.c  2005-09-27 19:01:27 UTC (rev 10553)
+++ trunk/source/client/smbspool.c  2005-09-27 19:18:20 UTC (rev 10554)
@@ -460,15 +460,15 @@
 
   get_myname(myname);  
 
-  if ( (username)  ( *username )  (password)  (*password) ) 
+  /* See if we have a username first.  This is for backwards compatible 
+ behavior with 3.0.14a */
+
+  if ( username   *username )
   {
-  /* 
-   * User/password specified in the DEVICE_URI, use those credentials 
-   * to connect to the server 
-   */
   cli = smb_complete_connection(myname, server, port, username, 
 password, workgroup, share, 0 );
-  if (cli ) { return cli; }
+  if (cli) 
+return cli;
   }
   
   /* 

Modified: trunk/source/printing/nt_printing.c
===
--- trunk/source/printing/nt_printing.c 2005-09-27 19:01:27 UTC (rev 10553)
+++ trunk/source/printing/nt_printing.c 2005-09-27 19:18:20 UTC (rev 10554)
@@ -1386,12 +1386,19 @@
*perr = WERR_INVALID_PARAM;
 
/* If architecture is Windows 95/98/ME, the version is always 0. */
-   if (strcmp(architecture, WIN40) == 0) {
+   if (strcmp(architecture, SPL_ARCH_WIN40) == 0) {
DEBUG(10,(get_correct_cversion: Driver is Win9x, cversion = 
0\n));
*perr = WERR_OK;
return 0;
}
 
+   /* If architecture is Windows x64, the version is always 3. */
+   if (strcmp(architecture, SPL_ARCH_X64) == 0) {
+   DEBUG(10,(get_correct_cversion: Driver is x64, cversion = 
3\n));
+   *perr = WERR_OK;
+   return 3;
+   }
+
/*
 * Connect to the print$ share under the same account as the user 
connected
 * to the rpc pipe. Note we must still be root to do this.



svn commit: samba r10555 - in branches/SAMBA_3_0/source/printing: .

2005-09-27 Thread jerry
Author: jerry
Date: 2005-09-27 19:34:19 + (Tue, 27 Sep 2005)
New Revision: 10555

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

Log:
a few compile warnings from jason Mader
Modified:
   branches/SAMBA_3_0/source/printing/printing.c


Changeset:
Modified: branches/SAMBA_3_0/source/printing/printing.c
===
--- branches/SAMBA_3_0/source/printing/printing.c   2005-09-27 19:18:20 UTC 
(rev 10554)
+++ branches/SAMBA_3_0/source/printing/printing.c   2005-09-27 19:34:19 UTC 
(rev 10555)
@@ -91,7 +91,7 @@
if (rap_jobid == 0)
rap_jobid = ++next_rap_jobid;
SSVAL(buf,0,rap_jobid);
-   data.dptr = buf;
+   data.dptr = (char*)buf;
data.dsize = sizeof(rap_jobid);
tdb_store(rap_tdb, key, data, TDB_REPLACE);
tdb_store(rap_tdb, data, key, TDB_REPLACE);
@@ -112,7 +112,7 @@
return False;
 
SSVAL(buf,0,rap_jobid);
-   key.dptr = buf;
+   key.dptr = (char*)buf;
key.dsize = sizeof(rap_jobid);
data = tdb_fetch(rap_tdb, key);
if ( data.dptr  data.dsize == sizeof(struct rap_jobid_key) ) 
@@ -164,7 +164,7 @@
rap_jobid = SVAL(data.dptr, 0);
SAFE_FREE(data.dptr);
SSVAL(buf,0,rap_jobid);
-   data.dptr=buf;
+   data.dptr = (char*)buf;
data.dsize = sizeof(rap_jobid);
tdb_delete(rap_tdb, key);
tdb_delete(rap_tdb, data);



svn commit: samba r10556 - branches/SAMBA_3_0/source/nsswitch trunk/source/nsswitch

2005-09-27 Thread jerry
Author: jerry
Date: 2005-09-27 19:39:13 + (Tue, 27 Sep 2005)
New Revision: 10556

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

Log:
BUG 3083: patch from Alex Deiter [EMAIL PROTECTED] to fix checking trusted 
account for winbindd running on a Samba PDC
Modified:
   branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
   trunk/source/nsswitch/winbindd_cm.c


Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c
===
--- branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c2005-09-27 19:34:19 UTC 
(rev 10555)
+++ branches/SAMBA_3_0/source/nsswitch/winbindd_cm.c2005-09-27 19:39:13 UTC 
(rev 10556)
@@ -1175,7 +1175,10 @@
/* if we are a DC and this is a trusted domain, then we need to use our
   domain name in the net_req_auth2() request */
 
-   if ( IS_DC ) {
+   if ( IS_DC 
+!strequal(domain-name, lp_workgroup())
+lp_allow_trusted_domains() ) 
+   {
account_name = talloc_asprintf( mem_ctx, %s$, lp_workgroup() 
);
}
else {

Modified: trunk/source/nsswitch/winbindd_cm.c
===
--- trunk/source/nsswitch/winbindd_cm.c 2005-09-27 19:34:19 UTC (rev 10555)
+++ trunk/source/nsswitch/winbindd_cm.c 2005-09-27 19:39:13 UTC (rev 10556)
@@ -1294,7 +1294,10 @@
/* if we are a DC and this is a trusted domain, then we need to use our
   domain name in the net_req_auth2() request */
 
-   if ( IS_DC ) {
+   if ( IS_DC
+!strequal(domain-name, lp_workgroup())
+lp_allow_trusted_domains() ) 
+   {
account_name = lp_workgroup();
} else {
account_name = domain-primary ? global_myname() : domain-name;



svn commit: samba r10557 - in trunk/source/smbd: .

2005-09-27 Thread jra
Author: jra
Date: 2005-09-27 20:41:04 + (Tue, 27 Sep 2005)
New Revision: 10557

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

Log:
Fix bug #3010 yet again. Die monster, die !
Jeremy.

Modified:
   trunk/source/smbd/dir.c


Changeset:
Modified: trunk/source/smbd/dir.c
===
--- trunk/source/smbd/dir.c 2005-09-27 19:39:13 UTC (rev 10556)
+++ trunk/source/smbd/dir.c 2005-09-27 20:41:04 UTC (rev 10557)
@@ -1148,8 +1148,23 @@
 void SeekDir(struct smb_Dir *dirp, long offset)
 {
if (offset != dirp-offset) {
-   if (offset == START_OF_DIRECTORY_OFFSET || offset == 
DOT_DOT_DIRECTORY_OFFSET) {
+   if (offset == START_OF_DIRECTORY_OFFSET) {
RewindDir(dirp, offset);
+   /* 
+* Ok we should really set the file number here
+* to 1 to enable .. to be returned next. Trouble
+* is I'm worried about callers using SeekDir(dirp,0)
+* as equivalent to RewindDir(). So leave this alone
+* for now.
+*/
+   } else if  (offset == DOT_DOT_DIRECTORY_OFFSET) {
+   RewindDir(dirp, offset);
+   /*
+* Set the file number to 2 - we want to get the first
+* real file entry (the one we return after ..)
+* on the next ReadDir.
+*/
+   dirp-file_number = 2;
} else if (offset == END_OF_DIRECTORY_OFFSET) {
; /* Don't seek in this case. */
} else {



svn commit: samba r10558 - in branches/SAMBA_3_0/source/smbd: .

2005-09-27 Thread jra
Author: jra
Date: 2005-09-27 20:41:22 + (Tue, 27 Sep 2005)
New Revision: 10558

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

Log:
Fix bug #3010 yet again. Die monster, die !
Jeremy.

Modified:
   branches/SAMBA_3_0/source/smbd/dir.c


Changeset:
Modified: branches/SAMBA_3_0/source/smbd/dir.c
===
--- branches/SAMBA_3_0/source/smbd/dir.c2005-09-27 20:41:04 UTC (rev 
10557)
+++ branches/SAMBA_3_0/source/smbd/dir.c2005-09-27 20:41:22 UTC (rev 
10558)
@@ -1148,8 +1148,23 @@
 void SeekDir(struct smb_Dir *dirp, long offset)
 {
if (offset != dirp-offset) {
-   if (offset == START_OF_DIRECTORY_OFFSET || offset == 
DOT_DOT_DIRECTORY_OFFSET) {
+   if (offset == START_OF_DIRECTORY_OFFSET) {
RewindDir(dirp, offset);
+   /* 
+* Ok we should really set the file number here
+* to 1 to enable .. to be returned next. Trouble
+* is I'm worried about callers using SeekDir(dirp,0)
+* as equivalent to RewindDir(). So leave this alone
+* for now.
+*/
+   } else if  (offset == DOT_DOT_DIRECTORY_OFFSET) {
+   RewindDir(dirp, offset);
+   /*
+* Set the file number to 2 - we want to get the first
+* real file entry (the one we return after ..)
+* on the next ReadDir.
+*/
+   dirp-file_number = 2;
} else if (offset == END_OF_DIRECTORY_OFFSET) {
; /* Don't seek in this case. */
} else {



svn commit: samba r10559 - in branches/SAMBA_3_0_RELEASE/source/smbd: .

2005-09-27 Thread jerry
Author: jerry
Date: 2005-09-27 20:44:54 + (Tue, 27 Sep 2005)
New Revision: 10559

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

Log:
jra's looping directory fix (BUG 3065)
Modified:
   branches/SAMBA_3_0_RELEASE/source/smbd/dir.c


Changeset:
Modified: branches/SAMBA_3_0_RELEASE/source/smbd/dir.c
===
--- branches/SAMBA_3_0_RELEASE/source/smbd/dir.c2005-09-27 20:41:22 UTC 
(rev 10558)
+++ branches/SAMBA_3_0_RELEASE/source/smbd/dir.c2005-09-27 20:44:54 UTC 
(rev 10559)
@@ -1148,8 +1148,23 @@
 void SeekDir(struct smb_Dir *dirp, long offset)
 {
if (offset != dirp-offset) {
-   if (offset == START_OF_DIRECTORY_OFFSET || offset == 
DOT_DOT_DIRECTORY_OFFSET) {
+   if (offset == START_OF_DIRECTORY_OFFSET) {
RewindDir(dirp, offset);
+   /* 
+* Ok we should really set the file number here
+* to 1 to enable .. to be returned next. Trouble
+* is I'm worried about callers using SeekDir(dirp,0)
+* as equivalent to RewindDir(). So leave this alone
+* for now.
+*/
+   } else if  (offset == DOT_DOT_DIRECTORY_OFFSET) {
+   RewindDir(dirp, offset);
+   /*
+* Set the file number to 2 - we want to get the first
+* real file entry (the one we return after ..)
+* on the next ReadDir.
+*/
+   dirp-file_number = 2;
} else if (offset == END_OF_DIRECTORY_OFFSET) {
; /* Don't seek in this case. */
} else {



svn commit: samba-web r817 - in trunk/patches: .

2005-09-27 Thread jerry
Author: jerry
Date: 2005-09-27 21:13:04 + (Tue, 27 Sep 2005)
New Revision: 817

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

Log:
adding note about 3.0.20a delays
Modified:
   trunk/patches/index.html


Changeset:
Modified: trunk/patches/index.html
===
--- trunk/patches/index.html2005-09-27 14:17:47 UTC (rev 816)
+++ trunk/patches/index.html2005-09-27 21:13:04 UTC (rev 817)
@@ -10,10 +10,13 @@
main Samba development trees for the next version of Samba 
3.0.x./p
 
-pbATTENTION/b  A patch release, Samba 3.0.20a, is planned for late in 
the week
+pbATTENTION/b  Samba 3.0.20a, is planned for late in the week
of September 19, 2005.  This release will incorporate all the patches for 
3.0.20 listed
on this page as well as a few possible other fixes./p
 
+pemUpdate/em: The Samba 3.0.20a release has been delayed slightly due to 
some
+minor last minute bugs.  We are hoping to finalize the release by October 
7./p
+
 pFollow these instructions for applying patches:/p
 pre$ tar zxvf samba-3.0.x.tar.gz
 $ cd samba-3.0.x



svn commit: samba r10560 - in trunk/source/include: .

2005-09-27 Thread jelmer
Author: jelmer
Date: 2005-09-27 23:18:55 + (Tue, 27 Sep 2005)
New Revision: 10560

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

Log:
Ignore includes.h.gch

Modified:
   trunk/source/include/


Changeset:

Property changes on: trunk/source/include
___
Name: svn:ignore
   - build_env.h
config.h
stamp-h
proto.h
wrepld_proto.h
config.h.in
version.h
include.h.gch

   + build_env.h
config.h
stamp-h
proto.h
wrepld_proto.h
config.h.in
version.h
includes.h.gch




Build status as of Wed Sep 28 00:00:02 2005

2005-09-27 Thread build
URL: http://build.samba.org/

--- /home/build/master/cache/broken_results.txt.old 2005-09-27 
00:00:16.0 +
+++ /home/build/master/cache/broken_results.txt 2005-09-28 00:00:20.0 
+
@@ -1,17 +1,17 @@
-Build status as of Tue Sep 27 00:00:02 2005
+Build status as of Wed Sep 28 00:00:02 2005
 
 Build counts:
 Tree Total  Broken Panic 
 ccache   38 5  0 
 distcc   38 2  0 
-lorikeet-heimdal 32 17 0 
+lorikeet-heimdal 33 18 0 
 ppp  23 0  0 
 rsync37 2  0 
-samba3  1  0 
+samba3  0  0 
 samba-docs   0  0  0 
-samba4   38 22 1 
-samba_3_039 8  0 
+samba4   37 18 2 
+samba_3_038 9  0 
 smb-build32 3  0 
 talloc   36 12 0 
-tdb  36 3  0 
+tdb  36 2  0 
 


svn commit: samba r10561 - in branches/SAMBA_4_0/source: auth/kerberos heimdal/lib/krb5

2005-09-27 Thread abartlet
Author: abartlet
Date: 2005-09-28 01:09:10 + (Wed, 28 Sep 2005)
New Revision: 10561

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

Log:
This patch takes over KDC socket routines in Heimdal, and directs them
at the Samba4 socket layer. 

The intention here is to ensure that other events may be processed while
heimdal is waiting on the KDC.  The interface is designed to be
sufficiently flexible, so that the plugin may choose how to time
communication with the KDC (ie multiple outstanding requests, looking
for a functional KDC).

I've hacked the socket layer out of cldap.c to handle this very
specific case of one udp packet and reply.  Likewise I also handle
TCP, stolen from the winbind code.

This same plugin system might also be useful for a self-contained
testing mode in Heimdal, in conjunction with libkdc.  I would suggest
using socket-wrapper instead however.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c
   branches/SAMBA_4_0/source/heimdal/lib/krb5/context.c
   branches/SAMBA_4_0/source/heimdal/lib/krb5/krb5-protos.h
   branches/SAMBA_4_0/source/heimdal/lib/krb5/krb5.h
   branches/SAMBA_4_0/source/heimdal/lib/krb5/send_to_kdc.c


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


svn commit: samba r10562 - in branches/SAMBA_4_0/source/kdc: .

2005-09-27 Thread abartlet
Author: abartlet
Date: 2005-09-28 02:22:31 + (Wed, 28 Sep 2005)
New Revision: 10562

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

Log:
Ensure we initalise the error table with hdb errors.  This ensures we
get good text error strings.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/kdc/kdc.c
   branches/SAMBA_4_0/source/kdc/kdc.h


Changeset:
Modified: branches/SAMBA_4_0/source/kdc/kdc.c
===
--- branches/SAMBA_4_0/source/kdc/kdc.c 2005-09-28 01:09:10 UTC (rev 10561)
+++ branches/SAMBA_4_0/source/kdc/kdc.c 2005-09-28 02:22:31 UTC (rev 10562)
@@ -271,6 +271,8 @@
return; 
}
 
+   krb5_add_et_list(kdc-smb_krb5_context-krb5_context, 
initialize_hdb_error_table_r);
+
kdc-config-logf = kdc-smb_krb5_context-logf;
kdc-config-db = talloc(kdc-config, struct HDB *);
if (!kdc-config-db) {

Modified: branches/SAMBA_4_0/source/kdc/kdc.h
===
--- branches/SAMBA_4_0/source/kdc/kdc.h 2005-09-28 01:09:10 UTC (rev 10561)
+++ branches/SAMBA_4_0/source/kdc/kdc.h 2005-09-28 02:22:31 UTC (rev 10562)
@@ -24,6 +24,7 @@
 #include system/kerberos.h
 #include auth/kerberos/kerberos.h
 #include heimdal/kdc/kdc.h
+#include heimdal/lib/hdb/hdb.h
 #include kdc/pac-glue.h
 
 krb5_error_code hdb_ldb_create(TALLOC_CTX *mem_ctx, 



svn commit: samba r10563 - in branches/SAMBA_4_0/source/torture/rpc: .

2005-09-27 Thread abartlet
Author: abartlet
Date: 2005-09-28 02:37:03 + (Wed, 28 Sep 2005)
New Revision: 10563

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

Log:
a null 'join' is a no-op.

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/torture/rpc/testjoin.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/testjoin.c
===
--- branches/SAMBA_4_0/source/torture/rpc/testjoin.c2005-09-28 02:22:31 UTC 
(rev 10562)
+++ branches/SAMBA_4_0/source/torture/rpc/testjoin.c2005-09-28 02:37:03 UTC 
(rev 10563)
@@ -416,6 +416,9 @@
struct samr_DeleteUser d;
NTSTATUS status;
 
+   if (!join) {
+   return;
+   }
d.in.user_handle = join-user_handle;
d.out.user_handle = join-user_handle;




svn commit: samba r10564 - in branches/SAMBA_4_0/source/torture/rpc: .

2005-09-27 Thread abartlet
Author: abartlet
Date: 2005-09-28 02:58:53 + (Wed, 28 Sep 2005)
New Revision: 10564

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

Log:
Make the RPC-SCHANNEL test use the libnet_join code via torture_join_domain

Handle error cases in torture_create_testuser, where we can't connect
to the target server (we were segfaulting due to an untested error
path).

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/torture/rpc/schannel.c
   branches/SAMBA_4_0/source/torture/rpc/testjoin.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/schannel.c
===
--- branches/SAMBA_4_0/source/torture/rpc/schannel.c2005-09-28 02:37:03 UTC 
(rev 10563)
+++ branches/SAMBA_4_0/source/torture/rpc/schannel.c2005-09-28 02:58:53 UTC 
(rev 10564)
@@ -159,8 +159,8 @@
TALLOC_CTX *test_ctx = talloc_named(mem_ctx, 0, test_schannel 
context);
char *test_machine_account = talloc_asprintf(NULL, %s$, 
TEST_MACHINE_NAME);
 
-   join_ctx = torture_create_testuser(test_machine_account, 
lp_workgroup(), 
-  acct_flags, machine_password);
+   join_ctx = torture_join_domain(TEST_MACHINE_NAME, 
+  acct_flags, machine_password);
if (!join_ctx) {
printf(Failed to join domain with acct_flags=0x%x\n, 
acct_flags);
talloc_free(test_ctx);

Modified: branches/SAMBA_4_0/source/torture/rpc/testjoin.c
===
--- branches/SAMBA_4_0/source/torture/rpc/testjoin.c2005-09-28 02:37:03 UTC 
(rev 10563)
+++ branches/SAMBA_4_0/source/torture/rpc/testjoin.c2005-09-28 02:58:53 UTC 
(rev 10564)
@@ -134,7 +134,7 @@
DCERPC_SAMR_UUID,
DCERPC_SAMR_VERSION);
if (!NT_STATUS_IS_OK(status)) {
-   goto failed;
+   return NULL;
}
 
c.in.system_name = NULL;
@@ -148,7 +148,7 @@
errstr = dcerpc_errstr(join, join-p-last_fault_code);
}
printf(samr_Connect failed - %s\n, errstr);
-   goto failed;
+   return NULL;
}
 
printf(Opening domain %s\n, domain);
@@ -284,6 +284,10 @@
struct libnet_context *libnet_ctx;
struct libnet_JoinDomain *libnet_r;
struct test_join *tj;
+   struct samr_SetUserInfo s;
+   union samr_UserInfo u;
+   struct lsa_String comment;
+   struct lsa_String full_name;

tj = talloc(NULL, struct test_join);
if (!tj) return NULL;
@@ -325,6 +329,30 @@
tj-dom_sid = dom_sid_string(tj, libnet_r-out.domain_sid);
*machine_password = libnet_r-out.join_password;
 
+   ZERO_STRUCT(u);
+   s.in.user_handle = tj-user_handle;
+   s.in.info = u;
+   s.in.level = 21;
+
+   u.info21.fields_present = SAMR_FIELD_DESCRIPTION | SAMR_FIELD_COMMENT | 
SAMR_FIELD_FULL_NAME;
+   comment.string = talloc_asprintf(tj, 
+Tortured by Samba4: %s, 
+timestring(tj, time(NULL)));
+   u.info21.comment = comment;
+   full_name.string = talloc_asprintf(tj, 
+Torture account for Samba4: %s, 
+timestring(tj, time(NULL)));
+   u.info21.full_name = full_name;
+
+   u.info21.description.string = talloc_asprintf(tj, 
+ Samba4 torture account 
created by host %s: %s, 
+ lp_netbios_name(), 
timestring(tj, time(NULL)));
+
+   status = dcerpc_samr_SetUserInfo(tj-p, tj, s);
+   if (!NT_STATUS_IS_OK(status)) {
+   printf(SetUserInfo (non-critical) failed - %s\n, 
nt_errstr(status));
+   }
+
DEBUG(0, (%s joined domain %s (%s).\n, 
  libnet_r-in.netbios_name, 
  libnet_r-out.domain_name, 



svn commit: samba r10565 - in branches/SAMBA_4_0/source/auth/gensec: .

2005-09-27 Thread abartlet
Author: abartlet
Date: 2005-09-28 04:50:02 + (Wed, 28 Sep 2005)
New Revision: 10565

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

Log:
Try to make Kerberos authentication a bit more friendly.

This disables it for 'localhost' as well as for any host our KDC does
not recognise.  

Andrew Bartlett

Modified:
   branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c
   branches/SAMBA_4_0/source/auth/gensec/gensec_krb5.c


Changeset:
Modified: branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c
===
--- branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c   2005-09-28 
02:58:53 UTC (rev 10564)
+++ branches/SAMBA_4_0/source/auth/gensec/gensec_gssapi.c   2005-09-28 
04:50:02 UTC (rev 10565)
@@ -239,9 +239,13 @@
return NT_STATUS_INVALID_PARAMETER;
}
if (is_ipaddress(hostname)) {
-   DEBUG(2, (Cannot do GSSAPI to an IP address));
+   DEBUG(2, (Cannot do GSSAPI to an IP address\n));
return NT_STATUS_INVALID_PARAMETER;
}
+   if (strequal(hostname, localhost)) {
+   DEBUG(2, (GSSAPI to 'localhost' does not make sense\n));
+   return NT_STATUS_INVALID_PARAMETER;
+   }
 
nt_status = gensec_gssapi_start(gensec_security);
if (!NT_STATUS_IS_OK(nt_status)) {
@@ -269,7 +273,7 @@
DEBUG(2, (GSS Import name of %s failed: %s\n,
  (char *)name_token.value,
  gssapi_error_string(gensec_gssapi_state, maj_stat, 
min_stat)));
-   return NT_STATUS_UNSUCCESSFUL;
+   return NT_STATUS_INVALID_PARAMETER;
}
 
principal = gensec_get_target_principal(gensec_security);
@@ -306,9 +310,16 @@
NULL, 
NULL);
if (maj_stat) {
-   DEBUG(1, (Aquiring initiator credentails failed: %s\n, 
- gssapi_error_string(gensec_gssapi_state, maj_stat, 
min_stat)));
-   return NT_STATUS_UNSUCCESSFUL;
+   switch (min_stat) {
+   case KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN:
+   DEBUG(3, (Server [%s] is not registered with our KDC: 
%s\n, 
+ hostname, 
gssapi_error_string(gensec_gssapi_state, maj_stat, min_stat)));
+   return NT_STATUS_INVALID_PARAMETER; /* Make SPNEGO 
ignore us, we can't go any further here */
+   default:
+   DEBUG(1, (Aquiring initiator credentails failed: 
%s\n, 
+ gssapi_error_string(gensec_gssapi_state, 
maj_stat, min_stat)));
+   return NT_STATUS_UNSUCCESSFUL;
+   }
}
 
return NT_STATUS_OK;
@@ -408,12 +419,23 @@
gss_release_buffer(min_stat2, output_token);
 
return NT_STATUS_MORE_PROCESSING_REQUIRED;
-   } else {
-   if (maj_stat == GSS_S_FAILURE
-(min_stat == KRB5KRB_AP_ERR_BADVERSION || min_stat == 
KRB5KRB_AP_ERR_MSG_TYPE)) {
+   } else if ((gensec_gssapi_state-gss_oid-length == 
gss_mech_krb5-length)
+(memcmp(gensec_gssapi_state-gss_oid-elements, 
gss_mech_krb5-elements, 
+  gensec_gssapi_state-gss_oid-length) == 0)) {
+   switch (min_stat) {
+   case KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN:
+   DEBUG(3, (Server is not registered with our KDC: 
%s\n, 
+ gssapi_error_string(gensec_gssapi_state, 
maj_stat, min_stat)));
+   return NT_STATUS_INVALID_PARAMETER; /* Make SPNEGO 
ignore us, we can't go any further here */
+   case KRB5KRB_AP_ERR_MSG_TYPE:
/* garbage input, possibly from the auto-mech detection 
*/
return NT_STATUS_INVALID_PARAMETER;
+   default:
+   DEBUG(1, (GSS(krb5) Update failed: %s\n, 
+ gssapi_error_string(out_mem_ctx, maj_stat, 
min_stat)));
+   return nt_status;
}
+   } else {
DEBUG(1, (GSS Update failed: %s\n, 
  gssapi_error_string(out_mem_ctx, maj_stat, 
min_stat)));
return nt_status;

Modified: branches/SAMBA_4_0/source/auth/gensec/gensec_krb5.c
===
--- branches/SAMBA_4_0/source/auth/gensec/gensec_krb5.c 2005-09-28 02:58:53 UTC 
(rev 10564)
+++ branches/SAMBA_4_0/source/auth/gensec/gensec_krb5.c 2005-09-28 04:50:02 UTC 
(rev 10565)
@@ -172,7 +172,10 @@
DEBUG(2, (Cannot do krb5 to an IP address));
return NT_STATUS_INVALID_PARAMETER;
}
-
+   if (strequal(hostname, localhost)) {
+   DEBUG(2, (krb5 to 'localhost' does not make 

Re: svn commit: samba r10565 - in branches/SAMBA_4_0/source/auth/gensec: .

2005-09-27 Thread tridge
  This disables it for 'localhost' as well as for any host our KDC does
  not recognise.  

If it is disabled for localhost, then does that mean we can't test it
in the build farm?

Or will 'localhost.$REALM' work?

Cheers, Tridge


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

2005-09-27 Thread abartlet
Author: abartlet
Date: 2005-09-28 05:38:20 + (Wed, 28 Sep 2005)
New Revision: 10566

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

Log:
Clean up error messages to provide more accurate info.

Andrew Bartlett

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


Changeset:
Modified: branches/SAMBA_4_0/source/libnet/libnet_join.c
===
--- branches/SAMBA_4_0/source/libnet/libnet_join.c  2005-09-28 04:50:02 UTC 
(rev 10565)
+++ branches/SAMBA_4_0/source/libnet/libnet_join.c  2005-09-28 05:38:20 UTC 
(rev 10566)
@@ -613,9 +613,15 @@
 
status = libnet_RpcConnect(ctx, c, c);
if (!NT_STATUS_IS_OK(status)) {
-   r-out.error_string = talloc_asprintf(mem_ctx,
-   Connection to LSA pipe of PDC 
of domain '%s' failed: %s,
-   r-in.domain_name, 
nt_errstr(status));
+   if (r-in.level == LIBNET_JOINDOMAIN_AUTOMATIC) {
+   r-out.error_string = talloc_asprintf(mem_ctx,
+ Connection to 
LSA pipe of PDC of domain '%s' failed: %s,
+ 
r-in.domain_name, nt_errstr(status));
+   } else {
+   r-out.error_string = talloc_asprintf(mem_ctx,
+ Connection to 
LSA pipe with binding '%s' failed: %s,
+ r-in.binding, 
nt_errstr(status));
+   }
talloc_free(tmp_ctx);
return status;
}   
@@ -835,9 +841,8 @@
r-out.error_string = talloc_asprintf(mem_ctx,
  samr_LookupNames 
for [%s] returns %d RIDs\n,
  
r-in.account_name, ln.out.rids.count);
-   status = NT_STATUS_INVALID_PARAMETER;
talloc_free(tmp_ctx);
-   return status;  
+   return NT_STATUS_INVALID_PARAMETER;
}

/* prepare samr_OpenUser */