svn commit: samba r10892 - in branches/SAMBA_4_0/source/lib/ldb/ldb_tdb: .
Author: tridge Date: 2005-10-11 06:21:07 + (Tue, 11 Oct 2005) New Revision: 10892 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10892 Log: - improved the handling of the special distinguishedName attribute - ensure we don't add attributes twice, should a user ask for the attribute twice. Do this in such a way that we don't become O(n^2) - removed some unused code Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c === --- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c 2005-10-11 05:01:52 UTC (rev 10891) +++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c 2005-10-11 06:21:07 UTC (rev 10892) @@ -42,11 +42,18 @@ add one element to a message */ static int msg_add_element(struct ldb_context *ldb, - struct ldb_message *ret, const struct ldb_message_element *el) + struct ldb_message *ret, + const struct ldb_message_element *el, + int check_duplicates) { unsigned int i; struct ldb_message_element *e2, *elnew; + if (check_duplicates && ldb_msg_find_element(ret, el->name)) { + /* its already there */ + return 0; + } + e2 = talloc_realloc(ret, ret->elements, struct ldb_message_element, ret->num_elements+1); if (!e2) { return -1; @@ -84,6 +91,30 @@ } /* + add the special distinguishedName element +*/ +static int msg_add_distinguished_name(struct ldb_module *module, struct ldb_message *msg) +{ + struct ldb_message_element el; + struct ldb_val val; + int ret; + + el.flags = 0; + el.name = talloc_strdup(msg, "distinguishedName"); + if (!el.name) { + return -1; + } + el.num_values = 1; + el.values = &val; + val.data = ldb_dn_linearize(msg, msg->dn); + val.length = strlen(val.data); + + ret = msg_add_element(module->ldb, msg, &el, 1); + talloc_free(el.name); + return ret; +} + +/* add all elements from one message into another */ static int msg_add_all_elements(struct ldb_module *module, struct ldb_message *ret, @@ -91,14 +122,20 @@ { struct ldb_context *ldb = module->ldb; unsigned int i; + int check_duplicates = (ret->num_elements != 0); + if (msg_add_distinguished_name(module, ret) != 0) { + return -1; + } + for (i=0;inum_elements;i++) { const struct ldb_attrib_handler *h; h = ldb_attrib_handler(ldb, msg->elements[i].name); if (h->flags & LDB_ATTR_FLAG_HIDDEN) { continue; } - if (msg_add_element(ldb, ret, &msg->elements[i]) != 0) { + if (msg_add_element(ldb, ret, &msg->elements[i], + check_duplicates) != 0) { return -1; } } @@ -151,27 +188,10 @@ continue; } - if (ldb_attr_cmp(attrs[i], "dn") == 0 || - ldb_attr_cmp(attrs[i], "distinguishedName") == 0) { - struct ldb_message_element el2; - struct ldb_val val; - - el2.flags = 0; - el2.name = talloc_strdup(ret, attrs[i]); - if (!el2.name) { - talloc_free(ret); - return NULL; + if (ldb_attr_cmp(attrs[i], "distinguishedName") == 0) { + if (msg_add_distinguished_name(module, ret) != 0) { + return -1; } - el2.num_values = 1; - el2.values = &val; - val.data = ldb_dn_linearize(ret, ret->dn); - val.length = strlen(val.data); - - if (msg_add_element(ldb, ret, &el2) != 0) { - talloc_free(ret); - return NULL; - } - talloc_free(discard_const_p(char, el2.name)); continue; } @@ -179,7 +199,7 @@ if (!el) { continue; } - if (msg_add_element(ldb, ret, el) != 0) { + if (msg_add_element(ldb, ret, el, 1) != 0) { talloc_free(ret); return NULL; } @@ -277,69 +297,7 @@ return tdb_chainunlock_read(ltdb->tdb, key); } - - /* - search the database for a single simple dn -*/ -static int ltdb_sea
svn commit: samba r10891 - in branches/SAMBA_4_0/source/lib/tdb/common: .
Author: tridge Date: 2005-10-11 05:01:52 + (Tue, 11 Oct 2005) New Revision: 10891 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10891 Log: I noticed that the secrets.db was not being backed up on my system due to msync/mmap not changing the mtime of the file. This patch ensures that for successfully completed transactions we update the mtime. I don't do this on all tdb writes as its too expensive, but doing it just on transactions is bearable, as those cost quite a lot anyway. Modified: branches/SAMBA_4_0/source/lib/tdb/common/transaction.c Changeset: Modified: branches/SAMBA_4_0/source/lib/tdb/common/transaction.c === --- branches/SAMBA_4_0/source/lib/tdb/common/transaction.c 2005-10-11 04:43:44 UTC (rev 10890) +++ branches/SAMBA_4_0/source/lib/tdb/common/transaction.c 2005-10-11 05:01:52 UTC (rev 10891) @@ -857,6 +857,15 @@ tdb_brlock_len(tdb, GLOBAL_LOCK, F_UNLCK, F_SETLKW, 0, 1); + /* on some systems (like Linux 2.6.x) changes via mmap/msync + don't change the mtime of the file, this means the file may + not be backed up (as tdb rounding to block sizes means that + file size changes are quite rare too). The following forces + mtime changes when a transaction completes */ +#ifdef HAVE_UTIME + utime(tdb->name, NULL); +#endif + /* use a transaction cancel to free memory and remove the transaction locks */ tdb_transaction_cancel(tdb);
svn commit: samba r10890 - in branches/tmp/samba4-winsrepl: . source/lib/ldb/ldb_tdb source/libcli/composite source/libcli/raw source/libcli/smb_composite source/ntvfs/cifs source/pidl/lib/Parse/Pidl/
Author: metze Date: 2005-10-11 04:43:44 + (Tue, 11 Oct 2005) New Revision: 10890 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10890 Log: [EMAIL PROTECTED] (orig r10878): vlendec | 2005-10-10 21:57:55 +0200 Reply to some comments by tridge and metze: * rename the composite helper functions from comp_* to composite_* * Move the lsa initialization to wb_connect_lsa.c * Equip smb_composite_connect with a fallback_to_anonymous The latter two simplify wb_init_domain.c quite a bit. Volker [EMAIL PROTECTED] (orig r10879): jra | 2005-10-10 22:03:34 +0200 Added the ZERO_STRUCT(q_u), (r_u) entries to the generated Samba3 code. Jelmer please check ! Jeremy. [EMAIL PROTECTED] (orig r10880): jra | 2005-10-10 22:05:29 +0200 Missed terminating ';', sorry. Jeremy. [EMAIL PROTECTED] (orig r10889): tridge | 2005-10-11 06:34:15 +0200 make searches for dn's less of a special case, and much faster when part of more complex expressions Added: branches/tmp/samba4-winsrepl/source/winbind/wb_connect_lsa.c Modified: branches/tmp/samba4-winsrepl/ branches/tmp/samba4-winsrepl/source/lib/ldb/ldb_tdb/ldb_index.c branches/tmp/samba4-winsrepl/source/lib/ldb/ldb_tdb/ldb_search.c branches/tmp/samba4-winsrepl/source/libcli/composite/composite.c branches/tmp/samba4-winsrepl/source/libcli/raw/clitree.c branches/tmp/samba4-winsrepl/source/libcli/smb_composite/connect.c branches/tmp/samba4-winsrepl/source/libcli/smb_composite/fetchfile.c branches/tmp/samba4-winsrepl/source/libcli/smb_composite/fsinfo.c branches/tmp/samba4-winsrepl/source/libcli/smb_composite/smb_composite.h branches/tmp/samba4-winsrepl/source/ntvfs/cifs/vfs_cifs.c branches/tmp/samba4-winsrepl/source/pidl/lib/Parse/Pidl/Samba3/Server.pm branches/tmp/samba4-winsrepl/source/winbind/config.mk branches/tmp/samba4-winsrepl/source/winbind/wb_async_helpers.c branches/tmp/samba4-winsrepl/source/winbind/wb_init_domain.c Changeset: Sorry, the patch is too large (1403 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10890
svn commit: samba r10889 - in branches/SAMBA_4_0/source/lib/ldb/ldb_tdb: .
Author: tridge Date: 2005-10-11 04:34:15 + (Tue, 11 Oct 2005) New Revision: 10889 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10889 Log: make searches for dn's less of a special case, and much faster when part of more complex expressions Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c Changeset: Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c === --- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c 2005-10-11 04:28:46 UTC (rev 10888) +++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_index.c 2005-10-11 04:34:15 UTC (rev 10889) @@ -319,6 +319,13 @@ if (ldb_attr_cmp(tree->u.equality.attr, LTDB_OBJECTCLASS) == 0) { return ltdb_index_dn_objectclass(module, tree, index_list, list); } + if (ldb_attr_cmp(tree->u.equality.attr, "distinguishedName") == 0 || + ldb_attr_cmp(tree->u.equality.attr, "dn") == 0) { + char *dn = talloc_strdup(list, (char *)tree->u.equality.value.data); + list->count = 1; + list->dn = &dn; + return 1; + } return ltdb_index_dn_simple(module, tree, index_list, list); } Modified: branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c === --- branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c 2005-10-11 04:28:46 UTC (rev 10888) +++ branches/SAMBA_4_0/source/lib/ldb/ldb_tdb/ldb_search.c 2005-10-11 04:34:15 UTC (rev 10889) @@ -501,21 +501,6 @@ if ((base == NULL || base->comp_num == 0) && (scope == LDB_SCOPE_BASE || scope == LDB_SCOPE_ONELEVEL)) return -1; - /* it is important that we handle dn queries this way, and not - via a full db search, otherwise ldb is horribly slow */ - if (tree->operation == LDB_OP_EQUALITY && - (ldb_attr_cmp(tree->u.equality.attr, "dn") == 0 || -ldb_attr_cmp(tree->u.equality.attr, "distinguishedName") == 0)) { - struct ldb_dn *dn; - dn = ldb_dn_explode(module->ldb, tree->u.equality.value.data); - if (dn == NULL) { - return LDB_ERR_INVALID_DN_SYNTAX; - } - ret = ltdb_search_dn(module, dn, attrs, res); - talloc_free(dn); - return ret; - } - if (ltdb_lock_read(module) != 0) { return -1; }
svn commit: samba r10888 - in branches/SAMBA_3_0/source/smbd: .
Author: jra Date: 2005-10-11 04:28:46 + (Tue, 11 Oct 2005) New Revision: 10888 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10888 Log: We've already checked 'CAN_WRITE' so we don't need to do it again. Jeremy. Modified: branches/SAMBA_3_0/source/smbd/dosmode.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/dosmode.c === --- branches/SAMBA_3_0/source/smbd/dosmode.c2005-10-11 04:28:29 UTC (rev 10887) +++ branches/SAMBA_3_0/source/smbd/dosmode.c2005-10-11 04:28:46 UTC (rev 10888) @@ -479,7 +479,7 @@ */ /* Check if we have write access. */ - if (CAN_WRITE(conn) && can_write_to_file(conn, fname, &sbuf)) { + if (can_write_to_file(conn, fname, &sbuf)) { /* We are allowed to become root and change the filetime. */ become_root(); ret = SMB_VFS_UTIME(conn,fname, times);
svn commit: samba r10887 - in trunk/source/smbd: .
Author: jra Date: 2005-10-11 04:28:29 + (Tue, 11 Oct 2005) New Revision: 10887 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10887 Log: We've already checked 'CAN_WRITE' so we don't need to do it again. Jeremy. Modified: trunk/source/smbd/dosmode.c Changeset: Modified: trunk/source/smbd/dosmode.c === --- trunk/source/smbd/dosmode.c 2005-10-11 04:26:09 UTC (rev 10886) +++ trunk/source/smbd/dosmode.c 2005-10-11 04:28:29 UTC (rev 10887) @@ -479,7 +479,7 @@ */ /* Check if we have write access. */ - if (CAN_WRITE(conn) && can_write_to_file(conn, fname, &sbuf)) { + if (can_write_to_file(conn, fname, &sbuf)) { /* We are allowed to become root and change the filetime. */ become_root(); ret = SMB_VFS_UTIME(conn,fname, times);
svn commit: samba r10886 - in trunk/source/smbd: .
Author: jra Date: 2005-10-11 04:26:09 + (Tue, 11 Oct 2005) New Revision: 10886 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10886 Log: Fix bug where read-only share files are always seen as read-only. Noticed by Andrew Bartlett. Jeremy Modified: trunk/source/smbd/dosmode.c trunk/source/smbd/posix_acls.c Changeset: Modified: trunk/source/smbd/dosmode.c === --- trunk/source/smbd/dosmode.c 2005-10-11 04:25:47 UTC (rev 10885) +++ trunk/source/smbd/dosmode.c 2005-10-11 04:26:09 UTC (rev 10886) @@ -479,7 +479,7 @@ */ /* Check if we have write access. */ - if (can_write_to_file(conn, fname, &sbuf)) { + if (CAN_WRITE(conn) && can_write_to_file(conn, fname, &sbuf)) { /* We are allowed to become root and change the filetime. */ become_root(); ret = SMB_VFS_UTIME(conn,fname, times); Modified: trunk/source/smbd/posix_acls.c === --- trunk/source/smbd/posix_acls.c 2005-10-11 04:25:47 UTC (rev 10885) +++ trunk/source/smbd/posix_acls.c 2005-10-11 04:26:09 UTC (rev 10886) @@ -4149,16 +4149,13 @@ / Actually emulate the in-kernel access checking for write access. We need this to successfully check for ability to write for dos filetimes. + Note this doesn't take into account share write permissions. / BOOL can_write_to_file(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf) { int ret; - if (!CAN_WRITE(conn)) { - return False; - } - if (current_user.uid == 0 || conn->admin_user) { /* I'm sorry sir, I didn't know you were root... */ return True;
svn commit: samba r10885 - in branches/SAMBA_3_0/source/smbd: .
Author: jra Date: 2005-10-11 04:25:47 + (Tue, 11 Oct 2005) New Revision: 10885 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10885 Log: Fix bug where read-only share files are always seen as read-only. Noticed by Andrew Bartlett. Jeremy Modified: branches/SAMBA_3_0/source/smbd/dosmode.c branches/SAMBA_3_0/source/smbd/posix_acls.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/dosmode.c === --- branches/SAMBA_3_0/source/smbd/dosmode.c2005-10-10 22:18:12 UTC (rev 10884) +++ branches/SAMBA_3_0/source/smbd/dosmode.c2005-10-11 04:25:47 UTC (rev 10885) @@ -479,7 +479,7 @@ */ /* Check if we have write access. */ - if (can_write_to_file(conn, fname, &sbuf)) { + if (CAN_WRITE(conn) && can_write_to_file(conn, fname, &sbuf)) { /* We are allowed to become root and change the filetime. */ become_root(); ret = SMB_VFS_UTIME(conn,fname, times); Modified: branches/SAMBA_3_0/source/smbd/posix_acls.c === --- branches/SAMBA_3_0/source/smbd/posix_acls.c 2005-10-10 22:18:12 UTC (rev 10884) +++ branches/SAMBA_3_0/source/smbd/posix_acls.c 2005-10-11 04:25:47 UTC (rev 10885) @@ -4149,16 +4149,13 @@ / Actually emulate the in-kernel access checking for write access. We need this to successfully check for ability to write for dos filetimes. + Note this doesn't take into account share write permissions. / BOOL can_write_to_file(connection_struct *conn, const char *fname, SMB_STRUCT_STAT *psbuf) { int ret; - if (!CAN_WRITE(conn)) { - return False; - } - if (current_user.uid == 0 || conn->admin_user) { /* I'm sorry sir, I didn't know you were root... */ return True;
Build status as of Tue Oct 11 00:00:02 2005
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2005-10-10 00:00:29.0 + +++ /home/build/master/cache/broken_results.txt 2005-10-11 00:00:33.0 + @@ -1,17 +1,17 @@ -Build status as of Mon Oct 10 00:00:02 2005 +Build status as of Tue Oct 11 00:00:02 2005 Build counts: Tree Total Broken Panic -ccache 9 2 0 -distcc 11 2 0 -lorikeet-heimdal 14 9 0 +ccache 10 2 0 +distcc 11 3 0 +lorikeet-heimdal 12 6 0 ppp 18 0 0 -rsync38 3 0 +rsync37 2 0 samba2 0 0 samba-docs 0 0 0 samba4 38 16 4 samba_3_038 10 0 smb-build29 5 0 -talloc 13 5 0 -tdb 8 3 0 +talloc 11 5 0 +tdb 9 4 0
svn commit: samba r10884 - in trunk/source/rpc_server: .
Author: jerry Date: 2005-10-10 22:18:12 + (Mon, 10 Oct 2005) New Revision: 10884 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10884 Log: adding placeholder for access check in eventlog open Modified: trunk/source/rpc_server/srv_eventlog_nt.c Changeset: Modified: trunk/source/rpc_server/srv_eventlog_nt.c === --- trunk/source/rpc_server/srv_eventlog_nt.c 2005-10-10 22:17:41 UTC (rev 10883) +++ trunk/source/rpc_server/srv_eventlog_nt.c 2005-10-10 22:18:12 UTC (rev 10884) @@ -31,6 +31,7 @@ uint32 num_records; uint32 oldest_entry; uint32 flags; + uint32 access_granted; } EVENTLOG_INFO; / @@ -64,6 +65,14 @@ } / +/ + +static BOOL elog_check_access( EVENTLOG_INFO *info ) +{ + return True; +} + +/ / static BOOL elog_validate_logname( const char *name ) @@ -95,11 +104,16 @@ return WERR_NOMEM; elog->logname = talloc_strdup( elog, logname ); + + /* do the access check */ + if ( !elog_check_access( elog ) ) { + TALLOC_FREE( elog ); + return WERR_ACCESS_DENIED; + } /* having done the nexessary access checks, surround the tdb open with a {un}become_root() pair since we can only have one tdb context per eventlog per process */ - become_root(); elog->tdb = elog_open_tdb( elog->logname ); @@ -115,6 +129,12 @@ elog->logname = talloc_strdup( elog, ELOG_APPL ); + /* do the access check */ + if ( !elog_check_access( elog ) ) { + TALLOC_FREE( elog ); + return WERR_ACCESS_DENIED; + } + become_root(); elog->tdb = elog_open_tdb( elog->logname ); unbecome_root(); @@ -124,7 +144,7 @@ TALLOC_FREE( elog ); return WERR_OBJECT_PATH_INVALID;/* ??? */ } - } + } /* create the policy handle */
svn commit: samba r10883 - in trunk/source/rpc_server: .
Author: jerry Date: 2005-10-10 22:17:41 + (Mon, 10 Oct 2005) New Revision: 10883 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10883 Log: cleaning up comments Modified: trunk/source/rpc_server/srv_eventlog_lib.c Changeset: Modified: trunk/source/rpc_server/srv_eventlog_lib.c === --- trunk/source/rpc_server/srv_eventlog_lib.c 2005-10-10 22:05:06 UTC (rev 10882) +++ trunk/source/rpc_server/srv_eventlog_lib.c 2005-10-10 22:17:41 UTC (rev 10883) @@ -104,9 +104,12 @@ return 0; } -/* returns the size of the eventlog, and if MaxSize is a non-null ptr, puts - the MaxSize there. This is purely a way not to have yet another function that solely - reads the maxsize of the eventlog. Yeah, that's it. */ +/ + returns the size of the eventlog, and if MaxSize is a non-null + ptr, puts the MaxSize there. This is purely a way not to have yet + another function that solely reads the maxsize of the eventlog. + Yeah, that's it. +/ int elog_tdb_size( TDB_CONTEXT * tdb, int *MaxSize, int *Retention ) { @@ -133,20 +136,18 @@ return tsize.size; } +/ + Discard early event logs until we have enough for 'needed' bytes... + NO checking done beforehand to see that we actually need to do + this, and it's going to pluck records one-by-one. So, it's best + to determine that this needs to be done before doing it. -/* - Discard early event logs until we have enough for 'needed' bytes... - NO checking done beforehand to see that we actually need to do this, and - it's going to pluck records one-by-one. So, it's best to determine that this - needs to be done before doing it. + Setting whack_by_date to True indicates that eventlogs falling + outside of the retention range need to go... + + return True if we made enough room to accommodate needed bytes +/ - Setting whack_by_date to True indicates that eventlogs falling outside of the - retention range need to go... - -*/ - -/* return True if we made enough room to accommodate needed bytes */ - BOOL make_way_for_eventlogs( TDB_CONTEXT * the_tdb, int32 needed, BOOL whack_by_date ) { @@ -242,10 +243,10 @@ return True; } -/* +/ some hygiene for an eventlog - see how big it is, and then calculate how many bytes we need to remove -*/ +/ BOOL prune_eventlog( TDB_CONTEXT * tdb ) { @@ -269,6 +270,9 @@ return make_way_for_eventlogs( tdb, 0, True ); } +/ +/ + BOOL can_write_to_eventlog( TDB_CONTEXT * tdb, int32 needed ) { int calcd_size;
svn commit: samba r10882 - in trunk/source: include rpc_server utils
Author: jerry Date: 2005-10-10 22:05:06 + (Mon, 10 Oct 2005) New Revision: 10882 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10882 Log: renames for #defines of event lgo tdb keys (for consistency) & fix wr_eventlog for new elog_open_tdb() semantics Modified: trunk/source/include/rpc_eventlog.h trunk/source/rpc_server/srv_eventlog_lib.c trunk/source/rpc_server/srv_eventlog_nt.c trunk/source/utils/wr_eventlog.c Changeset: Modified: trunk/source/include/rpc_eventlog.h === --- trunk/source/include/rpc_eventlog.h 2005-10-10 21:44:01 UTC (rev 10881) +++ trunk/source/include/rpc_eventlog.h 2005-10-10 22:05:06 UTC (rev 10882) @@ -47,11 +47,11 @@ #define EVENTLOG_AUDIT_FAILURE0x0010 /* Defines for TDB keys */ -#define VN_oldest_entry "INFO/oldest_entry" -#define VN_next_record "INFO/next_record" -#define VN_version "INFO/version" -#define VN_maxsize "INFO/maxsize" -#define VN_retention "INFO/retention" +#define EVT_OLDEST_ENTRY "INFO/oldest_entry" +#define EVT_NEXT_RECORD "INFO/next_record" +#define EVT_VERSION "INFO/version" +#define EVT_MAXSIZE "INFO/maxsize" +#define EVT_RETENTION "INFO/retention" #define ELOG_APPL "Application" #define ELOG_SYS "System" Modified: trunk/source/rpc_server/srv_eventlog_lib.c === --- trunk/source/rpc_server/srv_eventlog_lib.c 2005-10-10 21:44:01 UTC (rev 10881) +++ trunk/source/rpc_server/srv_eventlog_lib.c 2005-10-10 22:05:06 UTC (rev 10882) @@ -55,12 +55,12 @@ /* initialize with defaults, copy real values in here from registry */ - tdb_store_int32( tdb, VN_oldest_entry, 1 ); - tdb_store_int32( tdb, VN_next_record, 1 ); - tdb_store_int32( tdb, VN_maxsize, 0x8 ); - tdb_store_int32( tdb, VN_retention, 0x93A80 ); + tdb_store_int32( tdb, EVT_OLDEST_ENTRY, 1 ); + tdb_store_int32( tdb, EVT_NEXT_RECORD, 1 ); + tdb_store_int32( tdb, EVT_MAXSIZE, 0x8 ); + tdb_store_int32( tdb, EVT_RETENTION, 0x93A80 ); - tdb_store_int32( tdb, VN_version, EVENTLOG_DATABASE_VERSION_V1 ); + tdb_store_int32( tdb, EVT_VERSION, EVENTLOG_DATABASE_VERSION_V1 ); return tdb; } @@ -120,11 +120,11 @@ tdb_traverse( tdb, eventlog_tdb_size_fn, &tsize ); if ( MaxSize != NULL ) { - *MaxSize = tdb_fetch_int32( tdb, VN_maxsize ); + *MaxSize = tdb_fetch_int32( tdb, EVT_MAXSIZE ); } if ( Retention != NULL ) { - *Retention = tdb_fetch_int32( tdb, VN_retention ); + *Retention = tdb_fetch_int32( tdb, EVT_RETENTION ); } DEBUG( 1, @@ -168,12 +168,12 @@ if ( mem_ctx == NULL ) return False; /* can't allocate memory indicates bigger problems */ /* lock */ - tdb_lock_bystring( the_tdb, VN_next_record, 1 ); + tdb_lock_bystring( the_tdb, EVT_NEXT_RECORD, 1 ); /* read */ - end_record = tdb_fetch_int32( the_tdb, VN_next_record ); - start_record = tdb_fetch_int32( the_tdb, VN_oldest_entry ); - Retention = tdb_fetch_int32( the_tdb, VN_retention ); - MaxSize = tdb_fetch_int32( the_tdb, VN_maxsize ); + end_record = tdb_fetch_int32( the_tdb, EVT_NEXT_RECORD ); + start_record = tdb_fetch_int32( the_tdb, EVT_OLDEST_ENTRY ); + Retention = tdb_fetch_int32( the_tdb, EVT_RETENTION ); + MaxSize = tdb_fetch_int32( the_tdb, EVT_MAXSIZE ); time( ¤t_time ); @@ -199,7 +199,7 @@ DEBUG( 8, ( "Can't find a record for the key, record [%d]\n", i ) ); - tdb_unlock_bystring( the_tdb, VN_next_record ); + tdb_unlock_bystring( the_tdb, EVT_NEXT_RECORD ); return False; } nbytes += ret.dsize;/* note this includes overhead */ @@ -236,9 +236,9 @@ tdb_delete( the_tdb, key ); } - tdb_store_int32( the_tdb, VN_oldest_entry, new_start ); + tdb_store_int32( the_tdb, EVT_OLDEST_ENTRY, new_start ); } - tdb_unlock_bystring( the_tdb, VN_next_record ); + tdb_unlock_bystring( the_tdb, EVT_NEXT_RECORD ); return True; } @@ -340,7 +340,7 @@ tdb = tdb_open_log( tdbpath, 0, TDB_DEFAULT, O_RDWR , 0 ); if ( tdb ) { - vers_id = tdb_fetch_int32( tdb, VN_version ); + vers_id = tdb_fetch_int32( tdb, EVT_VERSION ); if ( vers_id != EVENTLOG_DATABASE_VERSION_V1 ) { DEBUG(1,("elog_open_tdb: Invalid version [%d] on file [%s].\n", @@ -466,9 +466,9 @@ /* need to read the record number and insert it into the entry here */ /* lock */
svn commit: samba r10881 - in trunk/source: . include rpc_client rpc_parse rpc_server rpcclient
Author: jra Date: 2005-10-10 21:44:01 + (Mon, 10 Oct 2005) New Revision: 10881 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10881 Log: Add in the first Samba4 pidl auto-generated parsing code. Thanks a *lot* to Jelmer for all his work on this. Jeremy. Modified: trunk/source/configure.in trunk/source/include/rpc_dfs.h trunk/source/rpc_client/cli_dfs.c trunk/source/rpc_parse/parse_dfs.c trunk/source/rpc_server/srv_dfs.c trunk/source/rpc_server/srv_dfs_nt.c trunk/source/rpcclient/cmd_dfs.c Changeset: Sorry, the patch is too large (5802 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10881
svn commit: samba r10880 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3: .
Author: jra Date: 2005-10-10 20:05:29 + (Mon, 10 Oct 2005) New Revision: 10880 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10880 Log: Missed terminating ';', sorry. Jeremy. Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/Server.pm Changeset: Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/Server.pm === --- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/Server.pm 2005-10-10 20:03:34 UTC (rev 10879) +++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/Server.pm 2005-10-10 20:05:29 UTC (rev 10880) @@ -36,8 +36,8 @@ pidl "prs_struct *data = &p->in_data.data;"; pidl "prs_struct *rdata = &p->out_data.rdata;"; pidl ""; - pidl "ZERO_STRUCT(q_u);" - pidl "ZERO_STRUCT(r_u);" + pidl "ZERO_STRUCT(q_u);"; + pidl "ZERO_STRUCT(r_u);"; pidl ""; pidl "if (!$if->{NAME}_io_q_$fn->{NAME}(\"\", &q_u, data, 0))"; pidl "\treturn False;";
svn commit: samba r10879 - in branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3: .
Author: jra Date: 2005-10-10 20:03:34 + (Mon, 10 Oct 2005) New Revision: 10879 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10879 Log: Added the ZERO_STRUCT(q_u), (r_u) entries to the generated Samba3 code. Jelmer please check ! Jeremy. Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/Server.pm Changeset: Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/Server.pm === --- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/Server.pm 2005-10-10 19:57:55 UTC (rev 10878) +++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/Server.pm 2005-10-10 20:03:34 UTC (rev 10879) @@ -36,6 +36,9 @@ pidl "prs_struct *data = &p->in_data.data;"; pidl "prs_struct *rdata = &p->out_data.rdata;"; pidl ""; + pidl "ZERO_STRUCT(q_u);" + pidl "ZERO_STRUCT(r_u);" + pidl ""; pidl "if (!$if->{NAME}_io_q_$fn->{NAME}(\"\", &q_u, data, 0))"; pidl "\treturn False;"; pidl "";
svn commit: samba r10878 - in branches/SAMBA_4_0/source: libcli/composite libcli/raw libcli/smb_composite ntvfs/cifs winbind
Author: vlendec Date: 2005-10-10 19:57:55 + (Mon, 10 Oct 2005) New Revision: 10878 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10878 Log: Reply to some comments by tridge and metze: * rename the composite helper functions from comp_* to composite_* * Move the lsa initialization to wb_connect_lsa.c * Equip smb_composite_connect with a fallback_to_anonymous The latter two simplify wb_init_domain.c quite a bit. Volker Added: branches/SAMBA_4_0/source/winbind/wb_connect_lsa.c Modified: branches/SAMBA_4_0/source/libcli/composite/composite.c branches/SAMBA_4_0/source/libcli/raw/clitree.c branches/SAMBA_4_0/source/libcli/smb_composite/connect.c branches/SAMBA_4_0/source/libcli/smb_composite/fetchfile.c branches/SAMBA_4_0/source/libcli/smb_composite/fsinfo.c branches/SAMBA_4_0/source/libcli/smb_composite/smb_composite.h branches/SAMBA_4_0/source/ntvfs/cifs/vfs_cifs.c branches/SAMBA_4_0/source/winbind/config.mk branches/SAMBA_4_0/source/winbind/wb_async_helpers.c branches/SAMBA_4_0/source/winbind/wb_init_domain.c Changeset: Sorry, the patch is too large (1327 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10878
svn commit: samba r10877 - in branches/tmp/samba4_ldap_controls: . source/include source/libcli/util source/librpc/idl source/librpc/ndr source/pidl/lib/Parse/Pidl/Samba/NDR source/torture source/tort
Author: idra Date: 2005-10-10 19:53:20 + (Mon, 10 Oct 2005) New Revision: 10877 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10877 Log: merge from main tree Added: branches/tmp/samba4_ldap_controls/source/torture/rpc/dssync.c Modified: branches/tmp/samba4_ldap_controls/ branches/tmp/samba4_ldap_controls/source/include/doserr.h branches/tmp/samba4_ldap_controls/source/libcli/util/doserr.c branches/tmp/samba4_ldap_controls/source/librpc/idl/drsuapi.idl branches/tmp/samba4_ldap_controls/source/librpc/ndr/libndr.h branches/tmp/samba4_ldap_controls/source/librpc/ndr/ndr_basic.c branches/tmp/samba4_ldap_controls/source/librpc/ndr/ndr_compression.c branches/tmp/samba4_ldap_controls/source/pidl/lib/Parse/Pidl/Samba/NDR/Parser.pm branches/tmp/samba4_ldap_controls/source/torture/config.mk branches/tmp/samba4_ldap_controls/source/torture/rpc/drsuapi.c branches/tmp/samba4_ldap_controls/source/torture/torture.c Changeset: Sorry, the patch is too large (417 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10877
svn commit: samba-web r824 - in trunk/support: .
Author: deryck Date: 2005-10-10 18:58:15 + (Mon, 10 Oct 2005) New Revision: 824 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=824 Log: Remove company info at company rep's request. deryck Modified: trunk/support/netherlands.html Changeset: Modified: trunk/support/netherlands.html === --- trunk/support/netherlands.html 2005-10-03 16:08:54 UTC (rev 823) +++ trunk/support/netherlands.html 2005-10-10 18:58:15 UTC (rev 824) @@ -4,24 +4,7 @@ Commercial Support - Netherlands - - -Den Haag - -UNO Automatiseringsdiensten - v.d. Kunstraat 30 - 2521 BC Den Haag - Netherlands - http://www.uno.nl/it";>http://www.uno.nl/it - Contact:Jeroen Schellart - Email: mailto:[EMAIL PROTECTED]">[EMAIL PROTECTED] - Phone: +31-70-3300502 - Fax:+31-70-3300489 - Samba Experience: Install and setup of Samba on Linux, Solaris, AIX and HP-UX - - - Nieuw Vennep
svn commit: samba r10876 - in trunk/source/rpc_server: .
Author: jerry Date: 2005-10-10 18:11:11 + (Mon, 10 Oct 2005) New Revision: 10876 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10876 Log: use a reference count strategy for dealing with eventlog tdbs; still have to enforce access control in user space since we can only have one open context per tdb in any given process Modified: trunk/source/rpc_server/srv_eventlog_lib.c trunk/source/rpc_server/srv_eventlog_nt.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=rev&root=samba&rev=10876
svn commit: samba r10875 - in branches/tmp/samba4-winsrepl: . source/include source/libcli/util source/librpc/idl source/librpc/ndr source/pidl/lib/Parse/Pidl/Samba/NDR source/torture source/torture/r
Author: metze Date: 2005-10-10 15:12:56 + (Mon, 10 Oct 2005) New Revision: 10875 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10875 Log: [EMAIL PROTECTED] (orig r10865): metze | 2005-10-10 11:33:06 +0200 merge branches/SOC/SAMBA_4_0 into main the main SAMBA_4_0 tree metze [EMAIL PROTECTED]: metze | 2005-06-30 13:44:23 +0200 create the SAMBA_4_0 branch for the Summer Of Code Project metze [EMAIL PROTECTED]: brad | 2005-07-24 03:09:48 +0200 Branching Samba 4 [EMAIL PROTECTED]: brad | 2005-07-24 06:39:00 +0200 added 'make installmisc' to howto.txt added existing 'compression' option to level8 drsuapi torture test added new 'neighbour_writeable' option to level8 drsuapi torture test [EMAIL PROTECTED]: brad | 2005-07-24 06:42:38 +0200 added metze's dssync patch as source/torture/rpc/dssync.c [EMAIL PROTECTED]: brad | 2005-07-25 00:24:46 +0200 added a test called RPC-DSSYNC to config.mk hacking at dssync.c in an attempt to make it compile [EMAIL PROTECTED]: brad | 2005-07-25 15:19:21 +0200 Changing dssync.c to use ldb routines for accessing ldap rather than raw ldap calls. [EMAIL PROTECTED]: brad | 2005-07-26 03:35:38 +0200 more ldb changes to test_CompleteJoin(), it mostly kind of almost works now! [EMAIL PROTECTED]: brad | 2005-07-26 03:56:00 +0200 Trying to fix the crazy nesting in the branch [EMAIL PROTECTED]: brad | 2005-07-26 04:48:29 +0200 merging latest changes [EMAIL PROTECTED]: brad | 2005-07-26 04:53:43 +0200 removing nested branch [EMAIL PROTECTED]: jerry | 2005-07-27 05:04:57 +0200 merging on of Brad missing changes from the nested 4.0 branch debacle [EMAIL PROTECTED]: jerry | 2005-07-27 05:14:42 +0200 syncing up with the main 4_0 branch for Brad [EMAIL PROTECTED]: brad | 2005-07-29 00:26:30 +0200 merging changes from branches/SAMBA_4_0 [EMAIL PROTECTED]: brad | 2005-07-29 21:07:57 +0200 Bringing my tree up to date [EMAIL PROTECTED]: brad | 2005-07-30 00:48:04 +0200 making dssync.c more ldb-centric, reverted samlogon.c from rev. 8845 to get my branch to compile again. [EMAIL PROTECTED]: brad | 2005-07-30 03:20:33 +0200 I think I have the ldb code down in test_CompleteJoin (not complete yet though) [EMAIL PROTECTED]: brad | 2005-07-30 07:08:13 +0200 Changed comments to C style /**/ (thanks Richard), some more changes to test_CompleteJoin(). [EMAIL PROTECTED]: brad | 2005-07-31 04:45:32 +0200 Bringing the SOC/SAMBA_4_0 branch up to date. [EMAIL PROTECTED]: brad | 2005-07-31 20:00:41 +0200 Updated some missing files from the branch [EMAIL PROTECTED]: brad | 2005-07-31 20:25:50 +0200 Removing autogenerated files from branch [EMAIL PROTECTED]: brad | 2005-07-31 20:43:58 +0200 last of the unneeded files in SOC/SAMBA_4_0 [EMAIL PROTECTED]: brad | 2005-08-03 18:51:23 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-03 10:44:30 -0600 [EMAIL PROTECTED]: j0j0 | 2005-08-02 22:54:13 -0600 creating a local branch of branches/SAMBA_4_0 [EMAIL PROTECTED]: brad | 2005-08-03 20:57:48 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-03 13:00:11 -0600 Fixing differences between this branch and /branches/SAMBA_4_0 [EMAIL PROTECTED]: brad | 2005-08-03 21:18:05 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-03 13:23:12 -0600 Updating config.mk so that smbtorture builds again [EMAIL PROTECTED]: brad | 2005-08-04 18:17:36 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-03 21:01:02 -0600 Start using libnet_Join() for DC join. [EMAIL PROTECTED]: brad | 2005-08-04 18:17:47 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-04 10:21:34 -0600 Some more work towards performing a dc join. [EMAIL PROTECTED]: brad | 2005-08-04 18:53:51 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-04 10:53:00 -0600 Fixed a bug (passing a TALLOC_CTX to libnet_context_init() ) [EMAIL PROTECTED]: brad | 2005-08-04 21:59:55 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-04 14:04:55 -0600 Some more work on the domain join [EMAIL PROTECTED]: brad | 2005-08-05 16:50:26 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-05 08:55:58 -0600 Committing minor changes before merge [EMAIL PROTECTED]: brad | 2005-08-07 17:25:25 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-07 09:30:12 -0600 Reworked libnet_join to use two join levels, AUTOMATIC and SPECIFIED. [EMAIL PROTECTED]: brad | 2005-08-07 17:25:36 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-07 09:31:22 -0600 Working with libnet_Join(), code cleanup needed in the near future. [EMAIL PROTECTED]: brad | 2005-08-07 21:40:22 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-07 13:46:09 -0600 Some code cleanup to make things a little more readable. [EMAIL PROTECTED]: brad | 2005-08-12 01:31:48 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-11 17:38:44 -0600 Split libnet_JoinDomain() into libnet_JoinDomain() and libnet_JoinADSDomain(). [EMAIL PROTECTED]: brad
svn commit: samba r10874 - in branches/tmp/vl-cluster/source: . include lib libads libsmb modules nmbd nsswitch param passdb python registry rpc_client rpc_parse rpc_server script services smbd utils
Author: vlendec Date: 2005-10-10 15:03:52 + (Mon, 10 Oct 2005) New Revision: 10874 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10874 Log: Merge trunk up to r10873 Added: branches/tmp/vl-cluster/source/.indent.pro branches/tmp/vl-cluster/source/include/modconf.h branches/tmp/vl-cluster/source/rpc_server/srv_eventlog_lib.c branches/tmp/vl-cluster/source/services/svc_wins.c branches/tmp/vl-cluster/source/utils/wr_eventlog.c Removed: branches/tmp/vl-cluster/source/include/modconf.h Modified: branches/tmp/vl-cluster/source/Makefile.in branches/tmp/vl-cluster/source/include/doserr.h branches/tmp/vl-cluster/source/include/includes.h branches/tmp/vl-cluster/source/include/ntdomain.h branches/tmp/vl-cluster/source/include/rpc_eventlog.h branches/tmp/vl-cluster/source/include/rpc_misc.h branches/tmp/vl-cluster/source/include/rpc_svcctl.h branches/tmp/vl-cluster/source/include/secrets.h branches/tmp/vl-cluster/source/include/smb.h branches/tmp/vl-cluster/source/lib/talloc.c branches/tmp/vl-cluster/source/lib/talloctort.c branches/tmp/vl-cluster/source/libads/authdata.c branches/tmp/vl-cluster/source/libsmb/clikrb5.c branches/tmp/vl-cluster/source/modules/vfs_audit.c branches/tmp/vl-cluster/source/modules/vfs_extd_audit.c branches/tmp/vl-cluster/source/modules/vfs_full_audit.c branches/tmp/vl-cluster/source/nmbd/nmbd.c branches/tmp/vl-cluster/source/nsswitch/winbindd_dual.c branches/tmp/vl-cluster/source/nsswitch/winbindd_misc.c branches/tmp/vl-cluster/source/param/loadparm.c branches/tmp/vl-cluster/source/passdb/secrets.c branches/tmp/vl-cluster/source/python/py_common.h branches/tmp/vl-cluster/source/python/py_lsa.c branches/tmp/vl-cluster/source/python/py_samr.c branches/tmp/vl-cluster/source/python/py_spoolss.h branches/tmp/vl-cluster/source/python/py_spoolss_drivers.c branches/tmp/vl-cluster/source/python/py_spoolss_forms.c branches/tmp/vl-cluster/source/python/py_spoolss_jobs.c branches/tmp/vl-cluster/source/python/py_spoolss_ports.c branches/tmp/vl-cluster/source/python/py_spoolss_printerdata.c branches/tmp/vl-cluster/source/python/py_spoolss_printers.c branches/tmp/vl-cluster/source/python/py_srvsvc.c branches/tmp/vl-cluster/source/python/setup.py branches/tmp/vl-cluster/source/registry/reg_db.c branches/tmp/vl-cluster/source/registry/reg_eventlog.c branches/tmp/vl-cluster/source/registry/reg_frontend.c branches/tmp/vl-cluster/source/rpc_client/cli_pipe.c branches/tmp/vl-cluster/source/rpc_parse/parse_misc.c branches/tmp/vl-cluster/source/rpc_parse/parse_net.c branches/tmp/vl-cluster/source/rpc_parse/parse_ntsvcs.c branches/tmp/vl-cluster/source/rpc_parse/parse_prs.c branches/tmp/vl-cluster/source/rpc_server/srv_eventlog_nt.c branches/tmp/vl-cluster/source/rpc_server/srv_netlog_nt.c branches/tmp/vl-cluster/source/rpc_server/srv_ntsvcs_nt.c branches/tmp/vl-cluster/source/rpc_server/srv_pipe.c branches/tmp/vl-cluster/source/rpc_server/srv_reg_nt.c branches/tmp/vl-cluster/source/rpc_server/srv_svcctl_nt.c branches/tmp/vl-cluster/source/script/installman.sh branches/tmp/vl-cluster/source/services/services_db.c branches/tmp/vl-cluster/source/services/svc_rcinit.c branches/tmp/vl-cluster/source/smbd/open.c branches/tmp/vl-cluster/source/smbd/oplock_irix.c branches/tmp/vl-cluster/source/smbd/reply.c branches/tmp/vl-cluster/source/smbd/server.c branches/tmp/vl-cluster/source/smbd/service.c branches/tmp/vl-cluster/source/wrepld/server.c Changeset: Sorry, the patch is too large (4809 lines) to include; please use WebSVN to see it! WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10874
svn commit: samba r10873 - in branches/SAMBA_4_0/source/librpc/ndr: .
Author: metze Date: 2005-10-10 14:10:37 + (Mon, 10 Oct 2005) New Revision: 10873 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10873 Log: check the complete payload header metze Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_compression.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_compression.c === --- branches/SAMBA_4_0/source/librpc/ndr/ndr_compression.c 2005-10-10 13:25:11 UTC (rev 10872) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr_compression.c 2005-10-10 14:10:37 UTC (rev 10873) @@ -116,14 +116,22 @@ NDR_CHECK(ndr_pull_uint32(comndr, NDR_SCALARS, &payload_header[2])); NDR_CHECK(ndr_pull_uint32(comndr, NDR_SCALARS, &payload_header[3])); - payload_size = payload_header[2]; - - /* TODO: check the first 4 bytes of the header */ + if (payload_header[0] != 0x00081001) { + return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad MSZIP payload_header[0] [0x%08X] != [0x00081001] (PULL)", + payload_header[0]); + } if (payload_header[1] != 0x) { return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad MSZIP payload_header[1] [0x%08X] != [0x] (PULL)", payload_header[1]); } + payload_size = payload_header[2]; + + if (payload_header[3] != 0x) { + return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad MSZIP payload_header[3] [0x%08X] != [0x] (PULL)", + payload_header[3]); + } + payload_offset = comndr->offset; NDR_CHECK(ndr_pull_advance(comndr, payload_size)); payload = comndr->data + payload_offset;
svn commit: samba r10872 - in branches/SAMBA_4_0/source/librpc/ndr: .
Author: metze Date: 2005-10-10 13:25:11 + (Mon, 10 Oct 2005) New Revision: 10872 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10872 Log: fix the length of the dummy XPRESS decompressed buffer metze Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_compression.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_compression.c === --- branches/SAMBA_4_0/source/librpc/ndr/ndr_compression.c 2005-10-10 12:31:05 UTC (rev 10871) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr_compression.c 2005-10-10 13:25:11 UTC (rev 10872) @@ -161,7 +161,7 @@ NDR_CHECK(ndr_pull_uint32(ndrpull, NDR_SCALARS, &comp_chunk_size)); NDR_CHECK(ndr_pull_advance(ndrpull, comp_chunk_size)); - comp_chunk.length = comp_chunk_size; + comp_chunk.length = comp_chunk_size + 8; comp_chunk.data = ndrpull->data + comp_chunk_offset; DEBUG(10,("XPRESS plain_chunk_size: %08X (%u) comp_chunk_size: %08X (%u)\n",
svn commit: samba r10871 - in branches/SAMBA_4_0/source/torture/rpc: .
Author: metze Date: 2005-10-10 12:31:05 + (Mon, 10 Oct 2005) New Revision: 10871 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10871 Log: make xpress compression choosable, by --option="dssync:xpress=yes", default is to not use it, as it's currently not supported metze Modified: branches/SAMBA_4_0/source/torture/rpc/dssync.c Changeset: Modified: branches/SAMBA_4_0/source/torture/rpc/dssync.c === --- branches/SAMBA_4_0/source/torture/rpc/dssync.c 2005-10-10 12:14:29 UTC (rev 10870) +++ branches/SAMBA_4_0/source/torture/rpc/dssync.c 2005-10-10 12:31:05 UTC (rev 10871) @@ -111,9 +111,37 @@ our_bind_info = &ctx->new_dc.drsuapi.our_bind_info; our_bind_info->length = 28; - our_bind_info->info.info28.supported_extensions = 0x1b7f; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_BASE; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2; our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6; our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7; + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT; + if (lp_parm_bool(-1,"dssync","xpress",False)) { + our_bind_info->info.info28.supported_extensions |= DRSUAPI_SUPPORTED_EXTENSION_XPRESS_COMPRESS; + } our_bind_info->info.info28.site_guid= GUID_zero(); our_bind_info->info.info28.u1 = 508; our_bind_info->info.info28.repl_epoch = 0;
svn commit: samba r10870 - in branches/SAMBA_4_0/source/librpc/idl: .
Author: metze Date: 2005-10-10 12:14:29 + (Mon, 10 Oct 2005) New Revision: 10870 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10870 Log: decompress DsGetNCChangesCtr7 replies, that uses type 2 (MSZIP) compression metze Modified: branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl Changeset: Modified: branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl === --- branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl2005-10-10 12:10:10 UTC (rev 10869) +++ branches/SAMBA_4_0/source/librpc/idl/drsuapi.idl2005-10-10 12:14:29 UTC (rev 10870) @@ -598,22 +598,6 @@ } drsuapi_DsGetNCChangesCtr1; typedef struct { - uint32 decompressed_length; - uint32 compressed_length; - [subcontext(4),subcontext_size(r->compressed_length),compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length)] drsuapi_DsGetNCChangesCtr1 *ctr1; - } drsuapi_DsGetNCChangesCompressedInfo; - - typedef struct { - uint32 decompressed_length; - uint32 compressed_length; - [subcontext(4),subcontext_size(r->compressed_length),flag(NDR_REMAINING)] DATA_BLOB *decompressed; - } drsuapi_DsGetNCChangesCompressedInfo_Test; - - typedef struct { - drsuapi_DsGetNCChangesCompressedInfo info; - } drsuapi_DsGetNCChangesCtr2; - - typedef struct { drsuapi_DsReplicaObjectIdentifier *dn; drsuapi_DsAttributeId attid; /* this dn_string, depends on the attid, maybe could be another @@ -646,9 +630,63 @@ } drsuapi_DsGetNCChangesCtr6; typedef struct { - uint32 unknown1; - uint16 unknown2; /* enum */ - drsuapi_DsGetNCChangesCompressedInfo_Test info; + uint32 decompressed_length; + uint32 compressed_length; + [subcontext(4),subcontext_size(r->compressed_length), + compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length)] +drsuapi_DsGetNCChangesCtr1 *ctr1; + } drsuapi_DsGetNCChangesMSZIPCtr1; + + typedef struct { + uint32 decompressed_length; + uint32 compressed_length; + [subcontext(4),subcontext_size(r->compressed_length), + compression(NDR_COMPRESSION_MSZIP,compressed_length,decompressed_length)] +drsuapi_DsGetNCChangesCtr6 *ctr6; + } drsuapi_DsGetNCChangesMSZIPCtr6; + + typedef struct { + uint32 decompressed_length; + uint32 compressed_length; + [subcontext(4),subcontext_size(r->compressed_length), + compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length), +flag(NDR_REMAINING)] DATA_BLOB *decompressed; + } drsuapi_DsGetNCChangesXPRESSCtr1; + + typedef struct { + uint32 decompressed_length; + uint32 compressed_length; + [subcontext(4),subcontext_size(r->compressed_length), + compression(NDR_COMPRESSION_XPRESS,compressed_length,decompressed_length), +flag(NDR_REMAINING)] DATA_BLOB *decompressed; + } drsuapi_DsGetNCChangesXPRESSCtr6; + + typedef [enum16bit] enum { + DRSUAPI_COMPRESSION_TYPE_MSZIP = 2, + DRSUAPI_COMPRESSION_TYPE_XPRESS = 3 + } drsuapi_DsGetNCChangesCompressionType; + + typedef [nodiscriminant,flag(NDR_PAHEX)] union { + [case(1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))] drsuapi_DsGetNCChangesMSZIPCtr1 mszip1; + [case(6|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))] drsuapi_DsGetNCChangesMSZIPCtr6 mszip6; + [case(1|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16))] drsuapi_DsGetNCChangesXPRESSCtr1 xpress1; + [case(6|(DRSUAPI_COMPRESSION_TYPE_XPRESS<<16))] drsuapi_DsGetNCChangesXPRESSCtr6 xpress6; + } drsuapi_DsGetNCChangesCompressedCtr; + + typedef struct { + /* +* this is a bit ugly, as the compression depends on the flags +* in the DsBind(), but only w2k uses DsGetNCChangesReq5 +* and will get DsGetNCChangesCtr2 replies, and w2k only knowns +* about MSZIP and level 1 replies +*/ + [switch_is(1|(DRSUAPI_COMPRESSION_TYPE_MSZIP<<16))] drsuapi_DsGetNCChangesCompressedCtr ctr; + } drsuapi_DsGetNCChangesCtr2; + + typedef struct { + [range(0,6)] int32 level; + [range(2,3)] drsuapi_DsGetNCChangesCompressionType type; + [switch_is(level | (type<<16))] drsuapi_DsGetNCChangesCompressedCtr ctr; } drsuapi_DsGetNCChangesCtr7; typedef [switch_type(int32)] union {
svn commit: samba r10869 - in branches/SAMBA_4_0/source/librpc/ndr: .
Author: metze Date: 2005-10-10 12:10:10 + (Mon, 10 Oct 2005) New Revision: 10869 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10869 Log: add dummy functions and dummy parsing of XPRESS decompression, this is the compression algorithm used by w2k3 for DsGetNCChanges(). This algorithm isn't known yet, but it seems to be some sort of Lempel-Ziv algorithm. metze Modified: branches/SAMBA_4_0/source/librpc/ndr/libndr.h branches/SAMBA_4_0/source/librpc/ndr/ndr_compression.c Changeset: Modified: branches/SAMBA_4_0/source/librpc/ndr/libndr.h === --- branches/SAMBA_4_0/source/librpc/ndr/libndr.h 2005-10-10 11:47:23 UTC (rev 10868) +++ branches/SAMBA_4_0/source/librpc/ndr/libndr.h 2005-10-10 12:10:10 UTC (rev 10869) @@ -170,7 +170,8 @@ }; enum ndr_compression_alg { - NDR_COMPRESSION_MSZIP + NDR_COMPRESSION_MSZIP = 2, + NDR_COMPRESSION_XPRESS = 3 }; /* Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_compression.c === --- branches/SAMBA_4_0/source/librpc/ndr/ndr_compression.c 2005-10-10 11:47:23 UTC (rev 10868) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr_compression.c 2005-10-10 12:10:10 UTC (rev 10869) @@ -37,13 +37,13 @@ NDR_CHECK(ndr_pull_uint32(ndrpull, NDR_SCALARS, &plain_chunk_size)); if (plain_chunk_size > 0x8000) { - return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION, "Bad ZLIB plain chunk size %08X > 0x8000 (PULL)", + return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION, "Bad MSZIP plain chunk size %08X > 0x8000 (PULL)", plain_chunk_size); } NDR_CHECK(ndr_pull_uint32(ndrpull, NDR_SCALARS, &comp_chunk_size)); - DEBUG(10,("plain_chunk_size: %08X (%u) comp_chunk_size: %08X (%u)\n", + DEBUG(10,("MSZIP plain_chunk_size: %08X (%u) comp_chunk_size: %08X (%u)\n", plain_chunk_size, plain_chunk_size, comp_chunk_size, comp_chunk_size)); comp_chunk_offset = ndrpull->offset; @@ -58,7 +58,7 @@ ret = ZIPdecompress(decomp_state, &comp_chunk, &plain_chunk); if (ret != DECR_OK) { - return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION, "Bad ZIBdecompress() error %d (PULL)", + return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION, "Bad ZIPdecompress() error %d (PULL)", ret); } @@ -98,7 +98,7 @@ uncompressed = ndr_push_blob(ndrpush); if (uncompressed.length != decompressed_len) { - return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad uncompressed_len [%u] != [%d] (PULL)", + return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad MSZIP uncompressed_len [%u] != [%d] (PULL)", (int)uncompressed.length, (int)decompressed_len); } @@ -120,7 +120,7 @@ /* TODO: check the first 4 bytes of the header */ if (payload_header[1] != 0x) { - return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad payload_header[1] [0x%08X] != [0x] (PULL)", + return ndr_pull_error(subndr, NDR_ERR_COMPRESSION, "Bad MSZIP payload_header[1] [0x%08X] != [0x] (PULL)", payload_header[1]); } @@ -137,11 +137,85 @@ } static NTSTATUS ndr_push_compression_mszip(struct ndr_push *subndr, - struct ndr_push *comndr) + struct ndr_push *comndr) { - return ndr_push_error(subndr, NDR_ERR_COMPRESSION, "Bad MSZIP compression is not supported yet (PUSH)"); + return ndr_push_error(subndr, NDR_ERR_COMPRESSION, "Sorry MSZIP compression is not supported yet (PUSH)"); } +static NTSTATUS ndr_pull_compression_xpress_chunk(struct ndr_pull *ndrpull, + struct ndr_push *ndrpush) +{ + DATA_BLOB comp_chunk; + uint32_t comp_chunk_offset; + uint32_t comp_chunk_size; + uint32_t plain_chunk_size; + + comp_chunk_offset = ndrpull->offset; + + NDR_CHECK(ndr_pull_uint32(ndrpull, NDR_SCALARS, &plain_chunk_size)); + if (plain_chunk_size > 0x0001) { + return ndr_pull_error(ndrpull, NDR_ERR_COMPRESSION, "Bad XPRESS plain chunk size %08X > 0x0001 (PULL)", + plain_chunk_size); + } + + NDR_CHECK(ndr_pull_uint32(ndrpull, NDR_SCALARS, &comp_chunk_size)); + + NDR_CHECK(ndr_pull_advance(ndrpull, comp_chunk_size)); + comp_chunk.length = comp_chunk_size; + comp_chunk.data = ndrpull->data + comp_chunk_offset; + + DEBUG(10,("XPRESS plain_chunk_size: %08X (%u) comp_chunk_size: %08X (%u)\n", + plain_chunk_size, plain_chunk_size, c
svn commit: samba r10868 - in branches/SAMBA_4_0/source: librpc/ndr pidl/lib/Parse/Pidl/Samba/NDR
Author: metze Date: 2005-10-10 11:47:23 + (Mon, 10 Oct 2005) New Revision: 10868 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10868 Log: make flag(NDR_PAHEX) possible to use and show the union level in hex metze Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/NDR/Parser.pm Changeset: Modified: branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c === --- branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c2005-10-10 11:21:02 UTC (rev 10867) +++ branches/SAMBA_4_0/source/librpc/ndr/ndr_basic.c2005-10-10 11:47:23 UTC (rev 10868) @@ -711,7 +711,11 @@ void ndr_print_union(struct ndr_print *ndr, const char *name, int level, const char *type) { - ndr->print(ndr, "%-25s: union %s(case %d)", name, type, level); + if (ndr->flags & LIBNDR_PRINT_ARRAY_HEX) { + ndr->print(ndr, "%-25s: union %s(case 0x%X)", name, type, level); + } else { + ndr->print(ndr, "%-25s: union %s(case %d)", name, type, level); + } } void ndr_print_bad_level(struct ndr_print *ndr, const char *name, uint16_t level) Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/NDR/Parser.pm === --- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/NDR/Parser.pm 2005-10-10 11:21:02 UTC (rev 10867) +++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/NDR/Parser.pm 2005-10-10 11:47:23 UTC (rev 10868) @@ -1624,15 +1624,17 @@ my ($e,$name) = @_; my $have_default = 0; - pidl "int level = ndr_print_get_switch_value(ndr, r);"; - + pidl "int level;"; foreach my $el (@{$e->{ELEMENTS}}) { DeclareArrayVariables($el); } - pidl "ndr_print_union(ndr, name, level, \"$name\");"; start_flags($e); + pidl "level = ndr_print_get_switch_value(ndr, r);"; + + pidl "ndr_print_union(ndr, name, level, \"$name\");"; + pidl "switch (level) {"; indent; foreach my $el (@{$e->{ELEMENTS}}) {
svn commit: samba r10867 - in branches/SAMBA_4_0/source: include libcli/util
Author: metze Date: 2005-10-10 11:21:02 + (Mon, 10 Oct 2005) New Revision: 10867 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10867 Log: add WERR_UNKNOWN_REVISION errorcode metze Modified: branches/SAMBA_4_0/source/include/doserr.h branches/SAMBA_4_0/source/libcli/util/doserr.c Changeset: Modified: branches/SAMBA_4_0/source/include/doserr.h === --- branches/SAMBA_4_0/source/include/doserr.h 2005-10-10 09:35:15 UTC (rev 10866) +++ branches/SAMBA_4_0/source/include/doserr.h 2005-10-10 11:21:02 UTC (rev 10867) @@ -188,6 +188,7 @@ #define WERR_MORE_DATA W_ERROR(234) #define WERR_CAN_NOT_COMPLETE W_ERROR(1003) #define WERR_INVALID_DOMAINNAME W_ERROR(1212) +#define WERR_UNKNOWN_REVISION W_ERROR(1305) #define WERR_REVISION_MISMATCH W_ERROR(1306) #define WERR_INVALID_OWNER W_ERROR(1307) #define WERR_NO_SUCH_USER W_ERROR(1317) Modified: branches/SAMBA_4_0/source/libcli/util/doserr.c === --- branches/SAMBA_4_0/source/libcli/util/doserr.c 2005-10-10 09:35:15 UTC (rev 10866) +++ branches/SAMBA_4_0/source/libcli/util/doserr.c 2005-10-10 11:21:02 UTC (rev 10867) @@ -69,6 +69,7 @@ { "WERR_DFS_INTERNAL_ERROR", WERR_DFS_INTERNAL_ERROR }, { "WERR_DFS_CANT_CREATE_JUNCT", WERR_DFS_CANT_CREATE_JUNCT }, { "WERR_INVALID_SECURITY_DESCRIPTOR", WERR_INVALID_SECURITY_DESCRIPTOR }, + { "WERR_UNKNOWN_REVISION", WERR_UNKNOWN_REVISION }, { "WERR_REVISION_MISMATCH", WERR_REVISION_MISMATCH }, { "WERR_INVALID_OWNER", WERR_INVALID_OWNER }, { "WERR_INVALID_DOMAINNAME", WERR_INVALID_DOMAINNAME },
svn commit: samba r10866 - in branches/SOC/SAMBA_4_0: .
Author: metze Date: 2005-10-10 09:35:15 + (Mon, 10 Oct 2005) New Revision: 10866 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10866 Log: [EMAIL PROTECTED] (orig r10865): metze | 2005-10-10 11:33:06 +0200 merge branches/SOC/SAMBA_4_0 into main the main SAMBA_4_0 tree metze [EMAIL PROTECTED]: metze | 2005-06-30 13:44:23 +0200 create the SAMBA_4_0 branch for the Summer Of Code Project metze [EMAIL PROTECTED]: brad | 2005-07-24 03:09:48 +0200 Branching Samba 4 [EMAIL PROTECTED]: brad | 2005-07-24 06:39:00 +0200 added 'make installmisc' to howto.txt added existing 'compression' option to level8 drsuapi torture test added new 'neighbour_writeable' option to level8 drsuapi torture test [EMAIL PROTECTED]: brad | 2005-07-24 06:42:38 +0200 added metze's dssync patch as source/torture/rpc/dssync.c [EMAIL PROTECTED]: brad | 2005-07-25 00:24:46 +0200 added a test called RPC-DSSYNC to config.mk hacking at dssync.c in an attempt to make it compile [EMAIL PROTECTED]: brad | 2005-07-25 15:19:21 +0200 Changing dssync.c to use ldb routines for accessing ldap rather than raw ldap calls. [EMAIL PROTECTED]: brad | 2005-07-26 03:35:38 +0200 more ldb changes to test_CompleteJoin(), it mostly kind of almost works now! [EMAIL PROTECTED]: brad | 2005-07-26 03:56:00 +0200 Trying to fix the crazy nesting in the branch [EMAIL PROTECTED]: brad | 2005-07-26 04:48:29 +0200 merging latest changes [EMAIL PROTECTED]: brad | 2005-07-26 04:53:43 +0200 removing nested branch [EMAIL PROTECTED]: jerry | 2005-07-27 05:04:57 +0200 merging on of Brad missing changes from the nested 4.0 branch debacle [EMAIL PROTECTED]: jerry | 2005-07-27 05:14:42 +0200 syncing up with the main 4_0 branch for Brad [EMAIL PROTECTED]: brad | 2005-07-29 00:26:30 +0200 merging changes from branches/SAMBA_4_0 [EMAIL PROTECTED]: brad | 2005-07-29 21:07:57 +0200 Bringing my tree up to date [EMAIL PROTECTED]: brad | 2005-07-30 00:48:04 +0200 making dssync.c more ldb-centric, reverted samlogon.c from rev. 8845 to get my branch to compile again. [EMAIL PROTECTED]: brad | 2005-07-30 03:20:33 +0200 I think I have the ldb code down in test_CompleteJoin (not complete yet though) [EMAIL PROTECTED]: brad | 2005-07-30 07:08:13 +0200 Changed comments to C style /**/ (thanks Richard), some more changes to test_CompleteJoin(). [EMAIL PROTECTED]: brad | 2005-07-31 04:45:32 +0200 Bringing the SOC/SAMBA_4_0 branch up to date. [EMAIL PROTECTED]: brad | 2005-07-31 20:00:41 +0200 Updated some missing files from the branch [EMAIL PROTECTED]: brad | 2005-07-31 20:25:50 +0200 Removing autogenerated files from branch [EMAIL PROTECTED]: brad | 2005-07-31 20:43:58 +0200 last of the unneeded files in SOC/SAMBA_4_0 [EMAIL PROTECTED]: brad | 2005-08-03 18:51:23 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-03 10:44:30 -0600 [EMAIL PROTECTED]: j0j0 | 2005-08-02 22:54:13 -0600 creating a local branch of branches/SAMBA_4_0 [EMAIL PROTECTED]: brad | 2005-08-03 20:57:48 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-03 13:00:11 -0600 Fixing differences between this branch and /branches/SAMBA_4_0 [EMAIL PROTECTED]: brad | 2005-08-03 21:18:05 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-03 13:23:12 -0600 Updating config.mk so that smbtorture builds again [EMAIL PROTECTED]: brad | 2005-08-04 18:17:36 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-03 21:01:02 -0600 Start using libnet_Join() for DC join. [EMAIL PROTECTED]: brad | 2005-08-04 18:17:47 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-04 10:21:34 -0600 Some more work towards performing a dc join. [EMAIL PROTECTED]: brad | 2005-08-04 18:53:51 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-04 10:53:00 -0600 Fixed a bug (passing a TALLOC_CTX to libnet_context_init() ) [EMAIL PROTECTED]: brad | 2005-08-04 21:59:55 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-04 14:04:55 -0600 Some more work on the domain join [EMAIL PROTECTED]: brad | 2005-08-05 16:50:26 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-05 08:55:58 -0600 Committing minor changes before merge [EMAIL PROTECTED]: brad | 2005-08-07 17:25:25 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-07 09:30:12 -0600 Reworked libnet_join to use two join levels, AUTOMATIC and SPECIFIED. [EMAIL PROTECTED]: brad | 2005-08-07 17:25:36 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-07 09:31:22 -0600 Working with libnet_Join(), code cleanup needed in the near future. [EMAIL PROTECTED]: brad | 2005-08-07 21:40:22 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-07 13:46:09 -0600 Some code cleanup to make things a little more readable. [EMAIL PROTECTED]: brad | 2005-08-12 01:31:48 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-11 17:38:44 -0600 Split libnet_JoinDomain() into libnet_JoinDomain() and libnet_JoinADSDomain(). [EMAIL PROTECTED]: brad
svn commit: samba r10865 - in branches/SAMBA_4_0: . source/torture source/torture/rpc
Author: metze Date: 2005-10-10 09:33:06 + (Mon, 10 Oct 2005) New Revision: 10865 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10865 Log: merge branches/SOC/SAMBA_4_0 into main the main SAMBA_4_0 tree metze [EMAIL PROTECTED]: metze | 2005-06-30 13:44:23 +0200 create the SAMBA_4_0 branch for the Summer Of Code Project metze [EMAIL PROTECTED]: brad | 2005-07-24 03:09:48 +0200 Branching Samba 4 [EMAIL PROTECTED]: brad | 2005-07-24 06:39:00 +0200 added 'make installmisc' to howto.txt added existing 'compression' option to level8 drsuapi torture test added new 'neighbour_writeable' option to level8 drsuapi torture test [EMAIL PROTECTED]: brad | 2005-07-24 06:42:38 +0200 added metze's dssync patch as source/torture/rpc/dssync.c [EMAIL PROTECTED]: brad | 2005-07-25 00:24:46 +0200 added a test called RPC-DSSYNC to config.mk hacking at dssync.c in an attempt to make it compile [EMAIL PROTECTED]: brad | 2005-07-25 15:19:21 +0200 Changing dssync.c to use ldb routines for accessing ldap rather than raw ldap calls. [EMAIL PROTECTED]: brad | 2005-07-26 03:35:38 +0200 more ldb changes to test_CompleteJoin(), it mostly kind of almost works now! [EMAIL PROTECTED]: brad | 2005-07-26 03:56:00 +0200 Trying to fix the crazy nesting in the branch [EMAIL PROTECTED]: brad | 2005-07-26 04:48:29 +0200 merging latest changes [EMAIL PROTECTED]: brad | 2005-07-26 04:53:43 +0200 removing nested branch [EMAIL PROTECTED]: jerry | 2005-07-27 05:04:57 +0200 merging on of Brad missing changes from the nested 4.0 branch debacle [EMAIL PROTECTED]: jerry | 2005-07-27 05:14:42 +0200 syncing up with the main 4_0 branch for Brad [EMAIL PROTECTED]: brad | 2005-07-29 00:26:30 +0200 merging changes from branches/SAMBA_4_0 [EMAIL PROTECTED]: brad | 2005-07-29 21:07:57 +0200 Bringing my tree up to date [EMAIL PROTECTED]: brad | 2005-07-30 00:48:04 +0200 making dssync.c more ldb-centric, reverted samlogon.c from rev. 8845 to get my branch to compile again. [EMAIL PROTECTED]: brad | 2005-07-30 03:20:33 +0200 I think I have the ldb code down in test_CompleteJoin (not complete yet though) [EMAIL PROTECTED]: brad | 2005-07-30 07:08:13 +0200 Changed comments to C style /**/ (thanks Richard), some more changes to test_CompleteJoin(). [EMAIL PROTECTED]: brad | 2005-07-31 04:45:32 +0200 Bringing the SOC/SAMBA_4_0 branch up to date. [EMAIL PROTECTED]: brad | 2005-07-31 20:00:41 +0200 Updated some missing files from the branch [EMAIL PROTECTED]: brad | 2005-07-31 20:25:50 +0200 Removing autogenerated files from branch [EMAIL PROTECTED]: brad | 2005-07-31 20:43:58 +0200 last of the unneeded files in SOC/SAMBA_4_0 [EMAIL PROTECTED]: brad | 2005-08-03 18:51:23 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-03 10:44:30 -0600 [EMAIL PROTECTED]: j0j0 | 2005-08-02 22:54:13 -0600 creating a local branch of branches/SAMBA_4_0 [EMAIL PROTECTED]: brad | 2005-08-03 20:57:48 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-03 13:00:11 -0600 Fixing differences between this branch and /branches/SAMBA_4_0 [EMAIL PROTECTED]: brad | 2005-08-03 21:18:05 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-03 13:23:12 -0600 Updating config.mk so that smbtorture builds again [EMAIL PROTECTED]: brad | 2005-08-04 18:17:36 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-03 21:01:02 -0600 Start using libnet_Join() for DC join. [EMAIL PROTECTED]: brad | 2005-08-04 18:17:47 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-04 10:21:34 -0600 Some more work towards performing a dc join. [EMAIL PROTECTED]: brad | 2005-08-04 18:53:51 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-04 10:53:00 -0600 Fixed a bug (passing a TALLOC_CTX to libnet_context_init() ) [EMAIL PROTECTED]: brad | 2005-08-04 21:59:55 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-04 14:04:55 -0600 Some more work on the domain join [EMAIL PROTECTED]: brad | 2005-08-05 16:50:26 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-05 08:55:58 -0600 Committing minor changes before merge [EMAIL PROTECTED]: brad | 2005-08-07 17:25:25 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-07 09:30:12 -0600 Reworked libnet_join to use two join levels, AUTOMATIC and SPECIFIED. [EMAIL PROTECTED]: brad | 2005-08-07 17:25:36 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-07 09:31:22 -0600 Working with libnet_Join(), code cleanup needed in the near future. [EMAIL PROTECTED]: brad | 2005-08-07 21:40:22 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-07 13:46:09 -0600 Some code cleanup to make things a little more readable. [EMAIL PROTECTED]: brad | 2005-08-12 01:31:48 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-11 17:38:44 -0600 Split libnet_JoinDomain() into libnet_JoinDomain() and libnet_JoinADSDomain(). [EMAIL PROTECTED]: brad | 2005-08-12 04:55:11 +0200 [EMAIL PROTECTED]: j0j0 | 2005-08-11 21:02:27 -0600 Clean up libnet_JoinADSDomain() a little, added a comment to the test_join struct. [EMAIL
svn commit: samba r10864 - in branches/SOC/SAMBA_4_0: .
Author: metze Date: 2005-10-10 09:10:08 + (Mon, 10 Oct 2005) New Revision: 10864 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10864 Log: remove README file to reduce, diffs to main SAMBA_4_0 branch: metze README: This project was centered around adding a torture test to Samba 4, which used drsuapi_DsGetNCChanges() to retrieve the contents of an Active Directory in the same manner as an Active Directory DC replication event. As the project unfolded, I also applied some changes to the functionality of the libnet library related to joining a machine account to a domain. One of the first things that I implemented in this project was a 'neighbour_writeable' option for the RPC-DRSUAPI torture test. The command line to execute this torture test is as follows: smbtorture --option=drsuapi:neighbour_writeable=True -W -U % ncacn_ip_tcp: RPC-DRSUAPI This option provides us with runtime control over the DRSUAPI_DS_REPLICA_NEIGHBOUR_WRITEABLE flag in the struct drsuapi_DsGetNCChanges.in.req.req.replica_flags, allowing us to easily test for differences in the behaviour of AD replication with the switch on or off. In the course of the project, I also implemented two more flags for the RPC-DSSYNC test. dssync:last_usn takes an integer representing the USN (Universal Serial Number) of the last recieved replication update for a particular partition (uses the domain DN if drsuapi:parition isn't set). That value is passed in the DsGetNCChanges() call so that only info which has been updated since that point in time is returned. If this option is not set, 0 is used by default, and all updates for that partition are returned. dssync:partition takes a string DN and uses that as the name of the AD partition to replicate. Based initially on a patch provided to me by one of my mentors, Stephan (metze) Metzmacher, the RPC-DSSYNC test was implemented for this project. Initially functionality was included to perform a DC join prior to initiating replication, but the code was removed when it was realized that replication could indeed take place without being a member of the domain in any way. It has been recently suggested that we may need a DC join after all to get all of the information we may want from the AD replication. This is probably best added using a torture_join_domain() call once the libnet code is able to keep the user policy handle and SAMR RPC pipe open. The DC join code was taken out of the RPC-DSSYNC and implemented for the most part in the libnet libraries. To test this, the RPC-NETLOGON test was modified to perform a domain join, leave and rejoin. Currently, the test has a fault in that it is unable to leave the domain using the same SAMR RPC pipe and user_policy information as was used for the first join. This is because I was unable to get the code working properly in libnet to provide that functionality. Currently missing from the DC join in libnet is the code to create the CN=NTDS Settings,CN=,CN=,CN=Sites,CN=Configuration, container using the dcerpc_drsuapi_DsAddEntry() call. I did not want to implement this functionality in libnet while there were still problems with the code. I also provided the ability in libnet and the RPC-DSSYNC test to look up the proper site name using the cldap library. In my investigations, I was unable to find out any information regarding the UnicodePwd attribute, except that the same password is represented differently for two different users in the same directory. I was also able to resolve and confirm the meaning of some DRSUAPI_ATTRIBUTE ID's. DRSUAPI_OBJECTCLASS_domain (0xA0042) DRSUAPI_OBJECTCLASS_domainDNS (0xA0043) wellKnownObjects(0x9026A) fSMORoleOwner (0x90171) name or dc (0x90001) whenCreated (0x20002) instanceType(0x20001) gPLink (0x9037B) These were added to the IDL for drsuapi (source/librpc/idl/drsuapi.idl). I would like to thank everyone on the Samba team who worked with me and assisted me with this project, specifically all the work done by Stephan Metzmacher, Andrew Bartlett and Jerry Carter. Working on this project with the Samba team really has been a life changing experience, as corny as that sounds. I've realized that I was born to be a systems developer, and it has helped confirm in my mind that Open Source (specifically Samba) development is exactly what i've been missing! I would also like to take this opportunity to thank Chris Dibona and Google for the amazing opportunity. I don't know if I would have taken the leap in other circumstances. I know these notes sound a little rushed, but it is 23:55 after all! :) Removed: branches/SOC/SAMBA_4_0/README Changeset: Deleted: branches/SOC/SAMBA_4_0/README
svn commit: samba r10863 - in branches/SOC/SAMBA_4_0/source/torture: . rpc
Author: metze Date: 2005-10-10 08:34:26 + (Mon, 10 Oct 2005) New Revision: 10863 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10863 Log: fix the build metze Modified: branches/SOC/SAMBA_4_0/source/torture/config.mk branches/SOC/SAMBA_4_0/source/torture/rpc/dssync.c Changeset: Modified: branches/SOC/SAMBA_4_0/source/torture/config.mk === --- branches/SOC/SAMBA_4_0/source/torture/config.mk 2005-10-10 08:31:52 UTC (rev 10862) +++ branches/SOC/SAMBA_4_0/source/torture/config.mk 2005-10-10 08:34:26 UTC (rev 10863) @@ -79,6 +79,7 @@ torture/rpc/dfs.o \ torture/rpc/drsuapi.o \ torture/rpc/drsuapi_cracknames.o \ + torture/rpc/dssync.o \ torture/rpc/spoolss.o \ torture/rpc/unixinfo.o \ torture/rpc/samr.o \ Modified: branches/SOC/SAMBA_4_0/source/torture/rpc/dssync.c === --- branches/SOC/SAMBA_4_0/source/torture/rpc/dssync.c 2005-10-10 08:31:52 UTC (rev 10862) +++ branches/SOC/SAMBA_4_0/source/torture/rpc/dssync.c 2005-10-10 08:34:26 UTC (rev 10863) @@ -129,7 +129,7 @@ return ctx; } -static BOOL test_DsBind(struct DsSyncTest *ctx,struct cli_credentials *credentials, struct DsSyncBindInfo *b) +static BOOL _test_DsBind(struct DsSyncTest *ctx, struct cli_credentials *credentials, struct DsSyncBindInfo *b) { NTSTATUS status; BOOL ret = True; @@ -400,10 +400,10 @@ mem_ctx = talloc_init("torture_rpc_dssync"); ctx = test_create_context(mem_ctx); - ret &= test_DsBind(ctx, ctx->admin.credentials, &ctx->admin.drsuapi); + ret &= _test_DsBind(ctx, ctx->admin.credentials, &ctx->admin.drsuapi); ret &= test_LDAPBind(ctx, ctx->admin.credentials, &ctx->admin.ldap); ret &= test_GetInfo(ctx); - ret &= test_DsBind(ctx, ctx->admin.credentials, &ctx->new_dc.drsuapi); + ret &= _test_DsBind(ctx, ctx->admin.credentials, &ctx->new_dc.drsuapi); ret &= test_FetchData(ctx); return ret;
svn commit: samba r10862 - in branches/SOC/SAMBA_4_0/source: libnet librpc/idl torture torture/rpc
Author: metze Date: 2005-10-10 08:31:52 + (Mon, 10 Oct 2005) New Revision: 10862 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10862 Log: remove the differences between SAMBA_4_0 and SOC/SAMBA_4_0 metze Modified: branches/SOC/SAMBA_4_0/source/libnet/libnet_join.c branches/SOC/SAMBA_4_0/source/librpc/idl/drsuapi.idl branches/SOC/SAMBA_4_0/source/torture/rpc/testjoin.c branches/SOC/SAMBA_4_0/source/torture/torture.c Changeset: Modified: branches/SOC/SAMBA_4_0/source/libnet/libnet_join.c === --- branches/SOC/SAMBA_4_0/source/libnet/libnet_join.c 2005-10-10 07:45:58 UTC (rev 10861) +++ branches/SOC/SAMBA_4_0/source/libnet/libnet_join.c 2005-10-10 08:31:52 UTC (rev 10862) @@ -757,7 +757,7 @@ sc.out.connect_handle = &p_handle; /* 2. do a samr_Connect to get a policy handle */ - status = dcerpc_samr_Connect(samr_pipe, tmp_ctx, &sc); + status = dcerpc_samr_Connect(samr_pipe, tmp_ctx, &sc); if (!NT_STATUS_IS_OK(status)) { r->out.error_string = talloc_asprintf(mem_ctx, "samr_Connect failed: %s", @@ -945,22 +945,6 @@ return status; } } - /* -This code still has an issue in that it isn't storing the samr_pipe and the u_handle in mem_ctx, -and so they aren't staying open once this function returns. -Because of this, the RPC-NETLOGON torture test fails when trying to use the pipe and handle to leave -the domain. - -Because they are local variables and not in a TALLOC_CTX, I can't talloc_steal() them. - */ - r->out.join_password = talloc_steal(mem_ctx, password_str); - r->out.domain_sid = talloc_steal(mem_ctx, domain_sid); - r->out.domain_name = talloc_steal(mem_ctx, domain_name); - r->out.realm = talloc_steal(mem_ctx, realm); - r->out.samr_pipe = samr_pipe; - r->out.samr_binding = talloc_steal(mem_ctx, samr_binding); - r->out.user_handle = u_handle; - r->out.error_string = talloc_steal(mem_ctx, r2.samr_handle.out.error_string); account_sid = dom_sid_add_rid(mem_ctx, domain_sid, rid); if (!account_sid) { @@ -1009,8 +993,6 @@ return cu_status; } - - static NTSTATUS libnet_Join_primary_domain(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, struct libnet_Join *r) @@ -1128,7 +1110,6 @@ talloc_free(tmp_mem); return NT_STATUS_NO_MEMORY; } - if (!msg) goto no_mem; msg->dn = ldb_dn_build_child(tmp_mem, "flatname", r2->out.domain_name, base_dn); if (!msg->dn) { @@ -1288,10 +1269,6 @@ talloc_steal(mem_ctx, r2->out.domain_sid); talloc_free(tmp_mem); return NT_STATUS_OK; -no_mem: - r->out.error_string = NULL; - talloc_free(tmp_mem); - return NT_STATUS_NO_MEMORY; } NTSTATUS libnet_Join(struct libnet_context *ctx, TALLOC_CTX *mem_ctx, struct libnet_Join *r) Modified: branches/SOC/SAMBA_4_0/source/librpc/idl/drsuapi.idl === --- branches/SOC/SAMBA_4_0/source/librpc/idl/drsuapi.idl2005-10-10 07:45:58 UTC (rev 10861) +++ branches/SOC/SAMBA_4_0/source/librpc/idl/drsuapi.idl2005-10-10 08:31:52 UTC (rev 10862) @@ -371,9 +371,7 @@ */ typedef [flag(NDR_PAHEX),v1_enum] enum { - DRSUAPI_OBJECTCLASS_top = 0x0001, - DRSUAPI_OBJECTCLASS_domain = 0x000a0042, - DRSUAPI_OBJECTCLASS_domainDNS = 0x000a0043 + DRSUAPI_OBJECTCLASS_top = 0x0001 } drsuapi_DsObjectClassId; typedef [flag(NDR_PAHEX),v1_enum,public] enum { @@ -394,12 +392,7 @@ DRSUAPI_ATTRIBUTE_objectCategory= 0x0009030e, DRSUAPI_ATTRIBUTE_msDS_Behavior_Version = 0x000905b3, DRSUAPI_ATTRIBUTE_msDS_HasDomainNCs = 0x0009071c, - DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs = 0x0009072c, - DRSUAPI_ATTRIBUTE_gPLink= 0x0009037b, - DRSUAPI_ATTRIBUTE_instanceType = 0x00020001, - DRSUAPI_ATTRIBUTE_whenCreated = 0x00020002, - DRSUAPI_ATTRIBUTE_fSMORoleOwner = 0x00090171, - DRSUAPI_ATTRIBUTE_wellKnownObjects = 0x0009026a + DRSUAPI_ATTRIBUTE_msDS_hasMasterNCs = 0x0009072c } drsuapi_DsAttributeId; /* Generic DATA_BLOB values */ Modified: branches/SOC/SAMBA_4_0/source/torture/rpc/testjoin.c === --- branches/SOC/SAMBA_4_0/source/torture/rpc/testjoin.c
svn commit: samba r10861 - in branches/SOC/SAMBA_4_0: . source/include source/lib/ldb source/lib/ldb/tests source/libcli/auth source/libcli/composite source/libcli/nbt source/librpc/idl source/nsswitc
Author: metze Date: 2005-10-10 07:45:58 + (Mon, 10 Oct 2005) New Revision: 10861 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=10861 Log: [EMAIL PROTECTED] (orig r10838): vlendec | 2005-10-08 19:45:27 +0200 Get us an schannel'ed netlogon pipe. Abartlet, now I think I need some assistance to implement the pam auth & crap auth calls. Volker [EMAIL PROTECTED] (orig r10839): jelmer | 2005-10-08 19:55:28 +0200 Add some [ref] (required for ethereal and Samba3 parser generators) [EMAIL PROTECTED] (orig r10840): jelmer | 2005-10-08 19:55:56 +0200 Fix indentation [EMAIL PROTECTED] (orig r10842): jelmer | 2005-10-08 22:19:35 +0200 Fix some issues with [out] unions that have a discriminator that is only [in] [EMAIL PROTECTED] (orig r10843): vlendec | 2005-10-09 10:32:06 +0200 Reformatting [EMAIL PROTECTED] (orig r10844): abartlet | 2005-10-09 14:13:05 +0200 Add challenge-response authentication to Samba4's winbindd for VL. Plaintext should be simple, but I'm going to do some infrustructure work first. Andrew Bartlett [EMAIL PROTECTED] (orig r10845): abartlet | 2005-10-09 14:38:23 +0200 Add new function to decrypt the session keys in samlogon responses. Andrew Bartlett [EMAIL PROTECTED] (orig r10846): vlendec | 2005-10-09 14:50:35 +0200 Create a "wbsrv_domain", change wb_finddcs to the style of the rest of the async helpers. Volker [EMAIL PROTECTED] (orig r10847): abartlet | 2005-10-09 15:03:52 +0200 Fix up new 'decrypt samlogon reply' routine to be more robust, and use it in the RPC-SAMLOGON test. Andrew Bartlett [EMAIL PROTECTED] (orig r10848): jelmer | 2005-10-09 15:40:55 +0200 Fix warning [EMAIL PROTECTED] (orig r10849): jelmer | 2005-10-09 15:53:48 +0200 Fix handling of [charset] for strings with fixed or "inline" size [EMAIL PROTECTED] (orig r10852): vlendec | 2005-10-09 22:32:24 +0200 Continuation-based programming can become a bit spaghetti... Initialize a domain structure properly. Excerpt from wb_init_domain.c: /* * Initialize a domain: * * - With schannel credentials, try to open the SMB connection with the machine * creds. Fall back to anonymous. * * - If we have schannel creds, do the auth2 and open the schannel'ed netlogon * pipe. * * - Open LSA. If we have machine creds, try to open with ntlmssp. Fall back * to schannel and then to anon bind. * * - With queryinfopolicy, verify that we're talking to the right domain * * A bit complex, but with all the combinations I think it's the best we can * get. NT4, W2k3SP1 and W2k all have different combinations, but in the end we * have a signed&sealed lsa connection on all of them. * * Is this overkill? In particular the authenticated SMB connection seems a * bit overkill, given that we do schannel for netlogon and ntlmssp for * lsa later on w2k3, the others don't do this anyway. */ Thanks to Jeremy for his detective work, and to the Samba4 team for providing such a great infrastructure. Next step is to connect to SAM. Do it via LDAP if we can, fall back to samr with all we have. Volker [EMAIL PROTECTED] (orig r10853): vlendec | 2005-10-09 22:57:49 +0200 Convert wbinfo -n to properly init the domain. Volker [EMAIL PROTECTED] (orig r10854): jelmer | 2005-10-09 23:30:41 +0200 talloc_get_type() can return NULL.. [EMAIL PROTECTED] (orig r10855): abartlet | 2005-10-10 00:19:20 +0200 Put the domain SID in secrets.ldb by default, and add http as a default SPN alias. Andrew Bartlett [EMAIL PROTECTED] (orig r10856): tridge | 2005-10-10 01:29:26 +0200 we need aclocal.m4 in ldb for standalone configure [EMAIL PROTECTED] (orig r10859): vlendec | 2005-10-10 08:18:17 +0200 Make the flow a bit clearer Added: branches/SOC/SAMBA_4_0/source/lib/ldb/aclocal.m4 branches/SOC/SAMBA_4_0/source/winbind/wb_init_domain.c Modified: branches/SOC/SAMBA_4_0/ branches/SOC/SAMBA_4_0/source/include/structs.h branches/SOC/SAMBA_4_0/source/lib/ldb/tests/slapd.conf branches/SOC/SAMBA_4_0/source/libcli/auth/credentials.c branches/SOC/SAMBA_4_0/source/libcli/composite/composite.c branches/SOC/SAMBA_4_0/source/libcli/nbt/nbtname.c branches/SOC/SAMBA_4_0/source/librpc/idl/dfs.idl branches/SOC/SAMBA_4_0/source/nsswitch/winbindd_nss.h branches/SOC/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/NDR/Client.pm branches/SOC/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba/NDR/Parser.pm branches/SOC/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/Client.pm branches/SOC/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/Header.pm branches/SOC/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/Parser.pm branches/SOC/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba3/Types.pm branches/SOC/SAMBA_4_0/source/rpc_server/spoolss/dcesrv_spoolss.c branches/SOC/SAMBA_4_0/source/setup/provision.ldif branches/SOC/SAMBA_4_0/source/setup/secrets.ldif branches/SOC/SAMBA_4_0/source/tortur