svn commit: samba r12787 - branches/SAMBA_3_0/source/nsswitch trunk/source/nsswitch
Author: gd Date: 2006-01-09 12:51:57 + (Mon, 09 Jan 2006) New Revision: 12787 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12787 Log: Revert last commit that removed our logic of memorizing negative name_to_sid lookups in the cache. Guenther Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c trunk/source/nsswitch/winbindd_cache.c Changeset: Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c === --- branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2006-01-09 08:24:33 UTC (rev 12786) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2006-01-09 12:51:57 UTC (rev 12787) @@ -989,9 +989,7 @@ status = domain-backend-name_to_sid(domain, mem_ctx, domain_name, name, sid, type); /* and save it */ - if (NT_STATUS_IS_OK(status)) { - wcache_save_name_to_sid(domain, status, domain_name, name, sid, *type); - } + wcache_save_name_to_sid(domain, status, domain_name, name, sid, *type); /* We can't save the sid to name mapping as we don't know the correct case of the name without looking it up */ Modified: trunk/source/nsswitch/winbindd_cache.c === --- trunk/source/nsswitch/winbindd_cache.c 2006-01-09 08:24:33 UTC (rev 12786) +++ trunk/source/nsswitch/winbindd_cache.c 2006-01-09 12:51:57 UTC (rev 12787) @@ -1204,9 +1204,7 @@ status = domain-backend-name_to_sid(domain, mem_ctx, domain_name, name, sid, type); /* and save it */ - if (NT_STATUS_IS_OK(status)) { - wcache_save_name_to_sid(domain, status, domain_name, name, sid, *type); - } + wcache_save_name_to_sid(domain, status, domain_name, name, sid, *type); /* We can't save the sid to name mapping as we don't know the correct case of the name without looking it up */
svn commit: samba r12790 - in branches/SAMBA_4_0/source/lib/ldb/tools: .
Author: metze Date: 2006-01-09 14:19:24 + (Mon, 09 Jan 2006) New Revision: 12790 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12790 Log: fix compiler warning metze Modified: branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c === --- branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c 2006-01-09 13:04:08 UTC (rev 12789) +++ branches/SAMBA_4_0/source/lib/ldb/tools/cmdline.c 2006-01-09 14:19:24 UTC (rev 12790) @@ -144,7 +144,7 @@ const char *p; int cc; - for (p = cs, cc = 1; p = strchr(p, ','); cc++) ; + for (p = cs, cc = 1; (p = strchr(p, ',')); cc++) ; options.controls = talloc_array(ret, char *, cc + 1); if (options.controls == NULL) {
svn commit: samba r12791 - in branches/SAMBA_4_0/source/torture/local: .
Author: metze Date: 2006-01-09 14:58:39 + (Mon, 09 Jan 2006) New Revision: 12791 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12791 Log: fix compiler warning metze Modified: branches/SAMBA_4_0/source/torture/local/ndr.c Changeset: Modified: branches/SAMBA_4_0/source/torture/local/ndr.c === --- branches/SAMBA_4_0/source/torture/local/ndr.c 2006-01-09 14:19:24 UTC (rev 12790) +++ branches/SAMBA_4_0/source/torture/local/ndr.c 2006-01-09 14:58:39 UTC (rev 12791) @@ -84,7 +84,6 @@ BOOL torture_local_ndr(void) { -NTSTATUS status; TALLOC_CTX *mem_ctx; BOOL ret = True;
svn commit: samba r12792 - in branches/SAMBA_4_0/source/ldap_server: .
Author: metze Date: 2006-01-09 15:45:12 + (Mon, 09 Jan 2006) New Revision: 12792 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12792 Log: fix compiler warning metze Modified: branches/SAMBA_4_0/source/ldap_server/ldap_bind.c Changeset: Modified: branches/SAMBA_4_0/source/ldap_server/ldap_bind.c === --- branches/SAMBA_4_0/source/ldap_server/ldap_bind.c 2006-01-09 14:58:39 UTC (rev 12791) +++ branches/SAMBA_4_0/source/ldap_server/ldap_bind.c 2006-01-09 15:45:12 UTC (rev 12792) @@ -104,7 +104,6 @@ DEBUG(10, (BindSASL dn: %s\n,req-dn)); if (!call-conn-gensec) { - struct cli_credentials *server_credentials; call-conn-session_info = NULL; status = gensec_server_start(call-conn, call-conn-gensec,
svn commit: samba r12793 - in branches/SAMBA_4_0/source/rpc_server/lsa: .
Author: metze Date: 2006-01-09 15:50:08 + (Mon, 09 Jan 2006) New Revision: 12793 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12793 Log: fix bugs metze Modified: branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c Changeset: Modified: branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c === --- branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c 2006-01-09 15:45:12 UTC (rev 12792) +++ branches/SAMBA_4_0/source/rpc_server/lsa/dcesrv_lsa.c 2006-01-09 15:50:08 UTC (rev 12793) @@ -1411,7 +1411,7 @@ r-out.rights-count = el-num_values; r-out.rights-names = talloc_array(r-out.rights, - struct lsa_String, r-out.rights-count); + struct lsa_StringLarge, r-out.rights-count); if (r-out.rights-names == NULL) { return NT_STATUS_NO_MEMORY; } @@ -1534,7 +1534,7 @@ astate = h-data; rights.count = r-in.privs-count; - rights.names = talloc_array(mem_ctx, struct lsa_String, rights.count); + rights.names = talloc_array(mem_ctx, struct lsa_StringLarge, rights.count); if (rights.names == NULL) { return NT_STATUS_NO_MEMORY; } @@ -1596,7 +1596,7 @@ } rights-count = r-in.privs-count; - rights-names = talloc_array(mem_ctx, struct lsa_String, rights-count); + rights-names = talloc_array(mem_ctx, struct lsa_StringLarge, rights-count); if (rights-names == NULL) { return NT_STATUS_NO_MEMORY; } @@ -2228,7 +2228,7 @@ return NT_STATUS_NO_SUCH_PRIVILEGE; } - r-out.name = talloc(mem_ctx, struct lsa_String); + r-out.name = talloc(mem_ctx, struct lsa_StringLarge); if (r-out.name == NULL) { return NT_STATUS_NO_MEMORY; } @@ -2258,7 +2258,7 @@ return NT_STATUS_NO_SUCH_PRIVILEGE; } - r-out.disp_name = talloc(mem_ctx, struct lsa_String); + r-out.disp_name = talloc(mem_ctx, struct lsa_StringLarge); if (r-out.disp_name == NULL) { return NT_STATUS_NO_MEMORY; }
svn commit: samba r12794 - branches/SAMBA_3_0/source/include trunk/source/include
Author: jerry Date: 2006-01-09 15:54:16 + (Mon, 09 Jan 2006) New Revision: 12794 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12794 Log: BUG 3340: patch from William JoJo [EMAIL PROTECTED] to fix automatic inclusion of aio support on AIX Modified: branches/SAMBA_3_0/source/include/includes.h trunk/source/include/includes.h Changeset: Modified: branches/SAMBA_3_0/source/include/includes.h === --- branches/SAMBA_3_0/source/include/includes.h2006-01-09 15:50:08 UTC (rev 12793) +++ branches/SAMBA_3_0/source/include/includes.h2006-01-09 15:54:16 UTC (rev 12794) @@ -514,7 +514,7 @@ #include langinfo.h #endif -#ifdef HAVE_AIO_H +#if defined(HAVE_AIO_H) defined(WITH_AIO) #include aio.h #endif Modified: trunk/source/include/includes.h === --- trunk/source/include/includes.h 2006-01-09 15:50:08 UTC (rev 12793) +++ trunk/source/include/includes.h 2006-01-09 15:54:16 UTC (rev 12794) @@ -514,7 +514,7 @@ #include langinfo.h #endif -#ifdef HAVE_AIO_H +#if defined(HAVE_AIO_H) defined(WITH_AIO) #include aio.h #endif
svn commit: samba r12795 - in branches/SAMBA_4_0/source/auth/ntlmssp: .
Author: metze Date: 2006-01-09 16:20:02 + (Mon, 09 Jan 2006) New Revision: 12795 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12795 Log: remember the gensec_security context metze Modified: branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp.c branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp.h Changeset: Modified: branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp.c === --- branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp.c2006-01-09 15:54:16 UTC (rev 12794) +++ branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp.c2006-01-09 16:20:02 UTC (rev 12795) @@ -343,6 +343,7 @@ return NT_STATUS_NO_MEMORY; } + gensec_ntlmssp_state-gensec_security = gensec_security; gensec_ntlmssp_state-auth_context = NULL; gensec_ntlmssp_state-server_info = NULL; Modified: branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp.h === --- branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp.h2006-01-09 15:54:16 UTC (rev 12794) +++ branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp.h2006-01-09 16:20:02 UTC (rev 12795) @@ -77,6 +77,8 @@ struct gensec_ntlmssp_state { + struct gensec_security *gensec_security; + enum ntlmssp_role role; enum samr_Role server_role; uint32_t expected_state;
svn commit: samba r12796 - in branches/SAMBA_4_0/source/wrepl_server: .
Author: metze Date: 2006-01-09 17:03:17 + (Mon, 09 Jan 2006) New Revision: 12796 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12796 Log: use the correct address as initiator metze Modified: branches/SAMBA_4_0/source/wrepl_server/wrepl_in_call.c branches/SAMBA_4_0/source/wrepl_server/wrepl_in_connection.c branches/SAMBA_4_0/source/wrepl_server/wrepl_out_helpers.c branches/SAMBA_4_0/source/wrepl_server/wrepl_server.h Changeset: Modified: branches/SAMBA_4_0/source/wrepl_server/wrepl_in_call.c === --- branches/SAMBA_4_0/source/wrepl_server/wrepl_in_call.c 2006-01-09 16:20:02 UTC (rev 12795) +++ branches/SAMBA_4_0/source/wrepl_server/wrepl_in_call.c 2006-01-09 17:03:17 UTC (rev 12796) @@ -109,12 +109,11 @@ struct wreplsrv_service *service = call-wreplconn-service; struct wrepl_replication *repl_out = call-rep_packet.message.replication; struct wrepl_table *table_out = call-rep_packet.message.replication.info.table; - const char *our_ip = call-wreplconn-our_ip; repl_out-command = WREPL_REPL_TABLE_REPLY; return wreplsrv_fill_wrepl_table(service, call, table_out, -our_ip, True); +service-wins_db-local_owner, True); } static int wreplsrv_in_sort_wins_name(struct wrepl_wins_name *n1, @@ -126,7 +125,6 @@ } static NTSTATUS wreplsrv_record2wins_name(TALLOC_CTX *mem_ctx, - const char *our_address, struct wrepl_wins_name *name, struct winsdb_record *rec) { @@ -264,7 +262,7 @@ status = winsdb_record(service-wins_db, res-msgs[i], call, rec); NT_STATUS_NOT_OK_RETURN(status); - status = wreplsrv_record2wins_name(names, call-wreplconn-our_ip, names[i], rec); + status = wreplsrv_record2wins_name(names, names[i], rec); NT_STATUS_NOT_OK_RETURN(status); talloc_free(rec); talloc_free(res-msgs[i]); Modified: branches/SAMBA_4_0/source/wrepl_server/wrepl_in_connection.c === --- branches/SAMBA_4_0/source/wrepl_server/wrepl_in_connection.c 2006-01-09 16:20:02 UTC (rev 12795) +++ branches/SAMBA_4_0/source/wrepl_server/wrepl_in_connection.c 2006-01-09 17:03:17 UTC (rev 12796) @@ -167,11 +167,6 @@ wreplconn-conn = conn; wreplconn-service = service; - wreplconn-our_ip = socket_get_my_addr(conn-socket, wreplconn); - if (!wreplconn-our_ip) { - wreplsrv_terminate_in_connection(wreplconn, wreplsrv_accept: out of memory); - return; - } peer_ip = socket_get_peer_addr(conn-socket, wreplconn); if (!peer_ip) { @@ -221,8 +216,6 @@ wrepl_in-service = service; wrepl_in-partner = partner; - wrepl_in-our_ip= socket_get_my_addr(sock, wrepl_in); - NT_STATUS_HAVE_NO_MEMORY(wrepl_in-our_ip); status = stream_new_connection_merge(service-task-event_ctx, model_ops, sock, wreplsrv_stream_ops, service-task-msg_ctx, Modified: branches/SAMBA_4_0/source/wrepl_server/wrepl_out_helpers.c === --- branches/SAMBA_4_0/source/wrepl_server/wrepl_out_helpers.c 2006-01-09 16:20:02 UTC (rev 12795) +++ branches/SAMBA_4_0/source/wrepl_server/wrepl_out_helpers.c 2006-01-09 17:03:17 UTC (rev 12796) @@ -27,6 +27,7 @@ #include smbd/service_stream.h #include librpc/gen_ndr/ndr_winsrepl.h #include wrepl_server/wrepl_server.h +#include nbt_server/wins/winsdb.h #include libcli/composite/composite.h #include libcli/wrepl/winsrepl.h @@ -825,7 +826,6 @@ struct socket_context *sock; struct packet_context *packet; uint16_t fde_flags; - const char *our_ip; /* prepare the outgoing request */ req-opcode = WREPL_OPCODE_BITS; @@ -834,11 +834,8 @@ repl_out-command = state-command; - our_ip = socket_get_my_addr(state-wreplconn-sock-sock, state); - NT_STATUS_HAVE_NO_MEMORY(our_ip); - status = wreplsrv_fill_wrepl_table(service, state, table_out, - our_ip, state-full_table); + service-wins_db-local_owner, state-full_table); NT_STATUS_NOT_OK_RETURN(status); /* queue the request */ @@ -911,7 +908,6 @@ struct wrepl_replication *repl_out = state-req_packet.message.replication; struct wrepl_table *table_out = state-req_packet.message.replication.info.table; NTSTATUS status; - const char *our_ip; req-opcode =
svn commit: samba r12797 - in branches/SAMBA_4_0/source/smbd: .
Author: metze Date: 2006-01-09 17:43:48 + (Mon, 09 Jan 2006) New Revision: 12797 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12797 Log: check for a error metze Modified: branches/SAMBA_4_0/source/smbd/process_thread.c Changeset: Modified: branches/SAMBA_4_0/source/smbd/process_thread.c === --- branches/SAMBA_4_0/source/smbd/process_thread.c 2006-01-09 17:03:17 UTC (rev 12796) +++ branches/SAMBA_4_0/source/smbd/process_thread.c 2006-01-09 17:43:48 UTC (rev 12797) @@ -405,9 +405,10 @@ static void thread_log_task_id(int fd) { - char *s; + char *s= NULL; asprintf(s, thread %u: , (uint32_t)pthread_self()); + if (!s) return; write(fd, s, strlen(s)); free(s); }
svn commit: samba r12799 - in branches/SAMBA_4_0/source: include lib
Author: metze Date: 2006-01-09 20:30:44 + (Mon, 09 Jan 2006) New Revision: 12799 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12799 Log: print out function and location too metze Modified: branches/SAMBA_4_0/source/include/debug.h branches/SAMBA_4_0/source/lib/debug.c Changeset: Modified: branches/SAMBA_4_0/source/include/debug.h === --- branches/SAMBA_4_0/source/include/debug.h 2006-01-09 18:25:06 UTC (rev 12798) +++ branches/SAMBA_4_0/source/include/debug.h 2006-01-09 20:30:44 UTC (rev 12799) @@ -35,7 +35,7 @@ void (*log_task_id)(int fd); }; -void do_debug_header(int level); +void do_debug_header(int level, const char *location, const char *func); void do_debug(const char *, ...) PRINTF_ATTRIBUTE(1,2); extern int DEBUGLEVEL; @@ -44,7 +44,7 @@ #define _DEBUG(level, body, header) do { \ if (DEBUGLVL(level)) { \ if (header) { \ - do_debug_header(level); \ + do_debug_header(level, __location__, __FUNCTION__); \ } \ do_debug body; \ } \ Modified: branches/SAMBA_4_0/source/lib/debug.c === --- branches/SAMBA_4_0/source/lib/debug.c 2006-01-09 18:25:06 UTC (rev 12798) +++ branches/SAMBA_4_0/source/lib/debug.c 2006-01-09 20:30:44 UTC (rev 12799) @@ -45,9 +45,9 @@ the backend for debug messages. Note that the DEBUG() macro has already ensured that the log level has been met before this is called */ -void do_debug_header(int level) +void do_debug_header(int level, const char *location, const char *func) { - log_timestring(level); + log_timestring(level, location, func); log_task_id(); } @@ -162,7 +162,7 @@ } } -void log_timestring(int level) +void log_timestring(int level, const char *location, const char *func) { char *t = NULL; char *s = NULL; @@ -172,7 +172,7 @@ t = timestring(NULL, time(NULL)); if (!t) return; - asprintf(s, [%s, %d]\n, t, level); + asprintf(s, [%s, %d %s:%s()]\n, t, level, location, func); talloc_free(t); if (!s) return;
svn commit: samba r12801 - in branches/SAMBA_4_0/source: . include lib lib/replace lib/tdr libcli/raw passdb smb_server torture web_server
Author: jelmer Date: 2006-01-09 21:44:30 + (Mon, 09 Jan 2006) New Revision: 12801 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12801 Log: Some more include/ cleanups (remove unused macros + move files to specific dirs) Added: branches/SAMBA_4_0/source/lib/xfile.h branches/SAMBA_4_0/source/libcli/raw/request.h branches/SAMBA_4_0/source/libcli/raw/signing.h Removed: branches/SAMBA_4_0/source/include/request.h branches/SAMBA_4_0/source/include/signing.h branches/SAMBA_4_0/source/include/xfile.h Modified: branches/SAMBA_4_0/source/include/debug.h branches/SAMBA_4_0/source/include/includes.h branches/SAMBA_4_0/source/lib/replace/replace.h branches/SAMBA_4_0/source/lib/tdr/tdr.c branches/SAMBA_4_0/source/libcli/raw/libcliraw.h branches/SAMBA_4_0/source/main.mk branches/SAMBA_4_0/source/passdb/secrets.h branches/SAMBA_4_0/source/smb_server/smb_server.h branches/SAMBA_4_0/source/torture/gentest.c branches/SAMBA_4_0/source/web_server/web_server.h Changeset: Sorry, the patch is too large (446 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12801
svn commit: samba r12802 - branches/SAMBA_3_0/source trunk/source
Author: tpot Date: 2006-01-09 21:58:40 + (Mon, 09 Jan 2006) New Revision: 12802 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12802 Log: Fix for bugzilla #3389 from William Jojo. This fixes failures on AIX in linking smbd when the symbol table for ld exceeds 65536 bytes. Modified: branches/SAMBA_3_0/source/configure.in trunk/source/configure.in Changeset: Modified: branches/SAMBA_3_0/source/configure.in === --- branches/SAMBA_3_0/source/configure.in 2006-01-09 21:44:30 UTC (rev 12801) +++ branches/SAMBA_3_0/source/configure.in 2006-01-09 21:58:40 UTC (rev 12802) @@ -1460,7 +1460,7 @@ *aix*) AC_DEFINE(AIX,1,[Whether the host os is aix]) BLDSHARED=true LDSHFLAGS=-Wl,-bexpall,-bM:SRE,-bnoentry,-berok - DYNEXP=-Wl,-brtl,-bexpall + DYNEXP=-Wl,-brtl,-bexpall,-bbigtoc PICFLAGS=-O2 if test ${GCC} != yes; then ## for funky AIX compiler using strncpy() Modified: trunk/source/configure.in === --- trunk/source/configure.in 2006-01-09 21:44:30 UTC (rev 12801) +++ trunk/source/configure.in 2006-01-09 21:58:40 UTC (rev 12802) @@ -1460,7 +1460,7 @@ *aix*) AC_DEFINE(AIX,1,[Whether the host os is aix]) BLDSHARED=true LDSHFLAGS=-Wl,-bexpall,-bM:SRE,-bnoentry,-berok - DYNEXP=-Wl,-brtl,-bexpall + DYNEXP=-Wl,-brtl,-bexpall,-bbigtoc PICFLAGS=-O2 if test ${GCC} != yes; then ## for funky AIX compiler using strncpy()
svn commit: samba r12803 - in branches/SAMBA_4_0/source/librpc/ndr: .
Author: metze Date: 2006-01-09 21:59:42 + (Mon, 09 Jan 2006) New Revision: 12803 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12803 Log: if we free the ndr structure how should we access the private pointer anymore? thanks valgrind! metze Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr.c === --- branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2006-01-09 21:58:40 UTC (rev 12802) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr.c 2006-01-09 21:59:42 UTC (rev 12803) @@ -272,6 +272,7 @@ int flags, void *ptr) { struct ndr_print *ndr; + char *ret; ndr = talloc_zero(mem_ctx, struct ndr_print); if (!ndr) return NULL; @@ -280,8 +281,9 @@ ndr-depth = 1; ndr-flags = 0; fn(ndr, name, flags, ptr); + ret = ndr-private; talloc_free(ndr); - return ndr-private; + return ret; } void ndr_set_flags(uint32_t *pflags, uint32_t new_flags)
svn commit: samba r12804 - in branches/SAMBA_4_0/source: auth auth/gensec auth/kerberos auth/ntlmssp cldap_server include kdc ldap_server lib/messaging lib/socket libcli/cldap libcli/dgram libcli/nbt
Author: abartlet Date: 2006-01-09 22:12:53 + (Mon, 09 Jan 2006) New Revision: 12804 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12804 Log: This patch reworks the Samba4 sockets layer to use a socket_address structure that is more generic than just 'IP/port'. It now passes make test, and has been reviewed and updated by metze. (Thankyou *very* much). This passes 'make test' as well as kerberos use (not currently in the testsuite). The original purpose of this patch was to have Samba able to pass a socket address stucture from the BSD layer into the kerberos routines and back again. It also removes nbt_peer_addr, which was being used for a similar purpose. It is a large change, but worthwhile I feel. Andrew Bartlett Modified: branches/SAMBA_4_0/source/auth/auth.h branches/SAMBA_4_0/source/auth/gensec/gensec.c branches/SAMBA_4_0/source/auth/gensec/gensec.h branches/SAMBA_4_0/source/auth/gensec/gensec_krb5.c branches/SAMBA_4_0/source/auth/kerberos/config.mk branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c branches/SAMBA_4_0/source/auth/ntlmssp/ntlmssp_server.c branches/SAMBA_4_0/source/cldap_server/cldap_server.c branches/SAMBA_4_0/source/cldap_server/netlogon.c branches/SAMBA_4_0/source/include/structs.h branches/SAMBA_4_0/source/kdc/kdc.c branches/SAMBA_4_0/source/kdc/kdc.h branches/SAMBA_4_0/source/kdc/kpasswdd.c branches/SAMBA_4_0/source/ldap_server/ldap_server.c branches/SAMBA_4_0/source/lib/messaging/messaging.c branches/SAMBA_4_0/source/lib/socket/access.c branches/SAMBA_4_0/source/lib/socket/connect.c branches/SAMBA_4_0/source/lib/socket/connect_multi.c branches/SAMBA_4_0/source/lib/socket/socket.c branches/SAMBA_4_0/source/lib/socket/socket.h branches/SAMBA_4_0/source/lib/socket/socket_ipv4.c branches/SAMBA_4_0/source/lib/socket/socket_ipv6.c branches/SAMBA_4_0/source/lib/socket/socket_unix.c branches/SAMBA_4_0/source/libcli/cldap/cldap.c branches/SAMBA_4_0/source/libcli/cldap/cldap.h branches/SAMBA_4_0/source/libcli/dgram/browse.c branches/SAMBA_4_0/source/libcli/dgram/dgramsocket.c branches/SAMBA_4_0/source/libcli/dgram/libdgram.h branches/SAMBA_4_0/source/libcli/dgram/mailslot.c branches/SAMBA_4_0/source/libcli/dgram/netlogon.c branches/SAMBA_4_0/source/libcli/dgram/ntlogon.c branches/SAMBA_4_0/source/libcli/nbt/libnbt.h branches/SAMBA_4_0/source/libcli/nbt/namequery.c branches/SAMBA_4_0/source/libcli/nbt/namerefresh.c branches/SAMBA_4_0/source/libcli/nbt/nameregister.c branches/SAMBA_4_0/source/libcli/nbt/namerelease.c branches/SAMBA_4_0/source/libcli/nbt/nbtsocket.c branches/SAMBA_4_0/source/libcli/wrepl/winsrepl.c branches/SAMBA_4_0/source/librpc/rpc/dcerpc_sock.c branches/SAMBA_4_0/source/nbt_server/defense.c branches/SAMBA_4_0/source/nbt_server/dgram/browse.c branches/SAMBA_4_0/source/nbt_server/dgram/netlogon.c branches/SAMBA_4_0/source/nbt_server/dgram/ntlogon.c branches/SAMBA_4_0/source/nbt_server/dgram/request.c branches/SAMBA_4_0/source/nbt_server/interfaces.c branches/SAMBA_4_0/source/nbt_server/irpc.c branches/SAMBA_4_0/source/nbt_server/nodestatus.c branches/SAMBA_4_0/source/nbt_server/packet.c branches/SAMBA_4_0/source/nbt_server/query.c branches/SAMBA_4_0/source/nbt_server/wins/wins_dns_proxy.c branches/SAMBA_4_0/source/nbt_server/wins/winsserver.c branches/SAMBA_4_0/source/rpc_server/spoolss/dcesrv_spoolss.c branches/SAMBA_4_0/source/scripting/ejs/smbcalls_auth.c branches/SAMBA_4_0/source/smb_server/management.c branches/SAMBA_4_0/source/smb_server/smb/sesssetup.c branches/SAMBA_4_0/source/smb_server/tcon.c branches/SAMBA_4_0/source/smbd/service_stream.c branches/SAMBA_4_0/source/torture/local/messaging.c branches/SAMBA_4_0/source/torture/local/socket.c branches/SAMBA_4_0/source/torture/nbt/dgram.c branches/SAMBA_4_0/source/torture/nbt/register.c branches/SAMBA_4_0/source/torture/nbt/wins.c branches/SAMBA_4_0/source/torture/nbt/winsbench.c branches/SAMBA_4_0/source/torture/nbt/winsreplication.c branches/SAMBA_4_0/source/utils/nmblookup.c branches/SAMBA_4_0/source/web_server/http.c branches/SAMBA_4_0/source/wrepl_server/wrepl_in_call.c branches/SAMBA_4_0/source/wrepl_server/wrepl_in_connection.c Changeset: Sorry, the patch is too large (5279 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12804
svn commit: samba r12805 - in branches/SAMBA_4_0/source/build/m4: .
Author: metze Date: 2006-01-09 22:19:51 + (Mon, 09 Jan 2006) New Revision: 12805 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12805 Log: merge from samba3 metze Modified: branches/SAMBA_4_0/source/build/m4/rewrite.m4 Changeset: Modified: branches/SAMBA_4_0/source/build/m4/rewrite.m4 === --- branches/SAMBA_4_0/source/build/m4/rewrite.m4 2006-01-09 22:12:53 UTC (rev 12804) +++ branches/SAMBA_4_0/source/build/m4/rewrite.m4 2006-01-09 22:19:51 UTC (rev 12805) @@ -189,8 +189,8 @@ ;; *aix*) AC_DEFINE(AIX,1,[Whether the host os is aix]) BLDSHARED=true - LDSHFLAGS=-Wl,-bexpall,-bM:SRE,-bnoentry - DYNEXP=-Wl,-brtl,-bexpall + LDSHFLAGS=-Wl,-bexpall,-bM:SRE,-bnoentry,-berok + DYNEXP=-Wl,-brtl,-bexpall,-bbigtoc PICFLAG=-O2 if test ${GCC} != yes; then ## for funky AIX compiler using strncpy()
svn commit: samba r12806 - in branches/SAMBA_4_0/source/script/tests: .
Author: metze Date: 2006-01-09 22:28:26 + (Mon, 09 Jan 2006) New Revision: 12806 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12806 Log: tridge: in revision 12634 you introduced to validate the ndr_print output and RPC-ECHO doesn't pass under valgrind anymore with this metze Modified: branches/SAMBA_4_0/source/script/tests/test_rpc_quick.sh Changeset: Modified: branches/SAMBA_4_0/source/script/tests/test_rpc_quick.sh === --- branches/SAMBA_4_0/source/script/tests/test_rpc_quick.sh2006-01-09 22:19:51 UTC (rev 12805) +++ branches/SAMBA_4_0/source/script/tests/test_rpc_quick.sh2006-01-09 22:28:26 UTC (rev 12806) @@ -2,10 +2,17 @@ # add tests to this list as they start passing, so we test # that they stay passing -ncacn_np_tests=RPC-ECHO RPC-ALTERCONTEXT RPC-JOIN -ncalrpc_tests=RPC-ECHO RPC-ALTERCONTEXT RPC-JOIN -ncacn_ip_tcp_tests=RPC-ECHO RPC-ALTERCONTEXT RPC-JOIN +ncacn_np_tests=RPC-ALTERCONTEXT RPC-JOIN +ncalrpc_tests=RPC-ALTERCONTEXT RPC-JOIN +ncacn_ip_tcp_tests=RPC-ALTERCONTEXT RPC-JOIN +# if we're not running under valgrind test some more tests +if [ -z $VALGRIND ]; then + ncacn_np_tests=$ncacn_np_tests RPC-ECHO + ncalrpc_tests=$ncalrpc_tests RPC-ECHO + ncacn_ip_tcp_tests=$ncacn_ip_tcp_tests RPC-ECHO +fi + if [ $# -lt 4 ]; then cat EOF Usage: test_rpc_quick.sh SERVER USERNAME PASSWORD DOMAIN @@ -25,11 +32,11 @@ failed=0 for bindoptions in seal,validate,padcheck bigendian; do for transport in ncalrpc ncacn_np ncacn_ip_tcp; do - case $transport in + case $transport in ncalrpc) tests=$ncalrpc_tests ;; ncacn_np) tests=$ncacn_np_tests ;; ncacn_ip_tcp) tests=$ncacn_ip_tcp_tests ;; - esac + esac for t in $tests; do name=$t on $transport with $bindoptions testit $name $VALGRIND bin/smbtorture $TORTURE_OPTIONS $transport:$server[$bindoptions] -U$username%$password -W $domain $t $* || failed=`expr $failed + 1`
svn commit: samba r12807 - in branches/SAMBA_4_0/source/auth/kerberos: .
Author: abartlet Date: 2006-01-09 22:30:08 + (Mon, 09 Jan 2006) New Revision: 12807 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12807 Log: I'm wondering if this might fix AIX on the build farm... Andrew Bartlett Modified: branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c Changeset: Modified: branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c === --- branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c 2006-01-09 22:28:26 UTC (rev 12806) +++ branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c 2006-01-09 22:30:08 UTC (rev 12807) @@ -23,10 +23,10 @@ #include includes.h #include system/kerberos.h +#include system/network.h #include auth/kerberos/kerberos.h #include lib/socket/socket.h #include lib/events/events.h - #include heimdal_build/roken.h /*
svn commit: samba r12808 - in branches/SAMBA_4_0/source/auth/kerberos: .
Author: abartlet Date: 2006-01-09 22:34:34 + (Mon, 09 Jan 2006) New Revision: 12808 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12808 Log: Actually, with that we can avoid roken compleatly. Andrew Bartlett Modified: branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c Changeset: Modified: branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c === --- branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c 2006-01-09 22:30:08 UTC (rev 12807) +++ branches/SAMBA_4_0/source/auth/kerberos/krb5_init_context.c 2006-01-09 22:34:34 UTC (rev 12808) @@ -27,7 +27,6 @@ #include auth/kerberos/kerberos.h #include lib/socket/socket.h #include lib/events/events.h -#include heimdal_build/roken.h /* context structure for operations on cldap packets
Build status as of Tue Jan 10 00:00:02 2006
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2006-01-09 00:00:31.0 + +++ /home/build/master/cache/broken_results.txt 2006-01-10 00:00:06.0 + @@ -1,17 +1,17 @@ -Build status as of Mon Jan 9 00:00:01 2006 +Build status as of Tue Jan 10 00:00:02 2006 Build counts: Tree Total Broken Panic ccache 32 7 0 distcc 31 5 0 -lorikeet-heimdal 26 14 0 +lorikeet-heimdal 28 15 0 ppp 16 0 0 rsync31 7 0 samba3 0 0 samba-docs 0 0 0 -samba4 34 18 1 +samba4 34 18 2 samba_3_032 5 0 smb-build26 4 0 talloc 28 11 0 -tdb 28 2 0 +tdb 29 3 0
svn commit: samba r12810 - in branches/SAMBA_4_0/source/lib/ldb/tools: .
Author: idra Date: 2006-01-10 00:52:05 + (Tue, 10 Jan 2006) New Revision: 12810 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12810 Log: handle control options gracefully and don't segfault Modified: branches/SAMBA_4_0/source/lib/ldb/tools/ldbsearch.c Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/tools/ldbsearch.c === --- branches/SAMBA_4_0/source/lib/ldb/tools/ldbsearch.c 2006-01-09 22:43:52 UTC (rev 12809) +++ branches/SAMBA_4_0/source/lib/ldb/tools/ldbsearch.c 2006-01-10 00:52:05 UTC (rev 12810) @@ -79,42 +79,81 @@ for (i = 0; control_strings[i]; i++) { if (strncmp(control_strings[i], extended_dn:, 12) == 0) { struct ldb_extended_dn_control *control; + const char *p; + int crit, type, ret; + p = (control_strings[i][12]); + ret = sscanf(p, %d:%d, crit, type); + if ((ret != 2) || (crit 0) || (crit 1) || (type 0) || (type 1)) { + fprintf(stderr, invalid extended_dn control syntax\n); + return NULL; + } + ctrl[i] = talloc(ctrl, struct ldb_control); ctrl[i]-oid = LDB_CONTROL_EXTENDED_DN_OID; - ctrl[i]-critical = control_strings[i][12]=='1'?1:0; + ctrl[i]-critical = crit; control = talloc(ctrl[i], struct ldb_extended_dn_control); - control-type = atoi(control_strings[i][14]); + control-type = type; ctrl[i]-data = control; + + continue; } if (strncmp(control_strings[i], paged_results:, 14) == 0) { struct ldb_paged_control *control; + const char *p; + int crit, size, ret; + + p = (control_strings[i][14]); + ret = sscanf(p, %d:%d, crit, size); + if ((ret != 2) || (crit 0) || (crit 1) || (size 0)) { + fprintf(stderr, invalid paged_results control syntax\n); + return NULL; + } + ctrl[i] = talloc(ctrl, struct ldb_control); ctrl[i]-oid = LDB_CONTROL_PAGED_RESULTS_OID; - ctrl[i]-critical = control_strings[i][14]=='1'?1:0; + ctrl[i]-critical = crit; control = talloc(ctrl[i], struct ldb_paged_control); - control-size = atoi(control_strings[i][16]); + control-size = size; control-cookie = NULL; control-cookie_len = 0; ctrl[i]-data = control; + + continue; } if (strncmp(control_strings[i], server_sort:, 12) == 0) { struct ldb_server_sort_control **control; + const char *p; + char attr[256]; + char rule[128]; + int crit, rev, ret; + p = (control_strings[i][12]); + ret = sscanf(p, %d:%d:%255[^:]:%127[^:], crit, rev, attr, rule); + if ((ret 3) || (crit 0) || (crit 1) || (rev 0 ) || (rev 1) ||attr[0] == '\0') { + fprintf(stderr, invalid server_sort control syntax\n); + return NULL; + } ctrl[i] = talloc(ctrl, struct ldb_control); ctrl[i]-oid = LDB_CONTROL_SERVER_SORT_OID; - ctrl[i]-critical = control_strings[i][12]=='1'?1:0; + ctrl[i]-critical = crit; control = talloc_array(ctrl[i], struct ldb_server_sort_control *, 2); control[0] = talloc(control, struct ldb_server_sort_control); - control[0]-attributeName = talloc_strdup(control, control_strings[i][16]); - control[0]-orderingRule = NULL; - control[0]-reverse = control_strings[i][14]=='1'?1:0; + control[0]-attributeName = talloc_strdup(control, attr); + control[0]-orderingRule = talloc_strdup(control, rule); + control[0]-reverse = rev; control[1] = NULL; ctrl[i]-data = control; + + continue; } + + /* no controls matched, throw an error */ + fprintf(stderr, Invalid control name\n); + return NULL;
svn commit: samba r12811 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: tridge Date: 2006-01-10 03:18:33 + (Tue, 10 Jan 2006) New Revision: 12811 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12811 Log: valgrind on RPC-ECHO with validate is extremely slow - speed it up if torture:quick is set Modified: branches/SAMBA_4_0/source/torture/rpc/echo.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/echo.c === --- branches/SAMBA_4_0/source/torture/rpc/echo.c2006-01-10 00:52:05 UTC (rev 12810) +++ branches/SAMBA_4_0/source/torture/rpc/echo.c2006-01-10 03:18:33 UTC (rev 12811) @@ -123,9 +123,16 @@ { int i; NTSTATUS status; - int len = 20 + (random() % 5000); + int len; struct echo_SourceData r; + if (lp_parm_bool(-1, torture, quick, False) + (p-conn-flags DCERPC_DEBUG_VALIDATE_BOTH)) { + len = 100 + (random() % 5000); + } else { + len = 20 + (random() % 5000); + } + printf(\nTesting SourceData\n); r.in.len = len; @@ -155,9 +162,16 @@ int i; NTSTATUS status; uint8_t *data_in; - int len = 20 + (random() % 5000); + int len; struct echo_SinkData r; + if (lp_parm_bool(-1, torture, quick, False) + (p-conn-flags DCERPC_DEBUG_VALIDATE_BOTH)) { + len = 100 + (random() % 5000); + } else { + len = 20 + (random() % 5000); + } + printf(\nTesting SinkData\n); data_in = talloc_size(mem_ctx, len);
svn commit: samba r12812 - in branches/SAMBA_4_0/source: script/tests torture/rpc
Author: tridge Date: 2006-01-10 03:26:39 + (Tue, 10 Jan 2006) New Revision: 12812 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12812 Log: speed up RPC-ECHO with validate some more, and re-enable it under valgrind in 'make valgrindtest' Modified: branches/SAMBA_4_0/source/script/tests/test_rpc_quick.sh branches/SAMBA_4_0/source/torture/rpc/echo.c Changeset: Modified: branches/SAMBA_4_0/source/script/tests/test_rpc_quick.sh === --- branches/SAMBA_4_0/source/script/tests/test_rpc_quick.sh2006-01-10 03:18:33 UTC (rev 12811) +++ branches/SAMBA_4_0/source/script/tests/test_rpc_quick.sh2006-01-10 03:26:39 UTC (rev 12812) @@ -2,17 +2,10 @@ # add tests to this list as they start passing, so we test # that they stay passing -ncacn_np_tests=RPC-ALTERCONTEXT RPC-JOIN -ncalrpc_tests=RPC-ALTERCONTEXT RPC-JOIN -ncacn_ip_tcp_tests=RPC-ALTERCONTEXT RPC-JOIN +ncacn_np_tests=RPC-ALTERCONTEXT RPC-JOIN RPC-ECHO +ncalrpc_tests=RPC-ALTERCONTEXT RPC-JOIN RPC-ECHO +ncacn_ip_tcp_tests=RPC-ALTERCONTEXT RPC-JOIN RPC-ECHO -# if we're not running under valgrind test some more tests -if [ -z $VALGRIND ]; then - ncacn_np_tests=$ncacn_np_tests RPC-ECHO - ncalrpc_tests=$ncalrpc_tests RPC-ECHO - ncacn_ip_tcp_tests=$ncacn_ip_tcp_tests RPC-ECHO -fi - if [ $# -lt 4 ]; then cat EOF Usage: test_rpc_quick.sh SERVER USERNAME PASSWORD DOMAIN Modified: branches/SAMBA_4_0/source/torture/rpc/echo.c === --- branches/SAMBA_4_0/source/torture/rpc/echo.c2006-01-10 03:18:33 UTC (rev 12811) +++ branches/SAMBA_4_0/source/torture/rpc/echo.c2006-01-10 03:26:39 UTC (rev 12812) @@ -77,9 +77,16 @@ int i; NTSTATUS status; uint8_t *data_in, *data_out; - int len = 1 + (random() % 5000); + int len; struct echo_EchoData r; + if (lp_parm_bool(-1, torture, quick, False) + (p-conn-flags DCERPC_DEBUG_VALIDATE_BOTH)) { + len = 1 + (random() % 500); + } else { + len = 1 + (random() % 5000); + } + printf(\nTesting EchoData\n); data_in = talloc_size(mem_ctx, len); @@ -128,7 +135,7 @@ if (lp_parm_bool(-1, torture, quick, False) (p-conn-flags DCERPC_DEBUG_VALIDATE_BOTH)) { - len = 100 + (random() % 5000); + len = 100 + (random() % 500); } else { len = 20 + (random() % 5000); }
svn commit: samba r12813 - in branches/SAMBA_4_0/source/web_server: .
Author: abartlet Date: 2006-01-10 03:45:15 + (Tue, 10 Jan 2006) New Revision: 12813 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12813 Log: Remove unused file to avoid confusion. We now go via the auth subsystem. Andrew Bartlett Removed: branches/SAMBA_4_0/source/web_server/pam.c Changeset: Sorry, the patch is too large (346 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12813
svn commit: samba r12814 - in branches/SAMBA_4_0/source/lib/replace: .
Author: metze Date: 2006-01-10 07:08:27 + (Tue, 10 Jan 2006) New Revision: 12814 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=revroot=sambarev=12814 Log: we need this here too, as we'll include replace.h for building heimdal/* too, and for this we don't include includes.h (hopefully) fix the build on AIX metze Modified: branches/SAMBA_4_0/source/lib/replace/replace.h Changeset: Modified: branches/SAMBA_4_0/source/lib/replace/replace.h === --- branches/SAMBA_4_0/source/lib/replace/replace.h 2006-01-10 03:45:15 UTC (rev 12813) +++ branches/SAMBA_4_0/source/lib/replace/replace.h 2006-01-10 07:08:27 UTC (rev 12814) @@ -100,6 +100,18 @@ #define bzero(a,b) memset((a),'\0',(b)) #endif +#ifndef PRINTF_ATTRIBUTE +#if !defined(NO_PRINTF_ATTRIBUTE) (__GNUC__ = 3) +/** Use gcc attribute to check printf fns. a1 is the 1-based index of + * the parameter containing the format, and a2 the index of the first + * argument. Note that some gcc 2.x versions don't handle this + * properly **/ +#define PRINTF_ATTRIBUTE(a1, a2) __attribute__ ((format (__printf__, a1, a2))) +#else +#define PRINTF_ATTRIBUTE(a1, a2) +#endif +#endif + /* add varargs prototypes with printf checking */ #ifndef HAVE_SNPRINTF_DECL int snprintf(char *,size_t ,const char *, ...) PRINTF_ATTRIBUTE(3,4);