[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 41bb876... s4-smbtorture: more work on test_PrinterInfo_DevMode RPC-SPOOLSS-PRINTER. via 1e59e5d... s4-smbtorture: allow to call OpenPrinterEx with devicemode. from 351f694... testprogs: add "samba3" and "architecture=" options to spoolss tester. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 41bb8767a2440d3c6db76c1547c988f4adabe5b9 Author: Günther Deschner Date: Tue Feb 16 03:28:43 2010 +0100 s4-smbtorture: more work on test_PrinterInfo_DevMode RPC-SPOOLSS-PRINTER. Guenther commit 1e59e5d8c91ed4daedac7ea80fd0daa9d946b5e4 Author: Günther Deschner Date: Tue Feb 16 03:26:10 2010 +0100 s4-smbtorture: allow to call OpenPrinterEx with devicemode. Guenther --- Summary of changes: source4/torture/rpc/spoolss.c | 104 +--- 1 files changed, 96 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 05eee62..54101e7 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -1814,13 +1814,27 @@ static bool test_devicemode_equal(struct torture_context *tctx, return true; } +static bool call_OpenPrinterEx(struct torture_context *tctx, + struct dcerpc_pipe *p, + const char *name, + struct spoolss_DeviceMode *devmode, + struct policy_handle *handle); + +static bool test_ClosePrinter(struct torture_context *tctx, + struct dcerpc_pipe *p, + struct policy_handle *handle); + static bool test_PrinterInfo_DevModes(struct torture_context *tctx, struct dcerpc_pipe *p, - struct policy_handle *handle) + struct policy_handle *handle, + const char *name) { union spoolss_PrinterInfo info; struct spoolss_DeviceMode *devmode; struct spoolss_DeviceMode *devmode2; + struct policy_handle handle_devmode; + + /* simply compare level8 and level2 devmode */ torture_assert(tctx, test_GetPrinter_level(tctx, p, handle, 8, &info), ""); @@ -1832,6 +1846,77 @@ static bool test_PrinterInfo_DevModes(struct torture_context *tctx, torture_assert(tctx, test_devicemode_equal(tctx, devmode, devmode2), ""); + + /* change formname upon open and see if it persists in getprinter calls */ + + devmode->formname = talloc_strdup(tctx, "A4"); + + torture_assert(tctx, call_OpenPrinterEx(tctx, p, name, devmode, &handle_devmode), + "failed to open printer handle"); + + torture_assert(tctx, test_GetPrinter_level(tctx, p, &handle_devmode, 8, &info), ""); + + devmode2 = info.info8.devmode; + + if (strequal(devmode->devicename, devmode2->devicename)) { + torture_fail(tctx, "devicename is the same"); + } + + if (strequal(devmode->formname, devmode2->formname)) { + torture_fail(tctx, "formname is the same"); + } + + torture_assert(tctx, test_GetPrinter_level(tctx, p, &handle_devmode, 2, &info), ""); + + devmode2 = info.info2.devmode; + + if (strequal(devmode->devicename, devmode2->devicename)) { + torture_fail(tctx, "devicename is the same"); + } + + if (strequal(devmode->formname, devmode2->formname)) { + torture_fail(tctx, "formname is the same"); + } + + test_ClosePrinter(tctx, p, &handle_devmode); + + + /* set devicemode and see if it persists */ + + devmode->copies = 93; + devmode->formname = talloc_strdup(tctx, "Legal"); + + { + struct spoolss_SetPrinterInfoCtr info_ctr; + struct spoolss_SetPrinterInfo8 info8; + struct spoolss_DevmodeContainer devmode_ctr; + struct sec_desc_buf secdesc_ctr; + + info8.devmode_ptr = 0; + + info_ctr.level = 8; + info_ctr.info.info8 = &info8; + + devmode_ctr.devmode = devmode; + + ZERO_STRUCT(secdesc_ctr); + + torture_assert(tctx, + test_SetPrinter(tctx, p, handle, &info_ctr, &devmode_ctr, &secdesc_ctr, 0), ""); + } + + torture_assert(tctx, test_GetPrinter_level(tctx, p, handle, 8, &info), ""); + + devmode2 = info.info8.devmode; + + torture_assert(tctx, test_devicemode_equal(tctx, devmode, devmode2), ""); + + torture_assert(tctx, test_GetPrinter_level(tctx, p, handle, 2, &info), ""); + + devmode2 = info.info2.devmode; + + torture_assert(tctx, te
[SCM] Samba Shared Repository - branch v3-5-test updated
The branch, v3-5-test has been updated via 3e72ded... s3/smbd: change locking behavior when "lock spin time = 0". via 53531cb... Fix error in docs. Should be milliseconds, not microseconds. (cherry picked from commit c7f16abc47a2d291d3da95b4c8e654010e36bc0f) from 3e43399... s3: by default don't use pthread pool support (cherry picked from commit 118725c892e445fcc1dc5947cb919cf99c49373f) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test - Log - commit 3e72ded677389816dd4f502792139cd8b2945f98 Author: Steven Danneman Date: Fri Feb 12 15:42:50 2010 -0800 s3/smbd: change locking behavior when "lock spin time = 0". The "lock spin time" parameter mimics the following Windows setting which by default is 250ms in Windows and 200ms in Samba. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\LockViolationDelay When a client sends repeated, non-blocking, contending BRL requests to a Windows server, after the first Windows starts treating these requests as timed blocking locks with the above timeout. As an efficiency, I've changed the behavior when this setting is 0, to skip this logic and treat all requests as non-blocking locks. This gives the smbd server behavior similar to the 3.0 release with the do_spin_lock() implementation. I've also changed the blocking lock parameter in the call from push_blocking_lock_request() to true as all requests made in this path are blocking by definition. (cherry picked from commit cb0ea273696fc9024e6da18eb3e319024f8643f5) Fix bug #7138 (Backport 'lock spin time" enhancement to 3.5.1). commit 53531cb983739391fc70b1490f29d294785fee68 Author: Jeremy Allison Date: Fri Feb 12 21:29:58 2010 -0800 Fix error in docs. Should be milliseconds, not microseconds. (cherry picked from commit c7f16abc47a2d291d3da95b4c8e654010e36bc0f) --- Summary of changes: docs-xml/smbdotconf/locking/lockspintime.xml |2 +- source3/smbd/blocking.c |2 +- source3/smbd/reply.c | 21 +++-- 3 files changed, 17 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/smbdotconf/locking/lockspintime.xml b/docs-xml/smbdotconf/locking/lockspintime.xml index da84d93..8e40877 100644 --- a/docs-xml/smbdotconf/locking/lockspintime.xml +++ b/docs-xml/smbdotconf/locking/lockspintime.xml @@ -3,7 +3,7 @@ context="G" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc";> - The time in microseconds that smbd should + The time in milliseconds that smbd should keep waiting to see if a failed lock request can be granted. This parameter has changed in default value from Samba 3.0.23 from 10 to 200. The associated diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c index deb7f8f..e33c0b6 100644 --- a/source3/smbd/blocking.c +++ b/source3/smbd/blocking.c @@ -185,7 +185,7 @@ bool push_blocking_lock_request( struct byte_range_lock *br_lck, count, lock_type == READ_LOCK ? PENDING_READ_LOCK : PENDING_WRITE_LOCK, blr->lock_flav, - lock_timeout ? True : False, /* blocking_lock. */ + True, NULL, blr); diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index b6316aa..b1a4e31 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -7120,13 +7120,22 @@ NTSTATUS smbd_do_locking(struct smb_request *req, defer_lock = true; } - /* This heuristic seems to match W2K3 very well. If a - lock sent with timeout of zero would fail with NT_STATUS_FILE_LOCK_CONFLICT - it pretends we asked for a timeout of between 150 - 300 milliseconds as - far as I can tell. Replacement for do_lock_spin(). JRA. */ + /* If a lock sent with timeout of zero would fail, and +* this lock has been requested multiple times, +* according to brl_lock_failed() we convert this +* request to a blocking lock with a timeout of between +* 150 - 300 milliseconds. +* +* If lp_lock_spin_time() has been set to 0, we skip +* this blocking retry and fail immediately. +* +* Replacement for do_lock_spin(). JRA. */ - if (br_lck && lp_blocking_locks(SNUM(conn)) && !blocking_lock && -
[SCM] Samba Shared Repository - branch v3-5-stable updated
The branch, v3-5-stable has been updated via 5541251... s3/smbd: change locking behavior when "lock spin time = 0". via 00d2c87... Fix error in docs. Should be milliseconds, not microseconds. (cherry picked from commit c7f16abc47a2d291d3da95b4c8e654010e36bc0f) (cherry picked from commit 53531cb983739391fc70b1490f29d294785fee68) from c4fbf77... s3: by default don't use pthread pool support (cherry picked from commit 118725c892e445fcc1dc5947cb919cf99c49373f) http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-stable - Log - commit 5541251d642da252d8b8129f402921a27276cc5b Author: Steven Danneman Date: Fri Feb 12 15:42:50 2010 -0800 s3/smbd: change locking behavior when "lock spin time = 0". The "lock spin time" parameter mimics the following Windows setting which by default is 250ms in Windows and 200ms in Samba. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\LockViolationDelay When a client sends repeated, non-blocking, contending BRL requests to a Windows server, after the first Windows starts treating these requests as timed blocking locks with the above timeout. As an efficiency, I've changed the behavior when this setting is 0, to skip this logic and treat all requests as non-blocking locks. This gives the smbd server behavior similar to the 3.0 release with the do_spin_lock() implementation. I've also changed the blocking lock parameter in the call from push_blocking_lock_request() to true as all requests made in this path are blocking by definition. (cherry picked from commit cb0ea273696fc9024e6da18eb3e319024f8643f5) Fix bug #7138 (Backport 'lock spin time" enhancement to 3.5.1). (cherry picked from commit 3e72ded677389816dd4f502792139cd8b2945f98) commit 00d2c875b64c31a58694f8331391b9335af0a220 Author: Jeremy Allison Date: Fri Feb 12 21:29:58 2010 -0800 Fix error in docs. Should be milliseconds, not microseconds. (cherry picked from commit c7f16abc47a2d291d3da95b4c8e654010e36bc0f) (cherry picked from commit 53531cb983739391fc70b1490f29d294785fee68) --- Summary of changes: docs-xml/smbdotconf/locking/lockspintime.xml |2 +- source3/smbd/blocking.c |2 +- source3/smbd/reply.c | 21 +++-- 3 files changed, 17 insertions(+), 8 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/smbdotconf/locking/lockspintime.xml b/docs-xml/smbdotconf/locking/lockspintime.xml index da84d93..8e40877 100644 --- a/docs-xml/smbdotconf/locking/lockspintime.xml +++ b/docs-xml/smbdotconf/locking/lockspintime.xml @@ -3,7 +3,7 @@ context="G" xmlns:samba="http://www.samba.org/samba/DTD/samba-doc";> - The time in microseconds that smbd should + The time in milliseconds that smbd should keep waiting to see if a failed lock request can be granted. This parameter has changed in default value from Samba 3.0.23 from 10 to 200. The associated diff --git a/source3/smbd/blocking.c b/source3/smbd/blocking.c index deb7f8f..e33c0b6 100644 --- a/source3/smbd/blocking.c +++ b/source3/smbd/blocking.c @@ -185,7 +185,7 @@ bool push_blocking_lock_request( struct byte_range_lock *br_lck, count, lock_type == READ_LOCK ? PENDING_READ_LOCK : PENDING_WRITE_LOCK, blr->lock_flav, - lock_timeout ? True : False, /* blocking_lock. */ + True, NULL, blr); diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index b6316aa..b1a4e31 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -7120,13 +7120,22 @@ NTSTATUS smbd_do_locking(struct smb_request *req, defer_lock = true; } - /* This heuristic seems to match W2K3 very well. If a - lock sent with timeout of zero would fail with NT_STATUS_FILE_LOCK_CONFLICT - it pretends we asked for a timeout of between 150 - 300 milliseconds as - far as I can tell. Replacement for do_lock_spin(). JRA. */ + /* If a lock sent with timeout of zero would fail, and +* this lock has been requested multiple times, +* according to brl_lock_failed() we convert this +* request to a blocking lock with a timeout of between +* 150 - 300 milliseconds. +* +* If lp_lock_spin_time() has been set to 0, we skip +* this blocking retry and fail imme
svn commit: samba-web r1367 - in trunk/DTD: .
Author: kseeger Date: 2010-02-16 02:53:28 -0700 (Tue, 16 Feb 2010) New Revision: 1367 WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba-web&rev=1367 Log: Add usecccache entity. Karolin Modified: trunk/DTD/samba.entities Changeset: Modified: trunk/DTD/samba.entities === --- trunk/DTD/samba.entities2010-02-05 21:56:08 UTC (rev 1366) +++ trunk/DTD/samba.entities2010-02-16 09:53:28 UTC (rev 1367) @@ -428,7 +428,16 @@ '> + +-C|--use-ccache + +Try to use the credentials cached by winbind. + + +'> + -h|--help @@ -439,6 +448,7 @@
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 020c8df... s4-smbtorture: fix spoolss SD test against w2k8r2. from 41bb876... s4-smbtorture: more work on test_PrinterInfo_DevMode RPC-SPOOLSS-PRINTER. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 020c8df2815b5ccf9d63ec690f329ea83d5c900f Author: Günther Deschner Date: Tue Feb 16 10:45:29 2010 +0100 s4-smbtorture: fix spoolss SD test against w2k8r2. Guenther --- Summary of changes: source4/torture/rpc/spoolss.c |4 1 files changed, 4 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index 54101e7..ec72335 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -1672,6 +1672,10 @@ static bool test_PrinterInfo_SDs(struct torture_context *tctx, torture_assert(tctx, test_GetPrinter_level(tctx, p, handle, 2, &info), ""); sd2 = info.info2.secdesc; + if (sd1->type & SEC_DESC_DACL_DEFAULTED) { + torture_comment(tctx, "removing SEC_DESC_DACL_DEFAULTED\n"); + sd1->type &= ~SEC_DESC_DACL_DEFAULTED; + } torture_assert(tctx, test_security_descriptor_equal(tctx, sd1, sd2), ""); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f6c39ce... s3-docs: Document 'smbclient -C'. from 020c8df... s4-smbtorture: fix spoolss SD test against w2k8r2. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f6c39cec27eea2522c62e6f1ff85efdafde351ac Author: Volker Lendecke Date: Tue Feb 16 11:00:08 2010 +0100 s3-docs: Document 'smbclient -C'. --- Summary of changes: docs-xml/build/DTD/samba.entities | 10 ++ docs-xml/manpages-3/smbclient.1.xml |2 ++ 2 files changed, 12 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/build/DTD/samba.entities b/docs-xml/build/DTD/samba.entities index 4ad65ca..d204156 100644 --- a/docs-xml/build/DTD/samba.entities +++ b/docs-xml/build/DTD/samba.entities @@ -428,6 +428,15 @@ an Active Directory environment. '> + +-C|--use-ccache + +Try to use the credentials cached by winbind. + + +'> + @@ -439,6 +448,7 @@ an Active Directory environment. diff --git a/docs-xml/manpages-3/smbclient.1.xml b/docs-xml/manpages-3/smbclient.1.xml index 9c3a97f..91a5928 100644 --- a/docs-xml/manpages-3/smbclient.1.xml +++ b/docs-xml/manpages-3/smbclient.1.xml @@ -30,6 +30,7 @@ -m maxprotocol -A authfile -N + -C -g -i scope -O@@ -55,6 +56,7 @@ -m maxprotocol -A authfile -N + -C -g -l log-basename -I destinationIP -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-5-test updated
The branch, v3-5-test has been updated via f6a7e9e... s3-docs: Document 'smbclient -C'. (cherry picked from commit f6c39cec27eea2522c62e6f1ff85efdafde351ac) from 3e72ded... s3/smbd: change locking behavior when "lock spin time = 0". http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test - Log - commit f6a7e9eadf85b19ec0ccca513a261bcad0bcf048 Author: Volker Lendecke Date: Tue Feb 16 11:00:08 2010 +0100 s3-docs: Document 'smbclient -C'. (cherry picked from commit f6c39cec27eea2522c62e6f1ff85efdafde351ac) --- Summary of changes: docs-xml/build/DTD/samba.entities | 10 ++ docs-xml/manpages-3/smbclient.1.xml |2 ++ 2 files changed, 12 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/build/DTD/samba.entities b/docs-xml/build/DTD/samba.entities index 4ad65ca..d204156 100644 --- a/docs-xml/build/DTD/samba.entities +++ b/docs-xml/build/DTD/samba.entities @@ -428,6 +428,15 @@ an Active Directory environment. '> + +-C|--use-ccache + +Try to use the credentials cached by winbind. + + +'> + @@ -439,6 +448,7 @@ an Active Directory environment. diff --git a/docs-xml/manpages-3/smbclient.1.xml b/docs-xml/manpages-3/smbclient.1.xml index 6b5a8c5..cadd2ea 100644 --- a/docs-xml/manpages-3/smbclient.1.xml +++ b/docs-xml/manpages-3/smbclient.1.xml @@ -30,6 +30,7 @@ -m maxprotocol -A authfile -N + -C -g -i scope -O@@ -55,6 +56,7 @@ -m maxprotocol -A authfile -N + -C -g -l log-basename -I destinationIP -- Samba Shared Repository
[SCM] Samba Shared Repository - branch v3-5-stable updated
The branch, v3-5-stable has been updated via 01c21d7... s3-docs: Document 'smbclient -C'. (cherry picked from commit f6c39cec27eea2522c62e6f1ff85efdafde351ac) (cherry picked from commit f6a7e9eadf85b19ec0ccca513a261bcad0bcf048) from 5541251... s3/smbd: change locking behavior when "lock spin time = 0". http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-stable - Log - commit 01c21d78cf93277658e05450a8937bcefc53b3b4 Author: Volker Lendecke Date: Tue Feb 16 11:00:08 2010 +0100 s3-docs: Document 'smbclient -C'. (cherry picked from commit f6c39cec27eea2522c62e6f1ff85efdafde351ac) (cherry picked from commit f6a7e9eadf85b19ec0ccca513a261bcad0bcf048) --- Summary of changes: docs-xml/build/DTD/samba.entities | 10 ++ docs-xml/manpages-3/smbclient.1.xml |2 ++ 2 files changed, 12 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/docs-xml/build/DTD/samba.entities b/docs-xml/build/DTD/samba.entities index 4ad65ca..d204156 100644 --- a/docs-xml/build/DTD/samba.entities +++ b/docs-xml/build/DTD/samba.entities @@ -428,6 +428,15 @@ an Active Directory environment. '> + +-C|--use-ccache + +Try to use the credentials cached by winbind. + + +'> + @@ -439,6 +448,7 @@ an Active Directory environment. diff --git a/docs-xml/manpages-3/smbclient.1.xml b/docs-xml/manpages-3/smbclient.1.xml index 6b5a8c5..cadd2ea 100644 --- a/docs-xml/manpages-3/smbclient.1.xml +++ b/docs-xml/manpages-3/smbclient.1.xml @@ -30,6 +30,7 @@ -m maxprotocol -A authfile -N + -C -g -i scope -O@@ -55,6 +56,7 @@ -m maxprotocol -A authfile -N + -C -g -l log-basename -I destinationIP -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 1e13d3f... s4-dcerpc: fixed auth padding to be relative to the stub, not packet via 018fb2d... s4-dsdb: return LDB_ERR_CONSTRAINT_VIOLATION on num_recs != 1 via 86f8ddf... s4-samdb: use dsdb_search() in cracknames via 6d65f4c... s4-kcc: remove search_onelevel_with_deleted() in kcc via 0bedb9c... s4-dsdb: removed gendb_search_single_extended_dn() via b630530... s4-dsdb: added dsdb_search_one() and cleanup dsdb_find_dn_by_guid() via 8f4a342... s4-dsdb: replace dsdb_find_dn_by_guid() with a dsdb_search() call via e9be1fc... s4-dsdb: change dsdb_search_dn_with_deleted() to dsdb_search_dn() with dsdb_flags via 90203f8... s4-dsdb: change samdb_replace() to dsdb_replace() and allow for dsdb_flags via c6d85d6... s4-dsdb: replace dsdb_modify_permissive() with dsdb_modify() and dsdb_flags via 67950c2... s4-dsdb: move dsdb_request_add_controls() into dsdb/common/util.c from f6c39ce... s3-docs: Document 'smbclient -C'. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 1e13d3fb076fca596f8c480134c6b6f877824360 Author: Andrew Tridgell Date: Tue Feb 16 20:21:29 2010 +1100 s4-dcerpc: fixed auth padding to be relative to the stub, not packet The recent dcerpc padding changes made our padding relative to the packet header, instead of the start of the stub. Surprisingly, this broke w2k8r2 doing a dcpromo join to a s4 server. It seems that w2k8r2 is very fussy about the padding it gets in some circumstances. commit 018fb2d1ae4f1fa2b85afdc8c90dd7ebb8c3fa47 Author: Andrew Tridgell Date: Tue Feb 16 16:39:49 2010 +1100 s4-dsdb: return LDB_ERR_CONSTRAINT_VIOLATION on num_recs != 1 In a single record search, LDB_ERR_CONSTRAINT_VIOLATION is more useful than the generic LDB_ERR_OPERATIONS_ERROR Pair-Programmed-With: Andrew Bartlett commit 86f8ddf75458582195954cd0b3ad3dcea28c9d0f Author: Andrew Tridgell Date: Tue Feb 16 16:09:07 2010 +1100 s4-samdb: use dsdb_search() in cracknames greatly simplifies some of the cracknames code Pair-Programmed-With: Andrew Bartlett commit 6d65f4c64739094f3657fbf5c081477d04b3cfe3 Author: Andrew Tridgell Date: Tue Feb 16 15:54:01 2010 +1100 s4-kcc: remove search_onelevel_with_deleted() in kcc Use dsdb_search() instead Pair-Programmed-With: Andrew Bartlett commit 0bedb9cf5ec592dfdf84994a9ace64a2c5d1e987 Author: Andrew Tridgell Date: Tue Feb 16 15:49:29 2010 +1100 s4-dsdb: removed gendb_search_single_extended_dn() Use dsdb_search_one() instead, which allows for arbitrary controls Pair-Programmed-With: Andrew Bartlett commit b630530730a710b7e850be2f848b1b85dbc25b4d Author: Andrew Tridgell Date: Tue Feb 16 15:40:44 2010 +1100 s4-dsdb: added dsdb_search_one() and cleanup dsdb_find_dn_by_guid() dsdb_find_dn_by_guid() now takes a struct GUID instead of a guid_string. All the callers in fact wanted a struct GUID, so we now avoid the extra conversion. Pair-Programmed-With: Andrew Bartlett commit 8f4a34272eb26e7c86ce8c0e158b5f6eabd10234 Author: Andrew Tridgell Date: Tue Feb 16 15:15:35 2010 +1100 s4-dsdb: replace dsdb_find_dn_by_guid() with a dsdb_search() call much simpler code by using dsdb_flags Pair-Programmed-With: Andrew Bartlett commit e9be1fc41d8f541efb447e373ae089cab3b19586 Author: Andrew Tridgell Date: Tue Feb 16 14:55:19 2010 +1100 s4-dsdb: change dsdb_search_dn_with_deleted() to dsdb_search_dn() with dsdb_flags Allows for arbitrary controls commit 90203f87e7da3346ae9236e4d30c93b95a2ddad9 Author: Andrew Tridgell Date: Tue Feb 16 14:45:16 2010 +1100 s4-dsdb: change samdb_replace() to dsdb_replace() and allow for dsdb_flags This allows for controls to be added easily where they are needed. commit c6d85d67f9b52e4071c84749a1f55de646a5451c Author: Andrew Tridgell Date: Tue Feb 16 14:29:07 2010 +1100 s4-dsdb: replace dsdb_modify_permissive() with dsdb_modify() and dsdb_flags commit 67950c27e473ebf8f7f81ef0ef92d2bd7931622a Author: Andrew Tridgell Date: Tue Feb 16 14:23:21 2010 +1100 s4-dsdb: move dsdb_request_add_controls() into dsdb/common/util.c This will be used to allow the flag based ldb functions to work on both a ldb or a module, thus saving a lot of specialist functions. --- Summary of changes: lib/util/util_ldb.c| 97 lib/util/util_ldb.h|8 - source4/auth/ntlm/auth_sam.c | 10 +- source4/auth/sam.c |5 +- source4/dsdb/common/util.c | 504 source4/dsdb/{sam
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via eda16f2... s4-kcc: remove a qsort() that snuck into the new topology code via e3a272c... s4-rpc: don't use auth padding in rpc bind requests as it breaks s3 from 1e13d3f... s4-dcerpc: fixed auth padding to be relative to the stub, not packet http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit eda16f2410d7a6d79505b102aca8f111de4871d9 Author: Andrew Tridgell Date: Tue Feb 16 22:41:45 2010 +1100 s4-kcc: remove a qsort() that snuck into the new topology code commit e3a272c3f23139e69c4e671e6b7b756d727c4e61 Author: Andrew Tridgell Date: Tue Feb 16 22:18:16 2010 +1100 s4-rpc: don't use auth padding in rpc bind requests as it breaks s3 The s3 RPC server returns a bind_nak if it gets a rpc bind with auth padding. This change forces a padding length of zero to maximimise compatibility with s3 servers. I've left the padding code in as a #if 0 to make it easier for us to test/fix the s3 server code, which should be changed to correctly handle arbitrary auth padding in all rpc requests with auth trailers. --- Summary of changes: source4/dsdb/kcc/kcc_topology.c |3 +-- source4/librpc/rpc/dcerpc_util.c |7 +++ 2 files changed, 8 insertions(+), 2 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/dsdb/kcc/kcc_topology.c b/source4/dsdb/kcc/kcc_topology.c index 53de556..571bd84 100644 --- a/source4/dsdb/kcc/kcc_topology.c +++ b/source4/dsdb/kcc/kcc_topology.c @@ -146,8 +146,7 @@ static NTSTATUS kcctpl_create_graph(TALLOC_CTX *mem_ctx, guids->count); NT_STATUS_HAVE_NO_MEMORY_AND_FREE(graph->vertices.data, graph); - qsort(guids->data, guids->count, sizeof(struct GUID), - QSORT_CAST GUID_compare); + TYPESAFE_QSORT(guids->data, guids->count, GUID_compare); for (i = 0; i < guids->count; i++) { graph->vertices.data[i].id = guids->data[i]; diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index f412361..aafa283 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -83,12 +83,19 @@ NTSTATUS ncacn_push_auth(DATA_BLOB *blob, TALLOC_CTX *mem_ctx, } if (auth_info) { +#if 0 + /* the s3 rpc server doesn't handle auth padding in + bind requests. Use zero auth padding to keep us + working with old servers */ uint32_t offset = ndr->offset; ndr_err = ndr_push_align(ndr, 16); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { return ndr_map_error2ntstatus(ndr_err); } auth_info->auth_pad_length = ndr->offset - offset; +#else + auth_info->auth_pad_length = 0; +#endif ndr_err = ndr_push_dcerpc_auth(ndr, NDR_SCALARS|NDR_BUFFERS, auth_info); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { return ndr_map_error2ntstatus(ndr_err); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 83542d9... s3: Slightly increase parallelism in g_lock via be919d6... s3: Avoid starving locks when many processes die at the same time via 725b365... s3: Avoid a thundering herd in g_lock_unlock via 07978bd... s3: Optimize g_lock_lock for a heavily contended case via f3bdb16... s3: Fix handling of processes that died in g_lock from eda16f2... s4-kcc: remove a qsort() that snuck into the new topology code http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 83542d973ca771353109c7da4b0391d6ba910f53 Author: Volker Lendecke Date: Tue Feb 16 12:31:58 2010 +0100 s3: Slightly increase parallelism in g_lock There's no need to still hold the g_lock tdb-level lock while telling the waiters to retry commit be919d6faed198cdc29322a4d9491946c0b044b3 Author: Volker Lendecke Date: Tue Feb 16 12:28:53 2010 +0100 s3: Avoid starving locks when many processes die at the same time In g_lock_unlock we have a little race between the process_exists and messaging_send call: We only send to 5 waiters now, they all might have died between us checking their existence and sending the message. This change makes g_lock_lock retry at least once every minute. commit 725b3654f831fbe0388cc09f46269903c9eef1d7 Author: Volker Lendecke Date: Tue Feb 16 12:22:08 2010 +0100 s3: Avoid a thundering herd in g_lock_unlock Only notify the first 5 pending lock waiters. This avoids a thundering herd problem that is really nasty in a cluster. It also makes acquiring a lock a bit more FIFO, lock waiters are added to the end of the array. commit 07978bd175395e0dc770f68fff5b8bd8b0fdeb51 Author: Volker Lendecke Date: Mon Feb 15 16:57:16 2010 +0100 s3: Optimize g_lock_lock for a heavily contended case Only check the existence of the lock owner in g_lock_parse, check the rest of the records only when we got the lock successfully. This reduces the load on process_exists which can involve a network roundtrip in the clustered case. commit f3bdb163f461175c50b4930fa3464beaee30f4a8 Author: Volker Lendecke Date: Mon Feb 15 16:49:46 2010 +0100 s3: Fix handling of processes that died in g_lock g_lock_parse might have thrown away entries from the locks array because the processes were not around anymore. Don't store the orphaned entries. --- Summary of changes: source3/lib/g_lock.c | 82 + 1 files changed, 68 insertions(+), 14 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c index 26b079d..add670c 100644 --- a/source3/lib/g_lock.c +++ b/source3/lib/g_lock.c @@ -108,6 +108,34 @@ static bool g_lock_parse(TALLOC_CTX *mem_ctx, TDB_DATA data, (locks[i].lock_type & G_LOCK_PENDING) ? "(pending)" : "(owner)")); + if (((locks[i].lock_type & G_LOCK_PENDING) == 0) + && !process_exists(locks[i].pid)) { + + DEBUGADD(10, ("lock owner %s died -- discarding\n", + procid_str(talloc_tos(), +&locks[i].pid))); + + if (i < (num_locks-1)) { + locks[i] = locks[num_locks-1]; + } + num_locks -= 1; + } + } + + *plocks = locks; + *pnum_locks = num_locks; + return true; +} + +static void g_lock_cleanup(int *pnum_locks, struct g_lock_rec *locks) +{ + int i, num_locks; + + num_locks = *pnum_locks; + + DEBUG(10, ("g_lock_cleanup: %d locks\n", num_locks)); + + for (i=0; istore(rec, data, 0); if (!NT_STATUS_IS_OK(store_status)) { DEBUG(1, ("rec->store failed: %s\n", @@ -263,7 +298,6 @@ NTSTATUS g_lock_lock(struct g_lock_ctx *ctx, const char *name, NTSTATUS status; bool retry = false; struct timeval timeout_end; - struct timeval timeout_remaining; struct timeval time_now; DEBUG(10, ("Trying to acquire lock %d for %s\n", (int)lock_type, @@ -304,6 +338,7 @@ NTSTATUS g_lock_lock(struct g_lock_ctx *ctx, const char *name, fd_set *r_fds = NULL; int max_fd = 0; int ret; + struct timeval select_timeout; status = g_lock_trylock(ctx, name, lock_type); if (NT_STATUS_IS_OK(status)) { @@ -360,12 +395,10 @@ NTSTATUS g_lock_lock(struct g_lock_ctx *ctx, const char *name, } #endif - time_now = timeval_current(); - timeout_remaining = timeval_until(&time_now, &timeout_end); +
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via f8b246e... s3: Fix timeout calculation if g_lock_lock is given a timeout < 60s from 83542d9... s3: Slightly increase parallelism in g_lock http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit f8b246e44c819b909b23b4b98ef0999c84d2f4ff Author: Volker Lendecke Date: Tue Feb 16 15:21:25 2010 +0100 s3: Fix timeout calculation if g_lock_lock is given a timeout < 60s Detected while showing this code to obnox :-) --- Summary of changes: source3/lib/g_lock.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c index add670c..e4c6d7c 100644 --- a/source3/lib/g_lock.c +++ b/source3/lib/g_lock.c @@ -338,7 +338,7 @@ NTSTATUS g_lock_lock(struct g_lock_ctx *ctx, const char *name, fd_set *r_fds = NULL; int max_fd = 0; int ret; - struct timeval select_timeout; + struct timeval timeout_remaining, select_timeout; status = g_lock_trylock(ctx, name, lock_type); if (NT_STATUS_IS_OK(status)) { @@ -395,8 +395,13 @@ NTSTATUS g_lock_lock(struct g_lock_ctx *ctx, const char *name, } #endif + time_now = timeval_current(); + timeout_remaining = timeval_until(&time_now, &timeout_end); select_timeout = timeval_set(60, 0); + select_timeout = timeval_min(&select_timeout, +&timeout_remaining); + ret = sys_select(max_fd + 1, r_fds, NULL, NULL, &select_timeout); if (ret == -1) { -- Samba Shared Repository
[SCM] SAMBA-CTDB repository - branch v3-4-ctdb updated - 3.4.2-ctdb-22-8-gc20e3e4
The branch, v3-4-ctdb has been updated via c20e3e402bd3b256b4ea5dd7f9f84b5336930bb7 (commit) via 5c54ae35b4356549caa691abd8d2b3eab36de5ec (commit) via 31a3d1c5fef0688548cde5224f2196c84d866b57 (commit) via 8136b31a24716a405c5e29f00d291e3979bc939a (commit) via f373961ff38f0d9f6b7ef866b6cb30f653fc76b7 (commit) via e577980623ea64a852bac569bf50fb9c92d98b7b (commit) via 0357851c0c8e115e92c89956b28c0468182e93d1 (commit) via dd9ab62a6d8b247ee95f304b3d24469cff6553b8 (commit) from 968e731d7c2b905d816ba283a096195b1a964539 (commit) http://gitweb.samba.org/?p=obnox/samba-ctdb.git;a=shortlog;h=v3-4-ctdb - Log - commit c20e3e402bd3b256b4ea5dd7f9f84b5336930bb7 Author: Volker Lendecke Date: Tue Feb 16 16:44:58 2010 +0100 v3-4-ctdb: Bump ctdb vendor patch level to 23 commit 5c54ae35b4356549caa691abd8d2b3eab36de5ec Author: Volker Lendecke Date: Tue Feb 16 15:21:25 2010 +0100 s3: Fix timeout calculation if g_lock_lock is given a timeout < 60s Detected while showing this code to obnox :-) commit 31a3d1c5fef0688548cde5224f2196c84d866b57 Author: Volker Lendecke Date: Tue Feb 16 12:31:58 2010 +0100 s3: Slightly increase parallelism in g_lock There's no need to still hold the g_lock tdb-level lock while telling the waiters to retry commit 8136b31a24716a405c5e29f00d291e3979bc939a Author: Volker Lendecke Date: Tue Feb 16 12:28:53 2010 +0100 s3: Avoid starving locks when many processes die at the same time In g_lock_unlock we have a little race between the process_exists and messaging_send call: We only send to 5 waiters now, they all might have died between us checking their existence and sending the message. This change makes g_lock_lock retry at least once every minute. commit f373961ff38f0d9f6b7ef866b6cb30f653fc76b7 Author: Volker Lendecke Date: Tue Feb 16 12:22:08 2010 +0100 s3: Avoid a thundering herd in g_lock_unlock Only notify the first 5 pending lock waiters. This avoids a thundering herd problem that is really nasty in a cluster. It also makes acquiring a lock a bit more FIFO, lock waiters are added to the end of the array. commit e577980623ea64a852bac569bf50fb9c92d98b7b Author: Volker Lendecke Date: Mon Feb 15 16:57:16 2010 +0100 s3: Optimize g_lock_lock for a heavily contended case Only check the existence of the lock owner in g_lock_parse, check the rest of the records only when we got the lock successfully. This reduces the load on process_exists which can involve a network roundtrip in the clustered case. commit 0357851c0c8e115e92c89956b28c0468182e93d1 Author: Volker Lendecke Date: Mon Feb 15 16:49:46 2010 +0100 s3: Fix handling of processes that died in g_lock g_lock_parse might have thrown away entries from the locks array because the processes were not around anymore. Don't store the orphaned entries. commit dd9ab62a6d8b247ee95f304b3d24469cff6553b8 Author: Volker Lendecke Date: Mon Feb 15 16:35:06 2010 +0100 s3: Fix a typo --- Summary of changes: source3/VERSION |2 +- source3/lib/g_lock.c | 85 ++ 2 files changed, 73 insertions(+), 14 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/VERSION b/source3/VERSION index ab42fc4..2c495b8 100644 --- a/source3/VERSION +++ b/source3/VERSION @@ -85,7 +85,7 @@ SAMBA_VERSION_IS_GIT_SNAPSHOT=no # # SAMBA_VERSION_VENDOR_SUFFIX="ctdb" -SAMBA_VERSION_VENDOR_PATCH=22 +SAMBA_VERSION_VENDOR_PATCH=23 # This can be set by vendors if they want..# diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c index 9971d71..4e31761 100644 --- a/source3/lib/g_lock.c +++ b/source3/lib/g_lock.c @@ -108,6 +108,34 @@ static bool g_lock_parse(TALLOC_CTX *mem_ctx, TDB_DATA data, (locks[i].lock_type & G_LOCK_PENDING) ? "(pending)" : "(owner)")); + if (((locks[i].lock_type & G_LOCK_PENDING) == 0) + && !process_exists(locks[i].pid)) { + + DEBUGADD(10, ("lock owner %s died -- discarding\n", + procid_str(talloc_tos(), +&locks[i].pid))); + + if (i < (num_locks-1)) { + locks[i] = locks[num_locks-1]; + } + num_locks -= 1; + } + } + + *plocks = locks; + *pnum_locks = num_locks; + return true; +} + +static void g_lock_cleanup(int *pnum_locks, struct g_lo
[SCM] SAMBA-CTDB repository - annotated tag 3.4.2-ctdb-23 created - 3.4.2-ctdb-23
The annotated tag, 3.4.2-ctdb-23 has been created at 3c4ffaafb323987220c988704685c1cfe9694660 (tag) tagging c20e3e402bd3b256b4ea5dd7f9f84b5336930bb7 (commit) replaces 3.4.2-ctdb-22 tagged by Michael Adam on Tue Feb 16 16:57:39 2010 +0100 - Log - tag release 3.4.2-ctdb-23 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkt6wHgACgkQyU9JOBhPkDSnXwCeMPAMx+kKA8YOceLl0GX2uH/9 T+UAoIDUr3zauDW1QgLtrLaMJ+fi10g+ =w7Wz -END PGP SIGNATURE- Volker Lendecke (8): s3: Fix a typo s3: Fix handling of processes that died in g_lock s3: Optimize g_lock_lock for a heavily contended case s3: Avoid a thundering herd in g_lock_unlock s3: Avoid starving locks when many processes die at the same time s3: Slightly increase parallelism in g_lock s3: Fix timeout calculation if g_lock_lock is given a timeout < 60s v3-4-ctdb: Bump ctdb vendor patch level to 23 --- -- SAMBA-CTDB repository
[SCM] SAMBA-CTDB repository - annotated tag v3-4-ctdb-latest-release updated - 3.4.2-ctdb-23
The annotated tag, v3-4-ctdb-latest-release has been updated to bace91222838ac843e5040c35c5dbeb2bd279df1 (tag) from 64458da8df515af5dc2ab78bb26b5f7bda5f160f (which is now obsolete) tagging c20e3e402bd3b256b4ea5dd7f9f84b5336930bb7 (commit) replaces 3.4.2-ctdb-22 tagged by Michael Adam on Tue Feb 16 16:57:58 2010 +0100 - Log - retag v3-4-ctdb-latest-release to 3.4.2-ctdb-23 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkt6wJUACgkQyU9JOBhPkDTQPwCeNUNBDxCUaZQQv0gjDUI220+X AAgAn3sD1EWhi2a0CdDeJuPTzGH0wlC4 =nPVd -END PGP SIGNATURE- Volker Lendecke (8): s3: Fix a typo s3: Fix handling of processes that died in g_lock s3: Optimize g_lock_lock for a heavily contended case s3: Avoid a thundering herd in g_lock_unlock s3: Avoid starving locks when many processes die at the same time s3: Slightly increase parallelism in g_lock s3: Fix timeout calculation if g_lock_lock is given a timeout < 60s v3-4-ctdb: Bump ctdb vendor patch level to 23 --- -- SAMBA-CTDB repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 77fc30b... testprogs: add rather simple device mode tests to spoolss test. from f8b246e... s3: Fix timeout calculation if g_lock_lock is given a timeout < 60s http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 77fc30b4811d78f79b8af2fef70eba7b9fa03e79 Author: Günther Deschner Date: Tue Feb 16 16:12:52 2010 +0100 testprogs: add rather simple device mode tests to spoolss test. Guenther --- Summary of changes: testprogs/win32/spoolss/spoolss.c | 126 + testprogs/win32/spoolss/torture.h |2 +- 2 files changed, 127 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/testprogs/win32/spoolss/spoolss.c b/testprogs/win32/spoolss/spoolss.c index 12641f0..d097bf3 100644 --- a/testprogs/win32/spoolss/spoolss.c +++ b/testprogs/win32/spoolss/spoolss.c @@ -730,6 +730,131 @@ static BOOL test_EnumPrinterDataEx(struct torture_context *tctx, return TRUE; } +/ +/ + +static BOOL test_devicemode_equal(struct torture_context *tctx, + const DEVMODE *d1, + const DEVMODE *d2) +{ + if (d1 == d2) { + return TRUE; + } + + if (!d1 || !d2) { + torture_comment(tctx, "%s\n", __location__); + return FALSE; + } + + torture_assert_str_equal(tctx, (const char *)d1->dmDeviceName, (const char *)d2->dmDeviceName, "dmDeviceName mismatch"); + torture_assert_int_equal(tctx, d1->dmSpecVersion, d2->dmSpecVersion, "dmSpecVersion mismatch"); + torture_assert_int_equal(tctx, d1->dmDriverVersion, d2->dmDriverVersion, "dmDriverVersion mismatch"); + torture_assert_int_equal(tctx, d1->dmSize, d2->dmSize, "size mismatch"); + torture_assert_int_equal(tctx, d1->dmDriverExtra, d2->dmDriverExtra, "dmDriverExtra mismatch"); + torture_assert_int_equal(tctx, d1->dmFields, d2->dmFields, "dmFields mismatch"); + + torture_assert_int_equal(tctx, d1->dmOrientation, d2->dmOrientation, "dmOrientation mismatch"); + torture_assert_int_equal(tctx, d1->dmPaperSize, d2->dmPaperSize, "dmPaperSize mismatch"); + torture_assert_int_equal(tctx, d1->dmPaperLength, d2->dmPaperLength, "dmPaperLength mismatch"); + torture_assert_int_equal(tctx, d1->dmPaperWidth, d2->dmPaperWidth, "dmPaperWidth mismatch"); + torture_assert_int_equal(tctx, d1->dmScale, d2->dmScale, "dmScale mismatch"); + torture_assert_int_equal(tctx, d1->dmCopies, d2->dmCopies, "dmCopies mismatch"); + torture_assert_int_equal(tctx, d1->dmDefaultSource, d2->dmDefaultSource, "dmDefaultSource mismatch"); + torture_assert_int_equal(tctx, d1->dmPrintQuality, d2->dmPrintQuality, "dmPrintQuality mismatch"); + + torture_assert_int_equal(tctx, d1->dmColor, d2->dmColor, "dmColor mismatch"); + torture_assert_int_equal(tctx, d1->dmDuplex, d2->dmDuplex, "dmDuplex mismatch"); + torture_assert_int_equal(tctx, d1->dmYResolution, d2->dmYResolution, "dmYResolution mismatch"); + torture_assert_int_equal(tctx, d1->dmTTOption, d2->dmTTOption, "dmTTOption mismatch"); + torture_assert_int_equal(tctx, d1->dmCollate, d2->dmCollate, "dmCollate mismatch"); + torture_assert_str_equal(tctx, (const char *)d1->dmFormName, (const char *)d2->dmFormName, "dmFormName mismatch"); + torture_assert_int_equal(tctx, d1->dmLogPixels, d2->dmLogPixels, "dmLogPixels mismatch"); + torture_assert_int_equal(tctx, d1->dmBitsPerPel, d2->dmBitsPerPel, "dmBitsPerPel mismatch"); + torture_assert_int_equal(tctx, d1->dmPelsWidth, d2->dmPelsWidth, "dmPelsWidth mismatch"); + torture_assert_int_equal(tctx, d1->dmPelsHeight, d2->dmPelsHeight, "dmPelsHeight mismatch"); + + torture_assert_int_equal(tctx, d1->dmDisplayFlags, d2->dmDisplayFlags, "dmDisplayFlags mismatch"); + /* or dmNup ? */ + torture_assert_int_equal(tctx, d1->dmDisplayFrequency, d2->dmDisplayFrequency, "dmDisplayFrequency mismatch"); + + torture_assert_int_equal(tctx, d1->dmICMMethod, d2->dmICMMethod, "dmICMMethod mismatch"); + torture_assert_int_equal(tctx, d1->dmICMIntent, d2->dmICMIntent, "dmICMIntent mismatch"); + torture_assert_int_equal(tctx, d1->dmMediaType, d2->dmMediaType, "dmMediaType mismatch"); + torture_assert_int_equal(tctx, d1->dmDitherType, d2->dmDitherType, "dmDitherType mismatch"); + torture_assert_int_equal(tctx, d1->dmReserved1, d2->dmReserved1, "dmReserved1 mismatch"); + torture_assert_int_equal(tctx, d1->dmReserved2, d2->dmReserved2, "reserved2 mismatch"); + + torture_assert
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via eb8800e... s4-rpc: paranoid check for auth_length from 77fc30b... testprogs: add rather simple device mode tests to spoolss test. http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit eb8800e6118c2f77cef5a27f1c1b6118dd52d4ca Author: Andrew Tridgell Date: Wed Feb 17 10:23:14 2010 +1100 s4-rpc: paranoid check for auth_length This is not strictly needed as the ndr_pull_advance() checks it a few lines further down, but I want to save Jeremy getting more grey hairs :-) --- Summary of changes: source4/librpc/rpc/dcerpc_util.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index aafa283..9dabb54 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -781,6 +781,17 @@ NTSTATUS dcerpc_pull_auth_trailer(struct ncacn_packet *pkt, uint32_t pad; pad = pkt_auth_blob->length - (DCERPC_AUTH_TRAILER_LENGTH + pkt->auth_length); + + /* paranoia check for pad size. This would be caught anyway by + the ndr_pull_advance() a few lines down, but it scared + Jeremy enough for him to call me, so we might as well check + it now, just to prevent someone posting a bogus YouTube + video in the future. + */ + if (pad > pkt_auth_blob->length) { + return NT_STATUS_INFO_LENGTH_MISMATCH; + } + *auth_length = pkt_auth_blob->length - pad; ndr = ndr_pull_init_blob(pkt_auth_blob, mem_ctx, NULL); -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via d14c375... s3:rpc streamline memory handling from eb8800e... s4-rpc: paranoid check for auth_length http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit d14c3756e82412da93fc19f75167be9f2b46bf33 Author: Simo Sorce Date: Sun Feb 14 03:33:15 2010 -0500 s3:rpc streamline memory handling --- Summary of changes: source3/rpc_server/srv_pipe_hnd.c | 18 +- 1 files changed, 5 insertions(+), 13 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c index 83f27fe..f5ea877 100644 --- a/source3/rpc_server/srv_pipe_hnd.c +++ b/source3/rpc_server/srv_pipe_hnd.c @@ -105,7 +105,7 @@ static struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx, return NULL; } - p->mem_ctx = talloc_init("pipe %s %p", + p->mem_ctx = talloc_named(p, 0, "pipe %s %p", get_pipe_name_from_syntax(talloc_tos(), syntax), p); if (p->mem_ctx == NULL) { @@ -116,7 +116,6 @@ static struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx, if (!init_pipe_handle_list(p, syntax)) { DEBUG(0,("open_rpc_pipe_p: init_pipe_handles failed.\n")); - talloc_destroy(p->mem_ctx); TALLOC_FREE(p); return NULL; } @@ -130,7 +129,6 @@ static struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx, if(!prs_init(&p->in_data.data, 128, p->mem_ctx, MARSHALL)) { DEBUG(0,("open_rpc_pipe_p: malloc fail for in_data struct.\n")); - talloc_destroy(p->mem_ctx); close_policy_by_pipe(p); TALLOC_FREE(p); return NULL; @@ -139,7 +137,6 @@ static struct pipes_struct *make_internal_rpc_pipe_p(TALLOC_CTX *mem_ctx, p->server_info = copy_serverinfo(p, server_info); if (p->server_info == NULL) { DEBUG(0, ("open_rpc_pipe_p: copy_serverinfo failed\n")); - talloc_destroy(p->mem_ctx); close_policy_by_pipe(p); TALLOC_FREE(p); return NULL; @@ -344,10 +341,9 @@ static void free_pipe_context(pipes_struct *p) "%lu\n", (unsigned long)talloc_total_size(p->mem_ctx) )); talloc_free_children(p->mem_ctx); } else { - p->mem_ctx = talloc_init( - "pipe %s %p", get_pipe_name_from_syntax(talloc_tos(), - &p->syntax), - p); + p->mem_ctx = talloc_named(p, 0, "pipe %s %p", + get_pipe_name_from_syntax(talloc_tos(), + &p->syntax), p); if (p->mem_ctx == NULL) { p->fault_state = True; } @@ -932,8 +928,6 @@ static int close_internal_rpc_pipe_hnd(struct pipes_struct *p) (*p->auth.auth_data_free_func)(&p->auth); } - TALLOC_FREE(p->mem_ctx); - free_pipe_rpc_context( p->contexts ); /* Free the handles database. */ @@ -943,9 +937,7 @@ static int close_internal_rpc_pipe_hnd(struct pipes_struct *p) ZERO_STRUCTP(p); - TALLOC_FREE(p); - - return True; + return 0; } bool fsp_is_np(struct files_struct *fsp) -- Samba Shared Repository
Build status as of Wed Feb 17 07:00:08 2010
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2010-02-16 00:00:07.0 -0700 +++ /home/build/master/cache/broken_results.txt 2010-02-17 00:00:11.0 -0700 @@ -1,4 +1,4 @@ -Build status as of Tue Feb 16 07:00:06 2010 +Build status as of Wed Feb 17 07:00:08 2010 Build counts: Tree Total Broken Panic @@ -8,13 +8,13 @@ libreplace 35 12 0 lorikeet 0 0 0 pidl 25 23 0 -ppp 17 1 0 -rsync35 12 0 +ppp 17 0 0 +rsync35 13 0 samba-docs 0 0 0 samba-web0 0 0 samba_3_current 33 32 1 -samba_3_master 33 32 5 -samba_3_next 29 29 4 +samba_3_master 33 31 4 +samba_3_next 29 28 4 samba_4_0_test 35 33 0 talloc 35 11 0 tdb 33 21 0