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

Karolin
(cherry picked from commit 54233b5eecb6a29641e69d5fe36be9a3ad7b9dc2)

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".
(cherry picked from commit 25745ccc264ff4c649a778fc18ff7fb60ca80333)

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)
(cherry picked from commit 91bf5dc455faf0741dd74243e73f922683f5a5ab)

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)
(cherry picked from commit 896e312c8067f5d14a7fbf6b8b810c7a61bf26e2)

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)
(cherry picked from commit 23a5cbc7311090d93584acc12ce52a49993cfdec)

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
(cherry picked from commit 5c57ea4fd6af0b520dd3cabc57f07cc94f95b468)

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>
(cherry picked from commit db007b46222c02e23fb9566128ee436ad6c11bf9)

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.
(cherry picked from commit 684f83433d9697137aab9d8516ad2155929e15bf)

11 years agoFix bug #9037 - Name clash in MD5 cause...
Jura Sasek [Tue, 24 Jul 2012 18:58:58 +0000 (20:58 +0200)]
Fix bug #9037 - Name clash in MD5 cause...

... the "net ads join" fails on T4 (sun4v) systems on Solaris 10.
(cherry picked from commit c6673d9d2161ff1d8491f6cbc0b6ea0be03cdf4d)

11 years agos3-winbind: Fix bug #9052 resolving our own "Domain Local" groups.
Andreas Schneider [Sat, 21 Jul 2012 00:12:09 +0000 (17:12 -0700)]
s3-winbind: Fix bug #9052 resolving our own "Domain Local" groups.

We don't resolve our own "Domain Local" groups since bug #7843 has been
fixed. So we need to add the add resource groups to the sid list too.

Before bug #7843 the "Domain Local" groups were added with a
lookupuseraliases call, but this isn't done anymore for our domain
so we need to resolve resource groups here.

When to use Resource Groups:
http://technet.microsoft.com/en-us/library/cc753670%28v=WS.10%29.aspx

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

11 years agos3-printing: fix broken print_job_get_name() return
David Disseldorp [Tue, 26 Jun 2012 23:23:57 +0000 (01:23 +0200)]
s3-printing: fix broken print_job_get_name() return

The last 18 patches address bug #8719 - printing fails in function
cups_job_submit.
(cherry picked from commit 7ea0c96fe47f3d1b753b5f6cf9591e70eacf502b)

11 years agos3-torture: Use static printer for smbd spooler test
David Disseldorp [Fri, 22 Jun 2012 16:49:50 +0000 (18:49 +0200)]
s3-torture: Use static printer for smbd spooler test
(cherry picked from commit e0e0f30958f9cd4dbc8faba901216869bb6601e5)

11 years agos3-printing: use euid for vlp job tracking
David Disseldorp [Thu, 21 Jun 2012 13:49:55 +0000 (15:49 +0200)]
s3-printing: use euid for vlp job tracking

vlp can be called by print_run_command as root with euids set
appropriately, vlp should use this to track the job owner.
(cherry picked from commit 32584347e93e5ff219cce4dd8e13bf8b2868072c)

11 years agos3-printing: fill print_generic sysjob id on job submission
David Disseldorp [Thu, 9 Feb 2012 11:08:27 +0000 (12:08 +0100)]
s3-printing: fill print_generic sysjob id on job submission

Change the generic print backend to fill the printing backend job
identifier (sysjob) on submission of a new job.
This is needed to ensure correct mapping of spoolss jobs and entries in
the backend print queue.

This and the last 13 commits attempt to address bug 8719.
(cherry picked from commit 76c101c151303c6063623f5f72073e3af50c3eeb)

11 years agos3-printing: pass lpq command to job_submit
David Disseldorp [Wed, 8 Feb 2012 17:47:11 +0000 (18:47 +0100)]
s3-printing: pass lpq command to job_submit

Currently the generic print backend does not fill the printing backend
job identifier (sysjob) on submission of a new job. The sysjob
identifier is required to correctly map jobs in the printer queue to
corresponding spoolss print jobs.

Passing the lpq command to job_submit allows the generic print backend
to check the printer queue for the new job following submission. This
behaviour will come in a later commit.
(cherry picked from commit 7531533e797a2421b5b1a7b383fbddc70ccad34b)

11 years agos3-printing: remove unused print_job_fname()
David Disseldorp [Wed, 8 Feb 2012 16:03:06 +0000 (17:03 +0100)]
s3-printing: remove unused print_job_fname()
(cherry picked from commit f831a9bdbdddd77c3e7ea7e5ae1653567ee12ceb)

11 years agos3-printing: pass a talloc ctx to unpack_pjob
David Disseldorp [Wed, 8 Feb 2012 16:57:02 +0000 (17:57 +0100)]
s3-printing: pass a talloc ctx to unpack_pjob

Rather than allocating the devicemode on a null context.
(cherry picked from commit 9ec5b7b9e2d8ac42e4172cbabb7a3b57c1f7ba39)

11 years agos3-printing: return talloced print jobs
David Disseldorp [Wed, 8 Feb 2012 15:55:40 +0000 (16:55 +0100)]
s3-printing: return talloced print jobs

print_job_find() currently returns print jobs to callers via a
statically allocated variable, this is particularly messy as the
device mode is talloced under the static variable.

This change adds or passes a talloc context to all callers, giving them
ownership of the returned print job.
(cherry picked from commit 9d481ce29b1f47ffda2696862109eebfe942097c)

11 years agos3-printing: clean up print_job_pause/resume interface
David Disseldorp [Wed, 8 Feb 2012 14:01:15 +0000 (15:01 +0100)]
s3-printing: clean up print_job_pause/resume interface

Currently both return a bool and sometimes set a werr pointer argument,
always return werror instead.
(cherry picked from commit 7ba7b3678cd505dc4ccef25b6fc4db7bd4cc3442)

11 years agos3-printing: fix potential print db refcount leak
David Disseldorp [Wed, 8 Feb 2012 12:45:40 +0000 (13:45 +0100)]
s3-printing: fix potential print db refcount leak
(cherry picked from commit 41d935744a03435337a90ab1477a7a54f96ca972)

11 years agos3-spoolss: remove duplicate "." in smbd spooler path
David Disseldorp [Wed, 1 Feb 2012 12:21:04 +0000 (13:21 +0100)]
s3-spoolss: remove duplicate "." in smbd spooler path
(cherry picked from commit df9a97b81f2a5520ed0ef79d9aeb3a014799e89c)

11 years agos3-printing: remove print_parse_jobid()
David Disseldorp [Mon, 30 Jan 2012 16:35:28 +0000 (17:35 +0100)]
s3-printing: remove print_parse_jobid()

With all callers fixed, it is now safe to remove.
(cherry picked from commit bb3b4890c77bcf1c50f4f27f10e5f5812ae24a76)

11 years agos3-printing: remove redundant variable set
David Disseldorp [Mon, 30 Jan 2012 15:05:21 +0000 (16:05 +0100)]
s3-printing: remove redundant variable set
(cherry picked from commit bf00b2155bc3e42946a3b2c6b9f88606b77f4bc8)

11 years agos3-printing: remove print_parse_jobid() calls from printing.c
David Disseldorp [Mon, 30 Jan 2012 12:35:21 +0000 (13:35 +0100)]
s3-printing: remove print_parse_jobid() calls from printing.c

In all cases the spoolss layer job id can be determinded from the
printing subsystem allocated job identifier (sysjob).
(cherry picked from commit dd1a076efe8c2118827c04d8f276b85893888be7)

11 years agos3-printing: rename queue->job sysjob
David Disseldorp [Fri, 27 Jan 2012 11:33:27 +0000 (12:33 +0100)]
s3-printing: rename queue->job sysjob

Print jobs maintain two job identifiers, the jobid allocated by the
spoolss layer (pj->jobid), and the job identifier defined by the
printing backend (pj->sysjob).

Printer job queues currently only contain a single job identifier
variable (queue->job), the variable is sometimes representative of the
spoolss layer job identifier, and more often representative of the
printing backend id.

This change renames the queue job identifier from queue->job to
queue->sysjob, in preparation for a change to only store the printing
backend identifier.
(cherry picked from commit 5aeda94f201ce8794d09f16a314b4044c5370f07)

11 years agos3-printing: remove print_parse_jobid() from print_cups.c
David Disseldorp [Mon, 30 Jan 2012 12:44:33 +0000 (13:44 +0100)]
s3-printing: remove print_parse_jobid() from print_cups.c

The spoolss print job identifier is now passed to the cups layer via
struct printjob, therefore it is no longer necessary to parse the job
filename to determine it.
(cherry picked from commit 4dea77df91c418633a2a411fd5be2cc9bb3a8eea)

11 years agos3-printing: store print jobid as part of struct printjob
David Disseldorp [Thu, 26 Jan 2012 14:28:34 +0000 (15:28 +0100)]
s3-printing: store print jobid as part of struct printjob

Printing code in some places relies upon the spool-file format to
retrieve the print jobid. By storing the jobid as part of struct
printjob, and hence in the printing TDB, we can move away from this ugly
behaviour.
(cherry picked from commit 994da027ee96811e2d5a025b667d8c6f85442ada)

11 years agotorture: add test for smbd print job spooling
David Disseldorp [Thu, 21 Jun 2012 15:12:23 +0000 (17:12 +0200)]
torture: add test for smbd print job spooling

Clients can print by performing file IO on a printer share, rather than
issuing spoolss RPCs.
This commit attempts to reproduce bug 8719.
(cherry picked from commit 8b25aa4feb00c6b9a1a7e5fdd61ffffa9fc4d1f5)

11 years agos3:smb2_server: implement credit granting similar to windows
Stefan Metzmacher [Wed, 27 Jun 2012 13:33:43 +0000 (15:33 +0200)]
s3:smb2_server: implement credit granting similar to windows

This makes it much easier to compare traces.

metze
(cherry picked from commit 648b959b13224105addaae483823bc422ed1cc21)

The last 10 patches address bug #9057 - SMB2 credit handling code has bugs.
(cherry picked from commit 8ce206519c34e95ec5222e50513dd253c673d11c)

11 years agos3:smb2_server: make sure sequence numbers don't wrap at UINT64_MAX
Stefan Metzmacher [Wed, 27 Jun 2012 13:33:43 +0000 (15:33 +0200)]
s3:smb2_server: make sure sequence numbers don't wrap at UINT64_MAX

metze
(cherry picked from commit 82dc0b33b9af5094d78f3ecd855900e49c580343)
(cherry picked from commit 09e26d6a177d82d7b73e632956f912edfcb874bb)

11 years agos3:smb2_server: make sure we don't grant more credits than we allow
Stefan Metzmacher [Wed, 27 Jun 2012 13:33:43 +0000 (15:33 +0200)]
s3:smb2_server: make sure we don't grant more credits than we allow

If the client hasn't consumed the lowest seqnum, but the distance
between lowest and highest seqnum has reached max credits.

In that case we should stop granting credits.

metze
(similar to commit ee8ae459aea6879377b5510851a6dc673cf72aad)
(cherry picked from commit c96dc10849c52cae7d3bfddce212a2595563081e)

11 years agos3:smb2_server: check the already granted credits like in the master branch
Stefan Metzmacher [Tue, 26 Jun 2012 12:28:07 +0000 (14:28 +0200)]
s3:smb2_server: check the already granted credits like in the master branch

metze

Backport of: s3:smb2_server: check the credit_charge against the already granted credits
(similar to commit 4fe41c0bb14f6ae7e52aa7f180e66c7695eb6fa0)
(cherry picked from commit c3559ee48fe3da59dba3b5afb69a45ef15475fa0)

11 years agos3:smb2_server: split out a smb2_validate_sequence_number() function
Stefan Metzmacher [Mon, 25 Jun 2012 21:17:55 +0000 (23:17 +0200)]
s3:smb2_server: split out a smb2_validate_sequence_number() function

metze
(similar to commit 984fdaf9149d96d0d28600443981d87d13eb355c)
(cherry picked from commit 4391a14adca1c94016318b6890129f842b9ae1e7)

11 years agos3:smb2_server: clear sequence window if we got the lowest sequence id
Stefan Metzmacher [Tue, 26 Jun 2012 06:08:37 +0000 (08:08 +0200)]
s3:smb2_server: clear sequence window if we got the lowest sequence id

Otherwise we'll never consume sequence id '0'.

metze
(similar to commit d6e7a76461ad7582efa510676aa2bea230ea9f02)
(cherry picked from commit d9d25dedad4b64d5562f451b645e2dfab89d8c13)

11 years agos3:smb2_server: fix calculation of the next bitmap_offset
Stefan Metzmacher [Tue, 26 Jun 2012 07:12:44 +0000 (09:12 +0200)]
s3:smb2_server: fix calculation of the next bitmap_offset

metze
(similar to commit bd6d415cae550e97e04830eecefa2881b497de89)
(cherry picked from commit 492f0878e49c141f31bb076c906c52131d7660ab)

11 years agos3:smb2_server: remove unused and confusing DEFAULT_SMB2_MAX_CREDIT_BITMAP_FACTOR
Stefan Metzmacher [Tue, 26 Jun 2012 07:11:23 +0000 (09:11 +0200)]
s3:smb2_server: remove unused and confusing DEFAULT_SMB2_MAX_CREDIT_BITMAP_FACTOR

metze
(similar to commit d1ee774ed0b4b3882b4b85da16d9bb9c082a0c49)
(cherry picked from commit 4bea48ff5a6c23818082b6b42401c72d892de51a)

11 years agos3:smb2_server: call smbd_smb2_request_validate() also in smbd_smb2_first_negprot()
Stefan Metzmacher [Mon, 25 Jun 2012 21:14:24 +0000 (23:14 +0200)]
s3:smb2_server: call smbd_smb2_request_validate() also in smbd_smb2_first_negprot()

We need to consume message_id 0, for SMB1 negprot starts.

metze
(cherry picked from commit 925994e42eba5b72ce605b68e8980adc1b5ecd83)
(cherry picked from commit aa2965377a6156c74692829763f950f85a48f5f7)

11 years agos3:smb2_server: start the connection with one credit granted to the client
Stefan Metzmacher [Tue, 26 Jun 2012 12:23:12 +0000 (14:23 +0200)]
s3:smb2_server: start the connection with one credit granted to the client

metze
(cherry picked from commit 0b8eac9b79197c4659a5738f1b9399b3c88f2f8d)
(cherry picked from commit 138535dfc528ed66295991d10d063dbfd1a78ced)

11 years agos3: Make us survive smb2.lock.rw-shared with aio enabled
Volker Lendecke [Fri, 13 Jul 2012 06:38:07 +0000 (08:38 +0200)]
s3: Make us survive smb2.lock.rw-shared with aio enabled

schedule_aio_smb2_write can return NT_STATUS_FILE_LOCK_CONFLICT.
This is a valid error code that smb2.lock.rw-shared expects and
checks for. The code before this patch maps this to NT_STATUS_FILE_CLOSED,
masking the real, correct error message.

Fix bug #9040 - Using asynchronous IO with SMB2 can return NT_STATUS_FILE_CLOSED
in error instead ofNT_STATUS_FILE_LOCK_CONFLICT.
(cherry picked from commit 9c69a2359107b7c31feb03b9971e08645205e400)

11 years agoFix bug #9034 - Typo in set_re_uid() call when USE_SETRESUID selected in configure.
Jeremy Allison [Wed, 11 Jul 2012 04:13:03 +0000 (21:13 -0700)]
Fix bug #9034 - Typo in set_re_uid() call when USE_SETRESUID selected in configure.

Previous code only set the real euid, not the effective one. This is not a security issue
as this is *only* used in the quota code, and only between code that brackets
it with save_re_uid()/restore_re_uid(), Also this is not used on most platforms
(we use USE_SETREUID by preference) but it's better to have this right.
(cherry picked from commit ceed322622b46be3745b32a5f6a02e634bfe1789)

11 years agos3:vfs_gpfs: be less verbose in get/set_xattr functions
Stefan Metzmacher [Thu, 22 Dec 2011 13:20:32 +0000 (14:20 +0100)]
s3:vfs_gpfs: be less verbose in get/set_xattr functions

metze

Signed-off-by: Christian Ambach <ambi@samba.org>
(cherry picked from commit 2e95d8048b9e9c7025ddada7ede15494e6016ba9)

Fix bug #9022 - vfs_gpfs is very verbose in get/set_xattr functions.
(cherry picked from commit 3abaa9dd8a2af9497dfc6afd6f93a638956c1c3a)

11 years agos3-vfs_gpfs: Fix bug #9003, posix acl on gpfs
Volker Lendecke [Fri, 22 Jun 2012 13:46:13 +0000 (15:46 +0200)]
s3-vfs_gpfs: Fix bug #9003, posix acl on gpfs

gpfs2smb_acl can leave errno!=0 around even if it returned a correct
result!=NULL. We can only rely on errno being set if another error
condition (in this case result==NULL) indicates an error. If
result!=NULL, errno is undefined and can be anything. This leads to
SAFE_FREE(result) further down even in the success case.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun 22 19:27:39 CEST 2012 on sn-devel-104
(cherry picked from commit e7b58146d8576ae8bf4eaf2ec1063fe7697e05b8)
(cherry picked from commit bea2d3d007cef5643e863d2d4a80f0ea72461ec3)

11 years agos3:winbindd: don't turn negative cache entries into valid idmappings (bug #9002)
Stefan Metzmacher [Tue, 19 Jun 2012 15:57:19 +0000 (17:57 +0200)]
s3:winbindd: don't turn negative cache entries into valid idmappings (bug #9002)

It's typical that some file operations set a NTACL, which tries
sid2uid() before sid2gid(), this will create a negative cache entry.

Negative SID2UID entries cause that a valid SID2GID mapping is ignored
and the group is ignored in the UNIX Token.

metze
(cherry picked from commit 65cc848fde9e383afa0c9eff78e66d6cd57aea18)

11 years agos3:passdb: don't turn negative cache entries into valid idmappings (bug #9002)
Stefan Metzmacher [Tue, 19 Jun 2012 15:57:19 +0000 (17:57 +0200)]
s3:passdb: don't turn negative cache entries into valid idmappings (bug #9002)

It's typical that some file operations set a NTACL, which tries
sid2uid() before sid2gid(), this will create a negative cache entry.

Negative SID2UID entries cause that a valid SID2GID mapping is ignored
and the group is ignored in the UNIX Token.

metze
(cherry picked from commit e19d064b2a23ec083da06fa56af47be694152442)

11 years agos3:winbindd: do not expose negative cache idmap entries as valid mappings (bug #9002)
Stefan Metzmacher [Thu, 24 May 2012 07:08:21 +0000 (09:08 +0200)]
s3:winbindd: do not expose negative cache idmap entries as valid mappings (bug #9002)

metze
(cherry picked from commit a1a0babdbd89b229a9d539993c2ad3791b654952)

11 years agos3:winbindd: discard the expired gid cache if we're online (bug #9002)
Stefan Metzmacher [Fri, 2 Mar 2012 04:08:17 +0000 (05:08 +0100)]
s3:winbindd: discard the expired gid cache if we're online (bug #9002)

This matches the uid case...

metze
(cherry picked from commit 19b0db85cde6fc4affa1dec19bd39adf862dbf8c)

11 years agos3: fix build without ads support
Björn Jacke [Wed, 13 Jun 2012 17:28:06 +0000 (19:28 +0200)]
s3: fix build without ads support

when we have no ads support we don't have the ads_get_sid_token symbol used in
this unused code :-)

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Jun 13 21:20:15 CEST 2012 on sn-devel-104
(cherry picked from commit 43c56dc4255a7a6cbd176e6ae66a7652c6d72d2c)

Fix bug #8996 - build without ads support (e.g. plain solaris 8) broken.
(cherry picked from commit 9aa0c85e84b1e66142b65631a244aec8b2111bbc)

11 years agoFix bug #8974 - Kernel oplocks are broken when uid(file) != uid(process).
Jeremy Allison [Wed, 20 Jun 2012 22:50:00 +0000 (15:50 -0700)]
Fix bug #8974 - Kernel oplocks are broken when uid(file) != uid(process).

Based on a fix from "Etienne Dechamps " <e-t172@akegroup.org>
(cherry picked from commit 0e2fb6c69e971c7502fabe17fa71d1453dda18a6)

11 years agos3: Correct documentation of case sensitive
Olaf Flebbe [Fri, 28 Oct 2011 07:59:07 +0000 (09:59 +0200)]
s3: Correct documentation of case sensitive

this fixes bug #8552

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Jun 22 21:59:59 CEST 2012 on sn-devel-104
(cherry picked from commit 8558e321c5fc7eab94f47b243024e0439dfe1378)
(cherry picked from commit 1f19c2de580b04fe9e3038c879c80d8a54ce828f)

11 years agoSame fix as bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does...
Jeremy Allison [Mon, 18 Jun 2012 23:24:12 +0000 (16:24 -0700)]
Same fix as bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does not send correct responses to NT Transact Secondary when no data and no params

for the Trans2 calls. See MS-CIFS 2.2.4.47.2 for details.
(cherry picked from commit d5c01dc502e02cde12abc939afd48519d38c09a9)

11 years agoFix Bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does not send...
Jeremy Allison [Mon, 18 Jun 2012 23:23:13 +0000 (16:23 -0700)]
Fix Bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does not send correct responses to NT Transact Secondary when no data and no params

Found by Richard Sharpe <realrichardsharpe@gmail.com>. The correct
command code in a reply to NT Transact Secondary (0xa1) is
NT Transact (0xa0).
(cherry picked from commit 115f5af9a89a20929f02578c08a34ae2736951dd)

11 years agoWHATSNEW: Start release notes for Samba 3.6.7.
Karolin Seeger [Mon, 25 Jun 2012 19:41:27 +0000 (21:41 +0200)]
WHATSNEW: Start release notes for Samba 3.6.7.

Karolin
(cherry picked from commit 0d6ff037ed20955fc7f51421f50ef9bd8dd70e29)

11 years agoVERSION: Bump version number up to 3.6.7.
Karolin Seeger [Mon, 25 Jun 2012 19:38:36 +0000 (21:38 +0200)]
VERSION: Bump version number up to 3.6.7.

Karolin
(cherry picked from commit ec871778faab35b00ba8649ae6689afe486f4ecf)

11 years agoWHATSNEW: Break line properly. samba-3.6.6
Karolin Seeger [Sun, 24 Jun 2012 17:19:19 +0000 (19:19 +0200)]
WHATSNEW: Break line properly.

Karolin
(cherry picked from commit dd4a51406cc5789e984aab4861e9276448fccf60)

11 years agoWHATSNEW: Add more changes since 3.6.5.
Karolin Seeger [Sat, 23 Jun 2012 19:58:06 +0000 (21:58 +0200)]
WHATSNEW: Add more changes since 3.6.5.

Karolin
(cherry picked from commit 1efdc5fb619c8740bc5d17fb73e22f7db5d07ac8)

11 years agos3:smbd: use fsp_persistent_id() as persistent_file_id part for SMB2 (bug #8995)
Stefan Metzmacher [Wed, 13 Jun 2012 10:13:01 +0000 (12:13 +0200)]
s3:smbd: use fsp_persistent_id() as persistent_file_id part for SMB2 (bug #8995)

It seems to be important to have unique persistent file ids,
because windows clients seem to index files by server_guid + persistent_file_id.
Which may break, if we just have a 16-bit range per connection
and the client connects multiple times.

Based on code from Ira Cooper. Use fsp->fh->gen_id as the persistent
fileid in SMB2.

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Jun 14 22:04:13 CEST 2012 on sn-devel-104

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

11 years agos3:smbd: add a fsp_persistent_id() function
Stefan Metzmacher [Thu, 14 Jun 2012 08:32:43 +0000 (10:32 +0200)]
s3:smbd: add a fsp_persistent_id() function

This calculates a 64-bit value that most likely uniquely identifies
the files_struct globally to the server.

* 32-bit random gen_id
* 16-bit truncated open_time
* 16-bit fnum (valatile_id)

Based on code from Ira Cooper. Use fsp->fh->gen_id as the persistent
fileid in SMB2.

Pair-Programmed-With: Michael Adam <obnox@samba.org>

metze

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

11 years agos3:smbd: try to make fsp->fh->gen_id as globally unique as possible
Stefan Metzmacher [Wed, 13 Jun 2012 10:11:51 +0000 (12:11 +0200)]
s3:smbd: try to make fsp->fh->gen_id as globally unique as possible

This makes sure the value is never 0, it's between 1 and UINT32_MAX.

While fsp->fh->gen_id is 'unsigned long' currently (which might by 8 bytes),
there's some oplock code which truncates it to uint32_t (using IVAL()).

Which means we could reuse fsp->fh->gen_id as persistent file id
until we have a final fix, which uses database.

See bug #8995 for more details.

Based on code from Ira Cooper. Ensure fsp->fh->gen_id starts from
a random point. We will use this as the SMB2 persistent_id.

metze

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

11 years agoRevert "s3:smbd: set req->smb2req->compat_chain_fsp in file_fsp()"
Stefan Metzmacher [Sat, 9 Jun 2012 09:11:26 +0000 (11:11 +0200)]
Revert "s3:smbd: set req->smb2req->compat_chain_fsp in file_fsp()"

This reverts commit c2716a7d5ccf78f9716b703c22e6cf4d4f179656.

This is not needed anymore, as we have file_fsp_smb2() now.

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Jun 10 18:04:21 CEST 2012 on sn-devel-104

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

11 years agos3:smb2_ioctl: make use of file_fsp_smb2()
Stefan Metzmacher [Fri, 15 Jun 2012 20:42:27 +0000 (13:42 -0700)]
s3:smb2_ioctl: make use of file_fsp_smb2()

metze

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

11 years agos3:smb2_lock: make use of file_fsp_smb2()
Stefan Metzmacher [Fri, 8 Jun 2012 09:57:21 +0000 (11:57 +0200)]
s3:smb2_lock: make use of file_fsp_smb2()

metze

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

11 years agos3:smb2_write: make use of file_fsp_smb2()
Stefan Metzmacher [Fri, 15 Jun 2012 20:31:59 +0000 (13:31 -0700)]
s3:smb2_write: make use of file_fsp_smb2()

metze

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

11 years agos3:smb2_read: make use of file_fsp_smb2()
Stefan Metzmacher [Fri, 15 Jun 2012 20:29:24 +0000 (13:29 -0700)]
s3:smb2_read: make use of file_fsp_smb2()

metze

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

11 years agos3:smb2_notify: make use of file_fsp_smb2()
Stefan Metzmacher [Fri, 15 Jun 2012 20:27:55 +0000 (13:27 -0700)]
s3:smb2_notify: make use of file_fsp_smb2()

metze

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

11 years ago3:smb2_setinfo: make use of file_fsp_smb2()
Stefan Metzmacher [Fri, 15 Jun 2012 20:25:11 +0000 (13:25 -0700)]
3:smb2_setinfo: make use of file_fsp_smb2()

metze

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

11 years agos3:smb2_getinfo: make use of file_fsp_smb2()
Stefan Metzmacher [Fri, 15 Jun 2012 20:23:47 +0000 (13:23 -0700)]
s3:smb2_getinfo: make use of file_fsp_smb2()

metze

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

11 years agos3:smb2_find: make use of file_fsp_smb2()
Stefan Metzmacher [Fri, 8 Jun 2012 08:42:43 +0000 (10:42 +0200)]
s3:smb2_find: make use of file_fsp_smb2()

metze

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

11 years agos3:smb2_break: make use of file_fsp_smb2()
Stefan Metzmacher [Fri, 8 Jun 2012 08:36:24 +0000 (10:36 +0200)]
s3:smb2_break: make use of file_fsp_smb2()

metze

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

11 years agos3:smb2_close: make use of file_fsp_smb2()
Stefan Metzmacher [Fri, 15 Jun 2012 20:15:27 +0000 (13:15 -0700)]
s3:smb2_close: make use of file_fsp_smb2()

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

11 years agos3:smb2_flush: make use of file_fsp_smb2()
Stefan Metzmacher [Fri, 15 Jun 2012 19:55:52 +0000 (12:55 -0700)]
s3:smb2_flush: make use of file_fsp_smb2()

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

11 years agos3:smbd: add file_fsp_smb2()
Stefan Metzmacher [Fri, 8 Jun 2012 08:11:57 +0000 (10:11 +0200)]
s3:smbd: add file_fsp_smb2()

metze

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

11 years agos3:smb2_write: pass fsp->fnum to init_strict_lock_struct()
Stefan Metzmacher [Fri, 8 Jun 2012 09:19:00 +0000 (11:19 +0200)]
s3:smb2_write: pass fsp->fnum to init_strict_lock_struct()

fsp->fnum is the same as in_file_id_volatile.

When we start to support durable handles we should pass
in_file_id_persistent.

metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat Jun  9 18:50:32 CEST 2012 on sn-devel-104

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

11 years agos3:smb2_read: pass fsp->fnum to init_strict_lock_struct()
Stefan Metzmacher [Fri, 8 Jun 2012 09:19:00 +0000 (11:19 +0200)]
s3:smb2_read: pass fsp->fnum to init_strict_lock_struct()

fsp->fnum is the same as in_file_id_volatile.

When we start to support durable handles we should pass
in_file_id_persistent.

metze

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

11 years agos3:smb2_lock: use fsp->fnum as locking context
Stefan Metzmacher [Fri, 8 Jun 2012 09:19:00 +0000 (11:19 +0200)]
s3:smb2_lock: use fsp->fnum as locking context

fsp->fnum is the same as in_file_id_volatile.

When we start to support durable handles we should pass
in_file_id_persistent.

metze

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

11 years agos3:smb2_lock: use smb2req->compat_chain_fsp instead of looking it up again
Stefan Metzmacher [Fri, 8 Jun 2012 10:05:56 +0000 (12:05 +0200)]
s3:smb2_lock: use smb2req->compat_chain_fsp instead of looking it up again

metze

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

11 years agos3:smbd: set req->smb2req->compat_chain_fsp in file_fsp()
Stefan Metzmacher [Sat, 9 Jun 2012 09:09:25 +0000 (11:09 +0200)]
s3:smbd: set req->smb2req->compat_chain_fsp in file_fsp()

metze

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

11 years agoPart 2 of fix for bug #8998 - Notify code can miss a ChDir.
Volker Lendecke [Thu, 14 Jun 2012 18:26:44 +0000 (11:26 -0700)]
Part 2 of fix for bug #8998 - Notify code can miss a ChDir.

Do a ChDir for notify_onelevel.
(cherry picked from commit 0ace3ca03df76a1c22e112ea41d491f90afc0f94)

11 years agoPart 1 of fix for bug #8998 - Notify code can miss a ChDir.
Volker Lendecke [Thu, 14 Jun 2012 18:24:01 +0000 (11:24 -0700)]
Part 1 of fix for bug #8998 - Notify code can miss a ChDir.

Factor out notify_parent_dir.
(cherry picked from commit 2b92491ba7cc5fd541e3f8988ecf831c3949fb00)

11 years agoFix bug #8922.
Jeremy Allison [Fri, 11 May 2012 10:27:01 +0000 (03:27 -0700)]
Fix bug #8922.

Looking at the do_list status returns was historically
ignored, allowing tar to continue after NT_STATUS_ACCESS_DENIED.
Return to this state.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri May 11 14:55:53 CEST 2012 on sn-devel-104
(cherry picked from commit 633093685734e44afd7a0de1d58a0ffe905ae13a)

11 years agoComplete fix for bug #8811 - sd_has_inheritable_components segfaults on an SD that...
Jeremy Allison [Fri, 30 Mar 2012 18:58:31 +0000 (11:58 -0700)]
Complete fix for bug #8811 - sd_has_inheritable_components segfaults on an SD that se_access_check accepts.
(cherry picked from commit e5e86688bdcb91817954fb23ecf10a3b6ddd3933)

11 years agos3: remove dependency on automake for "make everything"
Björn Jacke [Tue, 5 Jun 2012 13:37:00 +0000 (15:37 +0200)]
s3: remove dependency on automake for "make everything"

the dependency was introduced by 737a1c9b96a4ba8d8688f4dba1df6d931e10e64d

We now call auto* in examples/VFS from within the main autogen.sh.

This fixes bug #8978.

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue Jun  5 17:32:22 CEST 2012 on sn-devel-104
(cherry picked from commit 5cc86fd560568202bef069eb89f5906f20050085)
(cherry picked from commit 2041ef3df94842822102d371029cbb14a7f2c024)

11 years agoFix bug #8972 - Directory group write permission bit is set if unix extensions are...
Jeremy Allison [Wed, 13 Jun 2012 17:48:32 +0000 (10:48 -0700)]
Fix bug #8972 - Directory group write permission bit is set if unix extensions are enabled

We can't manipulate file_attributes if it's a posix call.
(cherry picked from commit bb750d7232bd266c06a14ac3ea577aeecfb81b14)

11 years agos3-winbindd: call dump_core_setup after command line option has been parsed
Matthieu Patou [Fri, 1 Jun 2012 22:33:04 +0000 (15:33 -0700)]
s3-winbindd: call dump_core_setup after command line option has been parsed

Without this fix in some situations winbindd can't coredump.
Such cases append when samba is compiled in a custom prefix (ie.
/home/build/mat/prod/1/) in this case get_dyn_LOGFILEBASE or basename(lp_logfile)
before the configuration file and the command line is parsed will be something like /home/build/mat/prod/1/var
which might not exists on the host where you run it (where it's most
probably more "normal" directories).
Specifying --log-basename didn't help as dump_core_setup is called before the command line and
the config file is read so it didn't help getting a correct value in dump_core_setup.
We fix this issue by calling dump_core_setup() also after the command
line has been read and also after the configfile has been parsed so that
the final location for the coredump is coherent with the final logile
location.

Fix bug #8975 (winbindd can't coredump).
(cherry picked from commit 4cf3fb815610c6f0939f8b142296cd836faac7e6)

11 years agoFix bug #8311 - Winzip occasionally can not read files out of an open winzip dialog.
Stefan Metzmacher [Mon, 4 Jun 2012 22:59:35 +0000 (15:59 -0700)]
Fix bug #8311 - Winzip occasionally can not read files out of an open winzip dialog.

Backport of the changes in master without the VFS change. Move
all processing into smb_fsctl().
(cherry picked from commit 87d75c675ccd1cd455afb67e149ce1e835ad6b21)

11 years agos3-librpc-crypto: avoid crash with MIT krb5 1.10.0 in gss_get_name_attribute()
Alexander Bokovoy [Thu, 7 Jun 2012 15:24:38 +0000 (18:24 +0300)]
s3-librpc-crypto: avoid crash with MIT krb5 1.10.0 in gss_get_name_attribute()

gss_get_name_attribute() can return unintialized pac_display_buffer
and later gss_release_buffer() will crash on attempting to release it.

The fix on MIT krb5 side is in 1.10.1, reported in both Debian and MIT upstream:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=658514
http://krbdev.mit.edu/rt/Ticket/Display.html?user=guest&pass=guest&id=7087

We need to initialize variables before using gss_get_name_attribute()

Fix bug #8988 (avoid crash with MIT krb5 1.10.0 in gss_get_name_attribute()).
(cherry picked from commit 185c2054fd22de0ab07a762a279a7ef0db5d802c)

11 years agoWe are triggering the cleanup_timeout_fn() too often, on exiting when an smbd is...
Jeremy Allison [Fri, 1 Jun 2012 19:28:33 +0000 (12:28 -0700)]
We are triggering the cleanup_timeout_fn() too often, on exiting when an smbd is idle.

Calls to exit_server_cleanly() should be treated as a "clean" shutdown,
and not trigger the master smbd to call cleanup_timeout_fn.

The last 2 patches address bug #8971 (cleanup_timeout_fn() is called too often,
on exiting when an smbd is idle.)
(cherry picked from commit 8b3b1aa4ff76d7f03285e3fa87f30f3068a7ea5d)

11 years agoStop spamming the logs with "Could not remove pid XX from serverid.tdb" messages...
Jeremy Allison [Fri, 1 Jun 2012 19:02:04 +0000 (12:02 -0700)]
Stop spamming the logs with "Could not remove pid XX from serverid.tdb" messages and initiating the cleanup function on every process deat

We now have many sub-processes from smbd that don't serve SMB1/SMB2 requests and
don't register themselves in the serverid.tdb. Only initiate the cleanup
from processes that were explicitly in the child list.
(cherry picked from commit 777ac04a99467594805a03635b04011c495ff7e7)

11 years agos3: Fix uninitialized memory read in talloc_free()
Volker Lendecke [Tue, 29 May 2012 13:31:49 +0000 (15:31 +0200)]
s3: Fix uninitialized memory read in talloc_free()

Thanks to laurent gaffie <laurent.gaffie@gmail.com> for reporting
this issue!
(cherry picked from commit 445f314614e4e514a70ff5f1fbbfedb4d3ab0aac)

11 years agoForward port of Richard Sharpe's <realrichardsharpe@gmail.com> fix for bug #8970...
Jeremy Allison [Thu, 31 May 2012 23:25:52 +0000 (16:25 -0700)]
Forward port of Richard Sharpe's <realrichardsharpe@gmail.com> fix for bug #8970 - Possible memory leaks in the samba master process.
(cherry picked from commit ec7a5f2593b67797fc3924611d3b0b05b807d0bf)

11 years agos3: fix compile of krb5 locator on Solaris
Björn Jacke [Tue, 29 May 2012 06:01:40 +0000 (08:01 +0200)]
s3: fix compile of krb5 locator on Solaris

the krb5 locator plugin on Solaris needs LIBREPLACE_LIBS (bug #8732)

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue May 29 09:58:42 CEST 2012 on sn-devel-104
(cherry picked from commit 3085225e72c75abf84d7740334459cd971ee4c56)
(cherry picked from commit 7ca265423a36c114ac9216a780e005956967eae7)

11 years agos3-pid: Catch with pid filename's change when config file is not smb.conf
Matthieu Patou [Wed, 25 Jan 2012 05:29:11 +0000 (21:29 -0800)]
s3-pid: Catch with pid filename's change when config file is not smb.conf

This is what is done in pidfile_create
(cherry picked from commit 9b43ad4fcac1eb6796973336c5614b18a054080d)

Fix bug #8714 (smbcontrol can't find the pid file of winbindd because the later
is created with a different name).
(cherry picked from commit 1a596076697624545f415eb558c4647267cfe46c)

11 years agoFix bug #8627: Crash bug in dns_create_probe.
Jeremy Allison [Thu, 31 May 2012 19:19:53 +0000 (21:19 +0200)]
Fix bug #8627: Crash bug in dns_create_probe.

Fix crash bug in dns_create_probe when dns_create_update fails.
(cherry picked from commit ddad733a2166fb629157298a54a5ccc10a6b11fe)

11 years agoSecond part of fix for bug 8953 - winbind can hang as nbt_getdc() has no timeout.
Herb Lewis [Tue, 29 May 2012 23:38:53 +0000 (16:38 -0700)]
Second part of fix for bug 8953 - winbind can hang as nbt_getdc() has no timeout.

If we're running with SEC_ADS and we don't get a cldap response from
the server when querying its name, don't fall back to NetBIOS requests
as they're unlikely to succeed.

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

11 years agoFix bug #8953 - winbind can hang as nbt_getdc() has no timeout.
Jeremy Allison [Tue, 29 May 2012 23:37:35 +0000 (16:37 -0700)]
Fix bug #8953 - winbind can hang as nbt_getdc() has no timeout.

Add a timeout_in_seconds parameter to nbt_getdc() to make it fail
after that time with NT_STATUS_IO_TIMEOUT.
(cherry picked from commit 0d9d67d180ffea2a4e1942ec0c34ce3b4910fe18)

11 years agoFix bug #8373 - Can't join XP Pro workstations to 3.6.1 DC.
Jeremy Allison [Fri, 25 May 2012 16:16:50 +0000 (09:16 -0700)]
Fix bug #8373 - Can't join XP Pro workstations to 3.6.1 DC.

Treat LIBNDR_FLAG_NOALIGN and LIBNDR_FLAG_REMAINING the same as the
other align flags - make them mutually exclusive.

Combined work from Metze, Günther and Jeremy.
(cherry picked from commit 035342c11719d1daa647c0b2ae7cec27a969f83a)
(cherry picked from commit dea11050ae2e9b2dd4ceb231760d41b68e11f5fd)

11 years agoFix bad bugfix for bug #8910 - resolve_ads() code can return zero addresses and miss...
Ira Cooper [Wed, 30 May 2012 18:50:06 +0000 (11:50 -0700)]
Fix bad bugfix for bug #8910 - resolve_ads() code can return zero addresses and miss valid DC IP addresses

Original code incorrectly used a while() instead of a for() loop.
We need to iterate over the entire array here.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed May 30 23:29:03 CEST 2012 on sn-devel-104
(cherry picked from commit fc7e1113c34819de6fc8053fb81ee2e0e970bec2)
(cherry picked from commit 6797759a36b50f82fb1f75a4cc9c2555a79073a2)

11 years agoFix bug #8882 - Broken processing of %U with vfs_full_audit when force user is set.
Jeremy Allison [Tue, 24 Apr 2012 00:49:49 +0000 (17:49 -0700)]
Fix bug #8882 - Broken processing of %U with vfs_full_audit when force user is set.

When doing a "force user" we need to remember what the "sanitized_username"
was from the original connect.
(cherry picked from commit f68121db6f78680a328acec11f475ccca3184412)

11 years agos3-utils: Use ads_do_search_retry in net ads search
Andrew Bartlett [Fri, 18 May 2012 12:02:57 +0000 (22:02 +1000)]
s3-utils: Use ads_do_search_retry in net ads search

This makes it possible to search against a slow server, as will
fallback from 1000 to (eventually) 125 users at a time.

Andrew Bartlett

The last 4 patches address big #8943 (Slow but responsive DC can lock up
winbindd for > 10 minutes at a time).
(cherry picked from commit 04a9988ffa60b0ca32923da20a0d25d14aa460e4)

11 years agos3-libads: Use a reducing page size to try and cope with a slow LDAP server
Andrew Bartlett [Fri, 18 May 2012 12:01:14 +0000 (22:01 +1000)]
s3-libads: Use a reducing page size to try and cope with a slow LDAP server

If we cannot get 1000 users downloaded in 15seconds, try with 500, 250
and then 125 users at a time.

Andrew Bartlett
(cherry picked from commit 0f58ea6c58d78c845aa3fda22c238f126620d226)

11 years agos3-winbindd: Always map the LDAP error code to an NTSTATUS
Andrew Bartlett [Fri, 18 May 2012 07:40:59 +0000 (17:40 +1000)]
s3-winbindd: Always map the LDAP error code to an NTSTATUS

We do this so that we catch LDAP_TIMELIMIT_EXCEEDED as NT_STATUS_IO_TIMEOUT, which
has special handling in winbindd_cache.c

Andrew Bartlett
(cherry picked from commit 483a01ea7f50227cb5328c52d8b71a2a31e7acea)