metze/samba/wip.git
11 years agos3-libsmb: Initialise ticket to ensure we do not invalid memory
Andrew Bartlett [Thu, 1 Mar 2012 05:55:04 +0000 (16:55 +1100)]
s3-libsmb: Initialise ticket to ensure we do not invalid memory

The free is however a talloc_free(), which has additional protection against
freeing the wrong thing.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Mar  2 01:45:19 CET 2012 on sn-devel-104
(cherry picked from commit f1452a296429b79755235f4a480f0d5ea38ce178)

Fix bug #8788 - spnego_parse_krb5_wrap() frees invalid memory.

11 years agos3-printing: Increase debug level for info that the db is empty.
Andreas Schneider [Thu, 20 Sep 2012 08:20:31 +0000 (10:20 +0200)]
s3-printing: Increase debug level for info that the db is empty.

(cherry picked from commit c80d70da1364349a5329d17a68033163c5025264)

Signed-off-by: Andreas Schneider <asn@samba.org>
See bug #9112 - smbd.log is flooded by 'printer_list_get_printer: Failed to
fetch record!' for details.

11 years agopackaging: Add support for reloading systemd services.
Andreas Schneider [Wed, 10 Oct 2012 09:30:15 +0000 (11:30 +0200)]
packaging: Add support for reloading systemd services.

Signed-off-by: Andreas Schneider <asn@samba.org>
Fix bug #9280 - Add support for reloading the daemons using systemctl reload.

11 years agoautoconf: fix --with(out)-sendfile-support option handling
Björn Jacke [Thu, 13 Sep 2012 22:02:22 +0000 (00:02 +0200)]
autoconf: fix --with(out)-sendfile-support option handling

this fixes bug #8344

11 years agolibreplace: Bug 8107, Fix poll replacement to become a msleep replacement
Joachim Schmitz [Mon, 17 Sep 2012 12:26:31 +0000 (05:26 -0700)]
libreplace: Bug 8107, Fix poll replacement to become a msleep replacement

Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 7542b63188f7e73588c9abb40e36a910c87bc534)

11 years agoreplace: add some includes for poll.h
Björn Jacke [Sun, 16 Sep 2012 00:21:39 +0000 (02:21 +0200)]
replace: add some includes for poll.h

See bug #8107

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Sun Sep 16 04:05:08 CEST 2012 on sn-devel-104
(cherry picked from commit 520c9b0b0ae33e6e8fb78034cfff685f5491aab3)
(cherry picked from commit ea96d79e21a549204a7f64307059ea877bfb9fd5)

11 years agoCorrect fix for bug #9222 - smbd ignores the "server signing = no" setting for SMB2.
Jeremy Allison [Wed, 3 Oct 2012 19:58:00 +0000 (12:58 -0700)]
Correct fix for bug #9222 - smbd ignores the "server signing = no" setting for SMB2.

Signing cannot be disabled for SMB2 by design, so fix the documentation
instead.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Oct  3 23:47:23 CEST 2012 on sn-devel-104
(cherry picked from commit fe38a93c71d0adc0be1d43b438ac3b54eaf4ba53)

11 years agos3fs-printing: Fix RAW printing for normal users.
Andreas Schneider [Mon, 8 Oct 2012 10:32:49 +0000 (12:32 +0200)]
s3fs-printing: Fix RAW printing for normal users.

This fixes bug #8769.

Signed-off-by: Andreas Schneider <asn@samba.org>
11 years agos3: Add two tests a CLEAR_IF_FIRST crash
Volker Lendecke [Mon, 8 Oct 2012 19:25:49 +0000 (12:25 -0700)]
s3: Add two tests a CLEAR_IF_FIRST crash

The last 3 patches address bug #9268 - Make tdb robust against improper
CLEAR_IF_FIRST restart.

11 years agotdb: Make tdb robust against improper CLEAR_IF_FIRST restart
Volker Lendecke [Mon, 8 Oct 2012 19:02:43 +0000 (12:02 -0700)]
tdb: Make tdb robust against improper CLEAR_IF_FIRST restart

When winbind is restarted, there is a potential crash in tdb. Following
situation: We are in a cluster with ctdb. A winbind child hangs
in a request to the DC. Cluster monitoring decides the node has a
problem. Cluster monitoring decides to kill ctdbd. winbind child
still hangs in a RPC request. winbind parent figures that ctdb is
dead and immediately commits suicide. winbind parent is restarted by
cluster management, overwriting gencache.tdb with CLEAR_IF_FIRST. The
CLEAR_IF_FIRST logic as implemented now will not see that a child still
has the tdb open, only the parent holds the ACTIVE_LOCK due to performance
reasons. During the CLEAR_IF_FIRST logic is done, there is a very small
window where we ftruncate(tfd, 0) the file and re-write a proper header
without a lock. When during this small window the winbind child comes
back, wanting to store something into gencache.tdb, that winbind child
will crash with a SIGBUS.

Sounds unlikely? See:

    [2012/09/29 07:02:31.871607,  0] lib/util.c:1183(smb_panic)
      PANIC (pid 1814517): internal error
    [2012/09/29 07:02:31.877596,  0] lib/util.c:1287(log_stack_trace)
      BACKTRACE: 35 stack frames:
       #0 winbindd(log_stack_trace+0x1a) [0x7feb7d4ca18a]
       #1 winbindd(smb_panic+0x2b) [0x7feb7d4ca25b]
       #2 winbindd(+0x1a3cc4) [0x7feb7d4bacc4]
       #3 /lib64/libc.so.6(+0x32900) [0x7feb7a929900]
       #4 /lib64/libc.so.6(memcpy+0x35) [0x7feb7a97f355]
       #5 /usr/lib64/libtdb.so.1(+0x6e76) [0x7feb7b0b0e76]
       #6 /usr/lib64/libtdb.so.1(+0x3d37) [0x7feb7b0add37]
       #7 /usr/lib64/libtdb.so.1(+0x863d) [0x7feb7b0b263d]
       #8 /usr/lib64/libtdb.so.1(+0x8700) [0x7feb7b0b2700]
       #9 /usr/lib64/libtdb.so.1(+0x2505) [0x7feb7b0ac505]
       #10 /usr/lib64/libtdb.so.1(+0x25b7) [0x7feb7b0ac5b7]
       #11 /usr/lib64/libtdb.so.1(tdb_fetch+0x13) [0x7feb7b0ac633]
       #12 winbindd(gencache_set_data_blob+0x259) [0x7feb7d4d8449]
       #13 winbindd(gencache_set+0x53) [0x7feb7d4d85b3]
       #14 winbindd(gencache_del+0x5e) [0x7feb7d4d879e]
       #15 winbindd(saf_delete+0x93) [0x7feb7d54b693]
       #16 winbindd(+0xe507e) [0x7feb7d3fc07e]
       #17 winbindd(+0xe85e5) [0x7feb7d3ff5e5]
       #18 winbindd(+0xe65be) [0x7feb7d3fd5be]
       #19 winbindd(+0xe7562) [0x7feb7d3fe562]
       #20 winbindd(init_dc_connection+0x2e) [0x7feb7d3fe5be]
       #21 winbindd(+0xe75d9) [0x7feb7d3fe5d9]
       #22 winbindd(cm_connect_netlogon+0x58) [0x7feb7d3fe658]
       #23 winbindd(_wbint_PingDc+0x61) [0x7feb7d410991]
       #24 winbindd(+0x103175) [0x7feb7d41a175]
       #25 winbindd(winbindd_dual_ndrcmd+0xb7) [0x7feb7d4107d7]
       #26 winbindd(+0xf8609) [0x7feb7d40f609]
       #27 winbindd(+0xf9075) [0x7feb7d410075]
       #28 winbindd(tevent_common_loop_immediate+0xe8) [0x7feb7d4db198]
       #29 winbindd(run_events_poll+0x3c) [0x7feb7d4d93fc]
       #30 winbindd(+0x1c2b52) [0x7feb7d4d9b52]
       #31 winbindd(_tevent_loop_once+0x90) [0x7feb7d4d9f60]
       #32 winbindd(main+0x7b3) [0x7feb7d3e7aa3]
       #33 /lib64/libc.so.6(__libc_start_main+0xfd) [0x7feb7a915cdd]
       #34 winbindd(+0xce2a9) [0x7feb7d3e52a9]

This is in a winbind child, logfiles surrounding indicate the parent
was restarted.

This patch takes all chain locks around the CLEAR_IF_FIRST introduced
tdb_new_database.

11 years agotdb: Make robust against shrinking tdbs
Rusty Russell [Mon, 8 Oct 2012 18:56:47 +0000 (11:56 -0700)]
tdb: Make robust against shrinking tdbs

When probing for a size change (eg. just before tdb_expand, tdb_check,
tdb_rescue) we call tdb_oob(tdb, tdb->map_size, 1, 1).  Unfortunately
this does nothing if the tdb has actually shrunk, which as Volker
demonstrated, can actually happen if a "longlived" parent crashes.

So move the map/update size/remap before the limit check.

11 years agoWhen setting a non-default ACL, don't forget to apply masks to SMB_ACL_USER and SMB_A...
Jeremy Allison [Tue, 2 Oct 2012 17:15:54 +0000 (10:15 -0700)]
When setting a non-default ACL, don't forget to apply masks to SMB_ACL_USER and SMB_ACL_GROUP entries. (cherry picked from commit 6575d1d34fee45c7a965c7c9641cc52b566a9e7f)

The last 4 patches address bug #9236 - ACL masks incorrectly applied when
setting ACLs.

11 years agoOnly apply masks on non-default ACL entries when setting the ACL.
Jeremy Allison [Tue, 2 Oct 2012 19:21:10 +0000 (12:21 -0700)]
Only apply masks on non-default ACL entries when setting the ACL.

11 years agoUse is_default_acl variable in canonicalise_acl(). (cherry picked from commit 82e7132...
Jeremy Allison [Tue, 2 Oct 2012 16:55:09 +0000 (09:55 -0700)]
Use is_default_acl variable in canonicalise_acl(). (cherry picked from commit 82e7132bdf7c9d4ddead3cd5d845bfe68b93448b)

11 years agoReformat spacing to be even. (cherry picked from commit efb446a38cca44885597766649960...
Jeremy Allison [Tue, 2 Oct 2012 16:21:17 +0000 (09:21 -0700)]
Reformat spacing to be even. (cherry picked from commit efb446a38cca448855977666499603d12e1477b4)

11 years agohtml docs: Remove link to Using Samba.
Karolin Seeger [Thu, 4 Oct 2012 09:43:20 +0000 (11:43 +0200)]
html docs: Remove link to Using Samba.

Thanks to Christian Perrier <bubulle@debian.org> for reporting!

Fix bug #7826 - HTML docs index file still points to Using Samba.

Karolin

Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Thu Oct  4 13:48:00 CEST 2012 on sn-devel-104
(cherry picked from commit 1bf209dd7e5a0f0001b3d1e3798093772bbd3fd3)

11 years agos3:quota: don't force the block size to 512
Björn Jacke [Thu, 6 Sep 2012 08:23:50 +0000 (10:23 +0200)]
s3:quota: don't force the block size to 512

there is no point in forcing the block size to 512 when curblocks is 1. This
will only lead to false quota reporting. See bug #3272
(cherry picked from commit d6cc08b9eeb9de17bc0e610d6cf6dba13c5c8222)

11 years agoFix net rpc share allowedusers to work with 2008r2
Jeremy Allison [Thu, 4 Oct 2012 08:56:12 +0000 (10:56 +0200)]
Fix net rpc share allowedusers to work with 2008r2

The RAP NetShareEnum command was removed in 2008r2, so use the RPC equivalent
instead.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=8966
Author: Jeremy Allison <jra@samba.org>

11 years agos3-smbd: Move housekeeping to the background process.
Andreas Schneider [Thu, 27 Sep 2012 15:20:25 +0000 (17:20 +0200)]
s3-smbd: Move housekeeping to the background process.

If you add 200 printers using lpadmin. Then you wait for the printcap
cache to expire. As soon as this expires we notify all deamons that they
should reload the printers. This mean we need to create the default
registry keys for each printer. If you do e.g. a 'smbclient -L' during
that time you will get a lot of timeouts.

This moves the housekeeping of the printcap cache to the background
queue process and lets the background process reload the printers first.
So the background process creates the default registry keys. When it is
done with the task it will tell all smbd childs to reload the printers
and the 200 printers appear.

Signed-off-by: Andreas Schneider <asn@samba.org>
Fix bug #9231 - NT_STATUS_IO_TIMEOUT during slow import of printers into
registry.

11 years agoFix service control for non-internal services.
Vladimir Marek [Mon, 17 Sep 2012 20:50:55 +0000 (13:50 -0700)]
Fix service control for non-internal services.

Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit a4e8869f7c93f30dd7014ff83d6d2f2b5afc2d64)
Signed-off-by: Andreas Schneider <asn@samba.org>
Fix bug #9192 - svcctl list option prohibits smbd to start.

11 years agos3:selftest: run the posix_s3.smb2.oplock tests
Stefan Metzmacher [Wed, 26 Sep 2012 01:24:22 +0000 (03:24 +0200)]
s3:selftest: run the posix_s3.smb2.oplock tests

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Sep 26 07:57:12 CEST 2012 on sn-devel-104
(silimar to commit 98d117a5424d62804b7cb3d8a9ad35e703fc158a)

11 years agos4:torture/smb2: remove samba specific stuff from smb2.oplock
Stefan Metzmacher [Wed, 26 Sep 2012 01:08:33 +0000 (03:08 +0200)]
s4:torture/smb2: remove samba specific stuff from smb2.oplock

metze
(cherry picked from commit 7a14f09f9cc14cfb6234175add1841faf751d51a)

11 years agos3:smb2_create: don't take 'state->te' as indication for "was_deferred" (bug #9196)
Stefan Metzmacher [Wed, 26 Sep 2012 01:04:20 +0000 (03:04 +0200)]
s3:smb2_create: don't take 'state->te' as indication for "was_deferred" (bug #9196)

We always set state->te = NULL of TALLOC_FREE(state->te),
before calling smbd_smb2_request_dispatch(), so
open_was_deferred_smb2() always returned false, while dispatching
it again.

But it's remove_deferred_open_message_smb2_internal() which
should reset this state.

In developer mode validate_my_share_entries() did call smb_panic()
before.

metze
(cherry picked from commit 4604219ceba96955b3c4bf6ab31aa70c11442d61)

11 years agos3:selftest: mark the driver_info_winreg tests knownfail.
Stefan Metzmacher [Sat, 29 Sep 2012 08:04:54 +0000 (10:04 +0200)]
s3:selftest: mark the driver_info_winreg tests knownfail.

They only get executed when driver files are around.

metze
(similar to commit ef8e228a5b4952b51d9db6b28017142759f40d10)

11 years agoFix bug #9209 - Parse of invalid SMB2 create blob can cause smbd crash.
Jeremy Allison [Wed, 26 Sep 2012 23:58:58 +0000 (16:58 -0700)]
Fix bug #9209 - Parse of invalid SMB2 create blob can cause smbd crash.

Ensure we correctly protect against blobs with data_offset==0
and data_length != 0.

Jeremy.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Sep 27 22:07:02 CEST 2012 on sn-devel-104
(cherry picked from commit 322e3d42f65dadabeccf8813fcb0e9b7d353ffb2)

11 years agolibcli/smb: fix padding in smb2_create_blob*
Stefan Metzmacher [Wed, 19 Sep 2012 06:11:23 +0000 (08:11 +0200)]
libcli/smb: fix padding in smb2_create_blob*

metze
(cherry picked from commit aa5caf1fe92b159eae00c7b11499e9ec697cf9ae)

11 years agos3-smbd: Don't segfault if user specified ports out for range.
Andreas Schneider [Tue, 25 Sep 2012 12:28:22 +0000 (14:28 +0200)]
s3-smbd: Don't segfault if user specified ports out for range.

(cherry picked from commit 50d324b7e070de4672eff3fb6231923e6dca807a)

Signed-off-by: Andreas Schneider <asn@samba.org>
Fix bug #9218 - Samba panics if a user specifies an invalid port number.

11 years agoFix bug #9213 - Bad ASN.1 NegTokenInit packet can cause invalid free.
Jeremy Allison [Tue, 25 Sep 2012 23:35:09 +0000 (16:35 -0700)]
Fix bug #9213 - Bad ASN.1 NegTokenInit packet can cause invalid free.

Not the correct fix for the specific issue, but a general fix to
make sure this can never happen again.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep 26 04:07:57 CEST 2012 on sn-devel-104
(cherry picked from commit 83f60672e1b3069e6b1b90b376460da895e37df3)

11 years agoselftest: we fail samba3.smb2.compound.interim2
Michael Adam [Thu, 20 Sep 2012 18:46:53 +0000 (20:46 +0200)]
selftest: we fail samba3.smb2.compound.interim2

We currently return NT_STATUS_CANCELLED where we should
return NT_STATUS_INTERNAL_ERROR.

(similar to commit 841934647b06d6400148932cc8ce02a20c209610)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
The last 15 patches address bug #9173 - SMB2 compound request
create/delete_on_close/close doesn't work as windows.

11 years agos4:torture:smb2:compound: remove two unused macros (cherry picked from commit 6f6b1c6...
Michael Adam [Wed, 19 Sep 2012 22:43:54 +0000 (00:43 +0200)]
s4:torture:smb2:compound: remove two unused macros (cherry picked from commit 6f6b1c6ac15f225978e8c2d67c1a817d9e098317)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos4:torture:smb2: don't skip the compound.interim2 test for non win7/win2k8 (cherry...
Michael Adam [Wed, 19 Sep 2012 22:41:48 +0000 (00:41 +0200)]
s4:torture:smb2: don't skip the compound.interim2 test for non win7/win2k8 (cherry picked from commit 8df0b023c51ed198d3054760447e1b273eada991)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos4:torture:smb2: don't skip the compound.interim1 test for non win7/win2k8 (cherry...
Michael Adam [Wed, 19 Sep 2012 22:41:04 +0000 (00:41 +0200)]
s4:torture:smb2: don't skip the compound.interim1 test for non win7/win2k8 (cherry picked from commit 917e714831178b2a3d07c7f9d09711231a7ccf31)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smb2_notify: don't call tevent_req_done() from smbd_smb2_notify_cancel()
Stefan Metzmacher [Thu, 20 Sep 2012 14:23:26 +0000 (16:23 +0200)]
s3:smb2_notify: don't call tevent_req_done() from smbd_smb2_notify_cancel()

smbd_notify_cancel_by_smbreq() will already trigger this via
smbd_smb2_notify_reply() and smbd_smb2_notify_reply_trigger().

metze
(cherry picked from commit 1f0dfd42f16c388abc7054a7b615d2e81031472b)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smb2_server: avoid segfault in smbd_smb2_request_pending_queue()
Stefan Metzmacher [Thu, 20 Sep 2012 14:04:01 +0000 (16:04 +0200)]
s3:smb2_server: avoid segfault in smbd_smb2_request_pending_queue()

Because we should not call smbd_smb2_request_error() on an
request that is still running.

If the subreq implementes a cancel function, this should
take care of triggering smbd_smb2_request_error.

metze

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 9249871f40aab021d62d3154f8ca286b52f5ef76)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos4:torture:smb2: extend the compound.invalid1 test
Stefan Metzmacher [Fri, 21 Sep 2012 20:20:20 +0000 (22:20 +0200)]
s4:torture:smb2: extend the compound.invalid1 test

Test that when turning the related flag back off for the
last compound request, the return code changes from
invalid parameter to file closed.

Pair-Programmed-With: Michael Adam <obnox@samba.org>
(cherry picked from commit 25437df8a65e56616499dda18c696f58be08f67a)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd:smb2: simplify smbd_smb2_request_validate() and smbd_smb2_request_dispatch()
Michael Adam [Fri, 21 Sep 2012 19:43:36 +0000 (21:43 +0200)]
s3:smbd:smb2: simplify smbd_smb2_request_validate() and smbd_smb2_request_dispatch()

removes unnneccary checks/assignments for compound_related and next_status
and duplicate setting of error status.

And remove (now) unused next_status from struct smbd_smb2_request.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
(similar to commit 1ae6f9c62629f8513bbe93a56775b3c64ff06832)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smbd:smb2: add check for session_status for compound requests (cherry picked from...
Michael Adam [Sat, 22 Sep 2012 02:06:27 +0000 (04:06 +0200)]
s3:smbd:smb2: add check for session_status for compound requests (cherry picked from commit 27d38b5c27bd96d5124c175d946718bf0836b8f4)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smb2_server: do the req->next_status check before the signing checks
Stefan Metzmacher [Wed, 19 Sep 2012 22:52:19 +0000 (00:52 +0200)]
s3:smb2_server: do the req->next_status check before the signing checks

Windows 2012 returns NT_STATUS_INVALID_PARAMETER to
the smb2.compound.invalid1 test if that uses signing
(instead of NT_STATUS_ACCESS_DENIED).

metze
(similar to commit 4384485f82aac109bf4c4c31075e313e54b4c076)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3:smb2_server: reset req->last_session_id and req->last_tid after using it
Stefan Metzmacher [Thu, 20 Sep 2012 03:10:28 +0000 (05:10 +0200)]
s3:smb2_server: reset req->last_session_id and req->last_tid after using it

If we can find a valid session or tcon we'll set it after the lookup,
but it need to make sure to reset it if we don't find the session.

This fixes a problem where a compound unrelated request between
related requests doesn't reset the session.

If we have 3 requests in a compound chain, request 3 should never
use the id's cached from request 1. It should only every inherit
handles from request 2.

metze
(similar to commit 2552b6632372b35cbd7b788c4e00091dfe520a41)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos4:torture:smb2: fix the compound.invalid3 test to work against windows (cherry picke...
Michael Adam [Wed, 19 Sep 2012 22:36:29 +0000 (00:36 +0200)]
s4:torture:smb2: fix the compound.invalid3 test to work against windows (cherry picked from commit bd8d50b451ea7f94efa7777fbe5dc0c2c19f6bf9)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos4:torture:smb2: fix compound.related3 test to work against windows (cherry picked...
Michael Adam [Wed, 19 Sep 2012 22:35:52 +0000 (00:35 +0200)]
s4:torture:smb2: fix compound.related3 test to work against windows (cherry picked from commit 8e525a29a7c6512f61e4647ecb2e0771e2019a49)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos3: Compound requests should continue processing.
Ira Cooper [Wed, 19 Sep 2012 18:39:07 +0000 (18:39 +0000)]
s3: Compound requests should continue processing.

This patch addresses #9173.

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 75951946193c874b6db30c1b9c8722264c3ce656)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
11 years agos4:torture/smb2: fix compound.invalid2 against windows
Stefan Metzmacher [Thu, 27 Oct 2011 19:41:11 +0000 (21:41 +0200)]
s4:torture/smb2: fix compound.invalid2 against windows

Tested against w2k8r2 with signing and win8pre0 without signing.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 31 21:40:25 CET 2011 on sn-devel-104
(cherry picked from commit c90870f9b728dfb827ebc2fe8ad67a7ca3a50c43)

11 years agoFix bug #9016 - Connection to outbound trusted domain goes offline.
Jeremy Allison [Fri, 13 Jul 2012 23:25:23 +0000 (16:25 -0700)]
Fix bug #9016 - Connection to outbound trusted domain goes offline.

By the time we've gotten to init_dc_connection_network() we shouldn't
be second guessing the caller by calling winbindd_can_contact_domain().

If for some reason we do need to restrict the contact list here we
can add a condition to only contact the primary domain or domains
listed in the tdc cache, but I don't think that's neccessary.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jul 14 03:17:57 CEST 2012 on sn-devel-104
(cherry picked from commit 726ecf6a915ff534af4076e9d0cdebf8b5435d61)

11 years agos3-spoolss: Fix builtin forms order to match Windows again.
Andreas Schneider [Wed, 26 Sep 2012 16:21:55 +0000 (18:21 +0200)]
s3-spoolss: Fix builtin forms order to match Windows again.

Thanks to mamachine@gmail.com.

(cherry picked from commit 24fc5b46f2b33f94bf79fc375432609697aaa45e)

Signed-off-by: Andreas Schneider <asn@samba.org>
Fix bug #8632 - printing regression: form sizes seem broken, cannot print letter
size correctly.

11 years agoFix bug #9189 - SMB2 Create doesn't return correct MAX ACCESS access mask in blob.
Jeremy Allison [Mon, 24 Sep 2012 23:43:12 +0000 (16:43 -0700)]
Fix bug #9189 - SMB2 Create doesn't return correct MAX ACCESS access mask in blob.

If we aren't already granted DELETE access, check if we have
DELETE_CHILD in the containing directory.

11 years agoAdd some const to can_delete_file_in_directory().
Jeremy Allison [Mon, 24 Sep 2012 23:42:57 +0000 (16:42 -0700)]
Add some const to can_delete_file_in_directory().

11 years agoquota: add supprt for gfs2
Björn Jacke [Tue, 18 Sep 2012 11:57:30 +0000 (13:57 +0200)]
quota: add supprt for gfs2

gfs2 uses the same generic quota interface as xfs and it has the same base
block/quota block size ratio and seems to work nice with the xfs quota module.

(People using gfs should be aware that quota reporting is lagging quite a bit
on gfs.  If you copy a file on a gfs volume the quota values are being updated
with a delay of 30s here with kernel 3.5. This reporting can lead to data
corruption if a client thinks he can write but actually he suddently can't.)
(cherry picked from commit 0b57d1c07520f4995412f224945324fef29f5989)

Fix bug #9172 - quota on gfs2 being reported wrong.

11 years agopam_winbind: match more return codes when wbcGetPwnam has failed.
Günther Deschner [Wed, 19 Sep 2012 08:59:50 +0000 (10:59 +0200)]
pam_winbind: match more return codes when wbcGetPwnam has failed.

This is required to properly return PAM_USER_UNKNOWN in case winbind had a
problem.

Guenther

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Wed Sep 19 15:06:10 CEST 2012 on sn-devel-104

Fix bug #9177 - pam_winbind's pm_sm_acct_mgmt needs to return PAM_USER_UNKNOWN.

11 years agos3-docs: Remove non-existent option from winbindd manpage.
Andreas Schneider [Tue, 18 Sep 2012 12:43:33 +0000 (14:43 +0200)]
s3-docs: Remove non-existent option from winbindd manpage.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Signed-off-by: Karolin Seeger <kseeger@samba.org>
Fix bug #9171 - winbindd -Y is documented but not implemented.

11 years agos3: Fix idmap_hash
Volker Lendecke [Tue, 18 Sep 2012 22:31:26 +0000 (15:31 -0700)]
s3: Fix idmap_hash

Calling be_init with NULL safely crashes, because we dereference NULL. We
don't need to call it here, this is called in all workers anyway. Thanks
to Jiri Sasek <jiri.sasek@oracle.com> for finding this.

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Sep 20 05:03:54 CEST 2012 on sn-devel-104

Fix bug #9188 - idmap_hash crashes.

11 years agoFix bug #9174: Empty SPNEGO packet can cause smbd to crash.
Jeremy Allison [Tue, 18 Sep 2012 18:51:31 +0000 (11:51 -0700)]
Fix bug #9174: Empty SPNEGO packet can cause smbd to crash.

All fields within NegTokenInit and NegTokenTarg are optional. We incorrectly
assume we'll always get a data blob and indirect within it.

11 years agoRHEL packaging: Try to fix makerpms.sh on RHEL.
Karolin Seeger [Tue, 18 Sep 2012 09:08:17 +0000 (11:08 +0200)]
RHEL packaging: Try to fix makerpms.sh on RHEL.

Address bug #9165 - makerpms.sh can't create package fo RHEL.

Karolin

Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Tue Sep 18 12:51:01 CEST 2012 on sn-devel-104
(cherry picked from commit 6fb91dd36950151aeec69c074f4d900a6e7adba1)

11 years agoconfigure: fix wrong test == syntax
Björn Jacke [Fri, 14 Sep 2012 18:08:19 +0000 (20:08 +0200)]
configure: fix wrong test == syntax

This fixes bug #8146. Thanks to Joachim Schmitz for reporting!

11 years agos3-rap: Open printers with the right access mask.
Andreas Schneider [Wed, 12 Sep 2012 10:12:58 +0000 (12:12 +0200)]
s3-rap: Open printers with the right access mask.

Fix bug #9154.

(cherry picked from commit 1f8c9ab88e7a2e28e503e99baabb88c3cebbc4b6)

Signed-off-by: Andreas Schneider <asn@samba.org>
11 years agonsswitch: fix crash on null pam change pw response
Luca Lorenzetto [Tue, 11 Sep 2012 16:35:42 +0000 (18:35 +0200)]
nsswitch: fix crash on null pam change pw response

The function _pam_winbind_change_pwd crashes due to a null value passed
to the function strcasecmp and denies to login via graphical login
manager. Check for a null value before doing a strcasecmp.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1003296
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9013
(Desktop Managers (xdm, gdm, lightdm...) crashes with SIGSEGV in
_pam_winbind_change_pwd() when password is expiring)

11 years agoFix bug #9147 - winbind can't fetch user or group info from AD via LDAP
Jeremy Allison [Tue, 11 Sep 2012 20:25:14 +0000 (13:25 -0700)]
Fix bug #9147 - winbind can't fetch user or group info from AD via LDAP

Don't use "isprint" in ldb_binary_encode(). This is locale specific.
Restrict to ASCII only, hex encode everything else.

11 years agoWHATSNEW: Start release notes for Samba 3.6.9.
Karolin Seeger [Mon, 17 Sep 2012 08:18:45 +0000 (10:18 +0200)]
WHATSNEW: Start release notes for Samba 3.6.9.

Karolin

11 years agoVERSION: Bump version number up to 3.6.9.
Karolin Seeger [Mon, 17 Sep 2012 08:16:12 +0000 (10:16 +0200)]
VERSION: Bump version number up to 3.6.9.

Karolin

11 years agoWHATSNEW: Add major changes.
Karolin Seeger [Fri, 14 Sep 2012 08:08:12 +0000 (10:08 +0200)]
WHATSNEW: Add major changes.

Karolin

11 years agoWHATSNEW: Add changes since 3.6.7.
Karolin Seeger [Fri, 14 Sep 2012 07:47:47 +0000 (09:47 +0200)]
WHATSNEW: Add changes since 3.6.7.

Karolin

11 years agos3: delete requests are not special
Volker Lendecke [Mon, 10 Sep 2012 09:25:03 +0000 (11:25 +0200)]
s3: delete requests are not special

The only difference between batch and exclusive oplocks is the time of
the check: Batch is checked before the share mode check, exclusive after.

Signed-off-by: Jeremy Allison <jra@samba.org>
Fix bug #9150 - Valid open requests can cause smbd assert due to incorrect
oplock handling on delete requests.

11 years agosysquota: we need to list nfs4 as a separate fs name for the sys_get_nfs_quota backend
Björn Jacke [Thu, 6 Sep 2012 05:58:00 +0000 (07:58 +0200)]
sysquota: we need to list nfs4 as a separate fs name for the sys_get_nfs_quota backend

at least the Linux kernel up to 3.5.0 lists NFSv4 aѕ nfs4 and not as nfs
(cherry picked from commit a6df44b3ae1ca6395d05e1af804a779d785358db)

Fix bug #9144 - nfs quota support not working with Linux nfs4 mounts.

11 years agos3:client use more access bits for snapshot display
Christian Ambach [Wed, 5 Sep 2012 13:07:54 +0000 (15:07 +0200)]
s3:client use more access bits for snapshot display

otherwise Windows server will reject the request for shadow copy enumeration
with access denied

The last 2 patches address bug #9137 - smbclient allinfo does not show snapshot
list.

11 years agos3:libsmb correctly set isFsctl for snapshot list
Christian Ambach [Thu, 30 Aug 2012 14:43:33 +0000 (16:43 +0200)]
s3:libsmb correctly set isFsctl for snapshot list

FSCTL_GET_SHADOW_COPY_DATA is a FSCTL, so set the isFsctl marker
otherwise smbclient allinfo will not report snapshots any more with the changes
made for Bug #8311

Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Thu Aug 30 18:57:24 CEST 2012 on sn-devel-104

11 years agos3-winbind: DON'T PANIC if we couldn't find the domain.
Andreas Schneider [Tue, 4 Sep 2012 12:30:38 +0000 (14:30 +0200)]
s3-winbind: DON'T PANIC if we couldn't find the domain.

If we don't have a connection to a trusted domain but still try to do a
lookup we shouldn't segfault.

Signed-off-by: Andreas Schneider <asn@samba.org>
Fix bug #9135 - Don't segfault if we don't find a domain in
resolve_username_to_alias()/fill_grent() .

11 years agoFix bug #9124 - Samba fails to set "inherited" bit on inherited ACE's.
Jeremy Allison [Wed, 29 Aug 2012 23:55:21 +0000 (16:55 -0700)]
Fix bug #9124 - Samba fails to set "inherited" bit on inherited ACE's.

Change se_create_child_secdesc() to handle inheritance correctly.

11 years agoWindows does canonicalization of inheritance bits. Do the same.
Jeremy Allison [Wed, 29 Aug 2012 20:40:29 +0000 (13:40 -0700)]
Windows does canonicalization of inheritance bits. Do the same.

We need to filter out the
SEC_DESC_DACL_AUTO_INHERITED|SEC_DESC_DACL_AUTO_INHERIT_REQ
bits. If both are set we store SEC_DESC_DACL_AUTO_INHERITED
as this alters whether SEC_ACE_FLAG_INHERITED_ACE is set
when an ACE is inherited. Otherwise we zero these bits out.
See:

http://social.msdn.microsoft.com/Forums/eu/os_fileservices/thread/11f77b68-731e-407d-b1b3-064750716531

for details.
(cherry picked from commit d02f39f97624260bd226977b30c80974d0ce0fe0)

11 years agoChange the other two places where we set a security descriptor given by the client...
Jeremy Allison [Wed, 29 Aug 2012 23:52:02 +0000 (16:52 -0700)]
Change the other two places where we set a security descriptor given by the client to got through set_sd(), the canonicalize sd function.

11 years agoRe-add set_sd(), called from set_sd_blob(). Allows us to centralize all ACL canonical...
Jeremy Allison [Wed, 29 Aug 2012 20:29:34 +0000 (13:29 -0700)]
Re-add set_sd(), called from set_sd_blob(). Allows us to centralize all ACL canonicalization. (cherry picked from commit 05734b67b8ed5516d81000eac48acd0915567629)

11 years agoRename set_sd() to set_sd_blob() - this describes what it does. (cherry picked from...
Jeremy Allison [Wed, 29 Aug 2012 20:23:06 +0000 (13:23 -0700)]
Rename set_sd() to set_sd_blob() - this describes what it does. (cherry picked from commit 61957ff9f6124eabae050f5425d7d0597ae6a127)

11 years agos3-smbd: Fix flooding the logs with records we don't find in pcap.
Andreas Schneider [Tue, 28 Aug 2012 12:17:22 +0000 (14:17 +0200)]
s3-smbd: Fix flooding the logs with records we don't find in pcap.

Signed-off-by: Andreas Schneider <asn@samba.org>
Fix bug #9112 - smbd.log is flooded by 'printer_list_get_printer: Failed to
fetch record!'.

11 years agoBug #9058] Files not deleted, smbstatus shows "Segmentation fault".
Jeremy Allison [Wed, 22 Aug 2012 18:05:19 +0000 (11:05 -0700)]
Bug #9058] Files not deleted, smbstatus shows "Segmentation fault".

Fix smbstatus code dump when a file entry has delete tokens.

11 years agos3-printing: fix bug 9123 lprng job tracking errors
David Disseldorp [Tue, 28 Aug 2012 16:58:24 +0000 (18:58 +0200)]
s3-printing: fix bug 9123 lprng job tracking errors

The lprng printing back-end is truncating the print job filename in the
lpq output, which means that Samba is not able to determine the back-end
job ID for a newly submitted print job.
Remove the unneeded spoolss job ID from the print job file name to
ensure the job filename is not truncated. Also log these warnings at a
higher log level.

11 years agos3-smbd: Initialize the print backend after we setup winreg.
Andreas Schneider [Tue, 28 Aug 2012 12:53:01 +0000 (14:53 +0200)]
s3-smbd: Initialize the print backend after we setup winreg.

The print backend init also migrates the printing tdb to winreg. For
this we need to setup the winreg pipe first.

Signed-off-by: Andreas Schneider <asn@samba.org>
Fix bug #9122 - winreg_printer_openkey: Could not open HKLM hive:
NT_STATUS_RPC_PROCNUM_OUT_OF_RANGE.

11 years agos4-torture: let torture_suite_add_ndr_pull_test always work with NDR_SCALARS|NDR_BUFF...
Günther Deschner [Tue, 28 Aug 2012 12:30:13 +0000 (14:30 +0200)]
s4-torture: let torture_suite_add_ndr_pull_test always work with NDR_SCALARS|NDR_BUFFERS flags.

I checked all the callers (one) that needs them.

Guenther

See bug #9026 - 3.6.6 upgrade from 3.5.x fails with "Couldn't migrate printers
tdb file: NT_STATUS_NO_MEMORY" for details.

11 years agos3: Fix bug #9085.
hargagan [Tue, 28 Aug 2012 07:29:52 +0000 (09:29 +0200)]
s3: Fix bug #9085.

NMB registration for a duplicate workstation fails with registration refuse.

11 years agos3: fix #9037 even more - open and netbsd have the md5 symbols in libc
Björn Jacke [Fri, 24 Aug 2012 19:13:45 +0000 (21:13 +0200)]
s3: fix #9037 even more - open and netbsd have the md5 symbols in libc

11 years agos3:smb2_ioctl: add some more validation checks
Stefan Metzmacher [Thu, 23 Aug 2012 16:46:27 +0000 (09:46 -0700)]
s3:smb2_ioctl: add some more validation checks

Based on a patch from Christian Ambach <ambi@samba.org>.

metze

The last 2 patches address bug #9058 - Files not deleted, smbstatus shows
"Segmentation fault".

11 years agoBackport FSCTL codes from master
Volker Lendecke [Thu, 23 Aug 2012 16:45:53 +0000 (09:45 -0700)]
Backport FSCTL codes from master

11 years agos3-libsmb: Remove obsolete smb_krb5_locate_kdc.
Andreas Schneider [Wed, 30 Nov 2011 16:58:30 +0000 (17:58 +0100)]
s3-libsmb: Remove obsolete smb_krb5_locate_kdc.

Signed-off-by: Günther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Fix bug #9111 - Fix compilation with newer MIT kerberos which hides internal
symbols.

11 years agos3: Fix #9037, BSD has -lmd instead of -lmd5
Volker Lendecke [Thu, 16 Aug 2012 18:10:41 +0000 (20:10 +0200)]
s3: Fix #9037, BSD has -lmd instead of -lmd5

11 years agoFix bug #9098 - winbind does not refresh kerberos tickets.
Jeremy Allison [Tue, 21 Aug 2012 18:24:58 +0000 (11:24 -0700)]
Fix bug #9098 - winbind does not refresh kerberos tickets.

Based on work from Ian Gordon <ian.gordon@strath.ac.uk>.
(cherry picked from commit 3f60bff699223a8895d060585f765706e167da37)

11 years agoFix bug #9104 - winbindd can mis-identify idle clients - can cause crashes and NDR...
Herb Lewis [Mon, 20 Aug 2012 21:51:28 +0000 (14:51 -0700)]
Fix bug #9104 - winbindd can mis-identify idle clients - can cause crashes and NDR parsing errors.

A connection is idle when both struct winbindd_cli_state->request AND
struct winbindd_cli_state->response are NULL. Otherwise we can flag
as idle a connection in the state of having sent the request to
the winbindd child (request != NULL) but not yet received a reply
(response == NULL).
(cherry picked from commit f6f27baa92a20d5beeee23b8e1e86f0c9ace85b8)

Signed-off-by: Jeremy Allison <jra@samba.org>
11 years agoEnsure we keep last_access up to date when processing a request.
Jeremy Allison [Mon, 20 Aug 2012 22:21:26 +0000 (15:21 -0700)]
Ensure we keep last_access up to date when processing a request.

11 years agoFix smbclient/tarmode panic on connecting to Windows 2000 clients.
Salvador I. Gonzalez [Sat, 11 Aug 2012 17:46:41 +0000 (13:46 -0400)]
Fix smbclient/tarmode panic on connecting to Windows 2000 clients.

  'Freed frame ../source3/libsmb/clilist.c:934, expected ../source3/client/clitar.c:821'
  Cause: (strequal(finfo->name,"..") || strequal(finfo->name,"."))
    evaluates to true, do_tar returns without freeing ctx

Fix bug #9088 - [PATCH] Freed frame ../source3/libsmb/clilist.c:934, expected
../source3/client/clitar.c:821.

11 years agos3-auth Use correct RID for domain guests primary group
Andrew Bartlett [Sun, 15 Jul 2012 04:38:18 +0000 (14:38 +1000)]
s3-auth Use correct RID for domain guests primary group

This was incorrect in commit 9dd7e7fc2d6d1aa7f3c3b741ac134e087ce808fd
as the RID was from the BUILTIN domain, but this creates a guest
account token for the real domain.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Jul 19 05:56:28 CEST 2012 on sn-devel-104

Fix bug #9067 - Domain Guest have wrong primary group RID.

11 years agoRevert "s3:auth make sure the primary group sid is usable"
Andrew Bartlett [Sun, 15 Jul 2012 02:22:44 +0000 (12:22 +1000)]
Revert "s3:auth make sure the primary group sid is usable"

This reverts commit 00089fd74af740f832573d904312854e494a869e.

The issue with this patch, which I did sign off on, is that for the
domain member case, we already know that the SID is reasonable and
valid, and we indeed rely on that, because we keep it as an additonal
group anyway.  The primary group is not so special that we need to do
extra validation.

Calling this function may put a user into the domain 'domain users'
group, even if they are not in that group to start with.

Andrew Bartlett

Fix bug #9066 - Domain Users incorrectly added as addition group on domain
members.

11 years agos3: Fix a crash in reply_lockingX_error
Volker Lendecke [Tue, 7 Aug 2012 23:49:52 +0000 (16:49 -0700)]
s3: Fix a crash in reply_lockingX_error

A timed brlock with 2 locks comes in and the second one blocks,
file is closed. smbd_cancel_pending_lock_requests_by_fid sets
blr->fsp to NULL. reply_lockingX_error (called via
MSG_SMB_BLOCKING_LOCK_CANCEL) deferences blr->fsp because
blr->lock_num==1 (the second one blocked).

This patch fixes the bug by only undoing the locks if fsp!=NULL.
fsp==NULL is the close case where everything is undone anyway.

Thanks to Peter Somogyi, somogyi@hu.ibm.com for this bug report.

Fix bug #9084 - Blocking lock followed by close can crash smbd.

11 years agoFix bug 9065: source3/registry/regfio.c: bad call to memcpy
David Binderman [Tue, 24 Jul 2012 22:46:10 +0000 (15:46 -0700)]
Fix bug 9065: source3/registry/regfio.c: bad call to memcpy

Signed-off-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 2575cd4f189d28e7d4def211a89348ab7e515e83)

11 years agoWHASTNEW: Start release notes for Samba 3.6.8.
Karolin Seeger [Mon, 6 Aug 2012 18:05:13 +0000 (20:05 +0200)]
WHASTNEW: Start release notes for Samba 3.6.8.

Karolin

11 years agoVERSION: Bump version number up to 3.6.8.
Karolin Seeger [Mon, 6 Aug 2012 18:02:52 +0000 (20:02 +0200)]
VERSION: Bump version number up to 3.6.8.

Karolin

11 years agoWHATSNEW: Add latest changes to the release notes.
Karolin Seeger [Mon, 30 Jul 2012 17:10:53 +0000 (19:10 +0200)]
WHATSNEW: Add latest changes to the release notes.

Karolin

11 years agos4-torture: add ntprinting ndr operations testsuite.
Günther Deschner [Fri, 6 Jul 2012 17:02:00 +0000 (19:02 +0200)]
s4-torture: add ntprinting ndr operations testsuite.

Guenther

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Jul  6 20:55:26 CEST 2012 on sn-devel-104
(cherry picked from commit 4cafbb4e7443779ab1c58581709114db9a7bf918)

The last 4 patches address bug #9026 - 3.6.6 upgrade from 3.5.x fails with
"Couldn't migrate printers tdb file: NT_STATUS_NO_MEMORY".

11 years agontprinting: mark the final 4 byte null pointer for printer data in ndr_pull_ntprintin...
Günther Deschner [Fri, 6 Jul 2012 16:22:36 +0000 (18:22 +0200)]
ntprinting: mark the final 4 byte null pointer for printer data in ndr_pull_ntprinting_printer as read.

Guenther
(cherry picked from commit 8835eab013ea1c8919dd6aafda090733f6224535)

11 years agondr: fix push/pull DATA_BLOB with NDR_NOALIGN
David Disseldorp [Fri, 6 Jul 2012 12:00:27 +0000 (14:00 +0200)]
ndr: fix push/pull DATA_BLOB with NDR_NOALIGN

This change addresses bug 9026.
There are 3 use cases for DATA_BLOB marshalling/unmarshalling:

1)
ndr_push_DATA_BLOB and ndr_pull_DATA_BLOB when called with
LIBNDR_FLAG_ALIGN* alignment flags set, are used to push/pull padding
bytes _only_. The length is determined by the alignment required and
the current ndr offset.
e.g. dcerpc.idl:
        typedef struct {
...
                [flag(NDR_ALIGN8)]    DATA_BLOB _pad;
        } dcerpc_request;

2)
When called with the LIBNDR_FLAG_REMAINING flag, all remaining bytes in
the ndr buffer are pushed/pulled.
e.g. dcerpc.idl:
        typedef struct {
...
                [flag(NDR_REMAINING)] DATA_BLOB stub_and_verifier;
        } dcerpc_request;

3)
When called without alignment flags, push/pull a uint32 length _and_ a
corresponding byte array to/from the ndr buffer.
e.g. drsblobs.idl
        typedef [public] struct {
...
                DATA_BLOB data;
        } DsCompressedChunk;

The fix for bug 8373 changed the definition of "alignment flags", such
that when called with LIBNDR_FLAG_NOALIGN ndr_push/pull_DATA_BLOB
behaves as (1: padding bytes) rather than (3: uint32 length + byte
array).

This breaks marshalling/unmarshalling for the following structures.
eventlog.idl:
        typedef [flag(NDR_NOALIGN|NDR_PAHEX),public] struct {
...
                DATA_BLOB sid;
...
        } eventlog_Record_tdb;

ntprinting.idl:
        typedef [flag(NDR_NOALIGN),public] struct {
...
                DATA_BLOB *nt_dev_private;
        } ntprinting_devicemode;

        typedef [flag(NDR_NOALIGN),public] struct {
...
                DATA_BLOB data;
        } ntprinting_printer_data;

Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 0d3249b927465fdca1765cbd7e17c947364b5ef0)

11 years agontprinting: make decode_ntprinting helpers public in idl.
Günther Deschner [Fri, 6 Jul 2012 16:04:33 +0000 (18:04 +0200)]
ntprinting: make decode_ntprinting helpers public in idl.

Guenther
(cherry picked from commit 66514f8bbe5f9e2dcd8be90450ef339305a3161c)

11 years agoWHATSNEW: Add changes since 3.6.6.
Karolin Seeger [Thu, 26 Jul 2012 17:50:09 +0000 (19:50 +0200)]
WHATSNEW: Add changes since 3.6.6.

Karolin

11 years agoFix bug 9062: cmd_lsarpc.c:1171: bad call to data_blob_const
David Binderman [Mon, 23 Jul 2012 22:25:57 +0000 (15:25 -0700)]
Fix bug 9062: cmd_lsarpc.c:1171: bad call to data_blob_const

Signed-off-by: Jeremy Allison <jra@samba.org>
11 years agoUse ippGet/ippSet (accessors) for IPP API.
Jiri Popelka [Fri, 20 Jul 2012 18:53:31 +0000 (11:53 -0700)]
Use ippGet/ippSet (accessors) for IPP API.

CUPS 1.6 makes various structures private and
introduces these ippGet and ippSet functions
for all of the fields in these structures.
http://www.cups.org/str.php?L3928

We define our own accessors when CUPS < 1.6.

Modified for 3.6.x by Jeremy Allison.

Signed-off-by: Jeremy Allison <jra@samba.org>
Fix bug #9055 - doesn't build against CUPS 1.6.