[SCM] Samba Shared Repository - branch v3-6-stable updated

Karolin Seeger kseeger at samba.org
Mon Aug 6 11:05:11 MDT 2012


The branch, v3-6-stable has been updated
       via  99c832a WHATSNEW: Add latest changes to the release notes.
       via  55d593f s4-torture: add ntprinting ndr operations testsuite.
       via  a7fdcbb ntprinting: mark the final 4 byte null pointer for printer data in ndr_pull_ntprinting_printer as read.
       via  4773eee ndr: fix push/pull DATA_BLOB with NDR_NOALIGN
       via  f793924 ntprinting: make decode_ntprinting helpers public in idl.
       via  c76961e WHATSNEW: Add changes since 3.6.6.
       via  37c2104 Fix bug 9062: cmd_lsarpc.c:1171: bad call to data_blob_const
       via  023b586 Use ippGet/ippSet (accessors) for IPP API.
       via  5261386 Fix bug #9037 - Name clash in MD5 cause...
       via  f79cee2 s3-winbind: Fix bug #9052 resolving our own "Domain Local" groups.
       via  e445130 s3-printing: fix broken print_job_get_name() return
       via  45859fd s3-torture: Use static printer for smbd spooler test (cherry picked from commit e0e0f30958f9cd4dbc8faba901216869bb6601e5)
       via  4caee8a s3-printing: use euid for vlp job tracking
       via  cf5fc02 s3-printing: fill print_generic sysjob id on job submission
       via  d5e77d2 s3-printing: pass lpq command to job_submit
       via  fc9ab1f s3-printing: remove unused print_job_fname() (cherry picked from commit f831a9bdbdddd77c3e7ea7e5ae1653567ee12ceb)
       via  9ba0e90 s3-printing: pass a talloc ctx to unpack_pjob
       via  4e3d163 s3-printing: return talloced print jobs
       via  84c0836 s3-printing: clean up print_job_pause/resume interface
       via  819b1f9 s3-printing: fix potential print db refcount leak (cherry picked from commit 41d935744a03435337a90ab1477a7a54f96ca972)
       via  da24c7c s3-spoolss: remove duplicate "." in smbd spooler path (cherry picked from commit df9a97b81f2a5520ed0ef79d9aeb3a014799e89c)
       via  a4835b8 s3-printing: remove print_parse_jobid()
       via  8f79660 s3-printing: remove redundant variable set (cherry picked from commit bf00b2155bc3e42946a3b2c6b9f88606b77f4bc8)
       via  ed60f5a s3-printing: remove print_parse_jobid() calls from printing.c
       via  5b12a91 s3-printing: rename queue->job sysjob
       via  35d1aa9 s3-printing: remove print_parse_jobid() from print_cups.c
       via  e07f676 s3-printing: store print jobid as part of struct printjob
       via  e86edf9 torture: add test for smbd print job spooling
       via  898621b s3:smb2_server: implement credit granting similar to windows
       via  3253b4e s3:smb2_server: make sure sequence numbers don't wrap at UINT64_MAX
       via  ce87140 s3:smb2_server: make sure we don't grant more credits than we allow
       via  2a7b53f s3:smb2_server: check the already granted credits like in the master branch
       via  0841ee2 s3:smb2_server: split out a smb2_validate_sequence_number() function
       via  da50122 s3:smb2_server: clear sequence window if we got the lowest sequence id
       via  3430b3a s3:smb2_server: fix calculation of the next bitmap_offset
       via  db97472 s3:smb2_server: remove unused and confusing DEFAULT_SMB2_MAX_CREDIT_BITMAP_FACTOR
       via  0af77fd s3:smb2_server: call smbd_smb2_request_validate() also in smbd_smb2_first_negprot()
       via  901432b s3:smb2_server: start the connection with one credit granted to the client
       via  8f6116e s3: Make us survive smb2.lock.rw-shared with aio enabled
       via  b33a97c Fix bug #9034 - Typo in set_re_uid() call when USE_SETRESUID selected in configure.
       via  b87847f s3:vfs_gpfs: be less verbose in get/set_xattr functions
       via  a30bd6f s3-vfs_gpfs: Fix bug #9003, posix acl on gpfs
       via  f07890a s3:winbindd: don't turn negative cache entries into valid idmappings (bug #9002)
       via  b193272 s3:passdb: don't turn negative cache entries into valid idmappings (bug #9002)
       via  dbe86be s3:winbindd: do not expose negative cache idmap entries as valid mappings (bug #9002)
       via  032e651 s3:winbindd: discard the expired gid cache if we're online (bug #9002)
       via  aed0136 s3: fix build without ads support
       via  22543c7 Fix bug #8974 - Kernel oplocks are broken when uid(file) != uid(process).
       via  14296e4 s3: Correct documentation of case sensitive
       via  96b47be 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
       via  7697136 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
      from  3a9fa74 WHATSNEW: Start release notes for Samba 3.6.7.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-stable


- Log -----------------------------------------------------------------
commit 99c832a24d6d0c80d8f76f38b0062b62a0730706
Author: Karolin Seeger <kseeger at samba.org>
Date:   Mon Jul 30 19:10:53 2012 +0200

    WHATSNEW: Add latest changes to the release notes.
    
    Karolin
    (cherry picked from commit 54233b5eecb6a29641e69d5fe36be9a3ad7b9dc2)

commit 55d593fe66d852265135d59a1b3756ecea7bf2bc
Author: Günther Deschner <gd at samba.org>
Date:   Fri Jul 6 19:02:00 2012 +0200

    s4-torture: add ntprinting ndr operations testsuite.
    
    Guenther
    
    Autobuild-User(master): Günther Deschner <gd at 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)

commit a7fdcbb5044428f815d4d424818beab53433eb32
Author: Günther Deschner <gd at samba.org>
Date:   Fri Jul 6 18:22:36 2012 +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)

commit 4773eee51c7b17cb9bcc2f8b55e2702862767685
Author: David Disseldorp <ddiss at samba.org>
Date:   Fri Jul 6 14:00:27 2012 +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 at samba.org>
    (cherry picked from commit 0d3249b927465fdca1765cbd7e17c947364b5ef0)
    (cherry picked from commit 896e312c8067f5d14a7fbf6b8b810c7a61bf26e2)

commit f793924c897445fd1b6e7a384b278c9cb6d99d5f
Author: Günther Deschner <gd at samba.org>
Date:   Fri Jul 6 18:04:33 2012 +0200

    ntprinting: make decode_ntprinting helpers public in idl.
    
    Guenther
    (cherry picked from commit 66514f8bbe5f9e2dcd8be90450ef339305a3161c)
    (cherry picked from commit 23a5cbc7311090d93584acc12ce52a49993cfdec)

commit c76961ed0d30aa11e232ceab0c929625aaf91641
Author: Karolin Seeger <kseeger at samba.org>
Date:   Thu Jul 26 19:50:09 2012 +0200

    WHATSNEW: Add changes since 3.6.6.
    
    Karolin
    (cherry picked from commit 5c57ea4fd6af0b520dd3cabc57f07cc94f95b468)

commit 37c210483338dfab3037106d7cf3cbe9d6306b48
Author: David Binderman <dcb314 at hotmail.com>
Date:   Mon Jul 23 15:25:57 2012 -0700

    Fix bug 9062: cmd_lsarpc.c:1171: bad call to data_blob_const
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    (cherry picked from commit db007b46222c02e23fb9566128ee436ad6c11bf9)

commit 023b586b479890933ab6687c4be184f821f04b1a
Author: Jiri Popelka <jpopelka at redhat.com>
Date:   Fri Jul 20 11:53:31 2012 -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 at samba.org>
    
    Fix bug #9055 - doesn't build against CUPS 1.6.
    (cherry picked from commit 684f83433d9697137aab9d8516ad2155929e15bf)

commit 5261386ca38dd87334deafc306d28651a7ca27af
Author: Jura Sasek <jiri.sasek at oracle.com>
Date:   Tue Jul 24 20:58:58 2012 +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)

commit f79cee20461b5599419fe022abee009c3aef5290
Author: Andreas Schneider <asn at samba.org>
Date:   Fri Jul 20 17:12:09 2012 -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 at samba.org>
    (cherry picked from commit ce8dfb6be131edb94191a78bf28102415b5d8c4c)

commit e445130ffae011ee650e4b5dab0e4cb8a0ed7a56
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed Jun 27 01:23:57 2012 +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)

commit 45859fd6606eaf956bbec8411947d1d68053f4e7
Author: David Disseldorp <ddiss at samba.org>
Date:   Fri Jun 22 18:49:50 2012 +0200

    s3-torture: Use static printer for smbd spooler test
    (cherry picked from commit e0e0f30958f9cd4dbc8faba901216869bb6601e5)

commit 4caee8ada9d46799ad6c0746db374eade7f8be2d
Author: David Disseldorp <ddiss at samba.org>
Date:   Thu Jun 21 15:49:55 2012 +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)

commit cf5fc021f81dac575b52bf8fe6ac2473673ae3b0
Author: David Disseldorp <ddiss at samba.org>
Date:   Thu Feb 9 12:08:27 2012 +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)

commit d5e77d2657bf4dd33ed9d232f446494845a85e97
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed Feb 8 18:47:11 2012 +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)

commit fc9ab1f9725c2209170b4d6ab36f28105235ed4a
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed Feb 8 17:03:06 2012 +0100

    s3-printing: remove unused print_job_fname()
    (cherry picked from commit f831a9bdbdddd77c3e7ea7e5ae1653567ee12ceb)

commit 9ba0e902625ce96fdc60f0d3f4443d9b8546a4ac
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed Feb 8 17:57:02 2012 +0100

    s3-printing: pass a talloc ctx to unpack_pjob
    
    Rather than allocating the devicemode on a null context.
    (cherry picked from commit 9ec5b7b9e2d8ac42e4172cbabb7a3b57c1f7ba39)

commit 4e3d1638add6a4bd13a02d6b370003c80c4f8c4a
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed Feb 8 16:55:40 2012 +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)

commit 84c0836c552e4706cb3ab87349207e865cd6fd16
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed Feb 8 15:01:15 2012 +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)

commit 819b1f9e4f506a5ccc267b90a00418fccacd6c1c
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed Feb 8 13:45:40 2012 +0100

    s3-printing: fix potential print db refcount leak
    (cherry picked from commit 41d935744a03435337a90ab1477a7a54f96ca972)

commit da24c7c7dac83ff64b6ad148e40f4bea3091f0ec
Author: David Disseldorp <ddiss at samba.org>
Date:   Wed Feb 1 13:21:04 2012 +0100

    s3-spoolss: remove duplicate "." in smbd spooler path
    (cherry picked from commit df9a97b81f2a5520ed0ef79d9aeb3a014799e89c)

commit a4835b8704f9a98ee2cc048c030c38ea9eeb4a35
Author: David Disseldorp <ddiss at samba.org>
Date:   Mon Jan 30 17:35:28 2012 +0100

    s3-printing: remove print_parse_jobid()
    
    With all callers fixed, it is now safe to remove.
    (cherry picked from commit bb3b4890c77bcf1c50f4f27f10e5f5812ae24a76)

commit 8f796602d269df4e191d6c41e61156dad9af71c4
Author: David Disseldorp <ddiss at samba.org>
Date:   Mon Jan 30 16:05:21 2012 +0100

    s3-printing: remove redundant variable set
    (cherry picked from commit bf00b2155bc3e42946a3b2c6b9f88606b77f4bc8)

commit ed60f5a711978599220369ff8bfe754cae356e3f
Author: David Disseldorp <ddiss at samba.org>
Date:   Mon Jan 30 13:35:21 2012 +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)

commit 5b12a911f392ac43d43e18e2078f36b4a8bdcfc8
Author: David Disseldorp <ddiss at samba.org>
Date:   Fri Jan 27 12:33:27 2012 +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)

commit 35d1aa9c4f88c037a51851a88dd182db8d74bb66
Author: David Disseldorp <ddiss at samba.org>
Date:   Mon Jan 30 13:44:33 2012 +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)

commit e07f676d926d73b2c62ad636e276cd805ea93cb7
Author: David Disseldorp <ddiss at samba.org>
Date:   Thu Jan 26 15:28:34 2012 +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)

commit e86edf9ceeb061f88856fe22e82e36c343321363
Author: David Disseldorp <ddiss at samba.org>
Date:   Thu Jun 21 17:12:23 2012 +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)

commit 898621b62ca687e60e8be27fd960a38ee79f75b6
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jun 27 15:33:43 2012 +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)

commit 3253b4ea3d99bbcf364aa9d9c123b57ea76c2e9b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jun 27 15:33:43 2012 +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)

commit ce87140e3c3e0ab71ed6ad830fb535102dd6fb16
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Jun 27 15:33:43 2012 +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)

commit 2a7b53f864ee04b92a5d57b4008eeb4aacae756b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jun 26 14:28:07 2012 +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)

commit 0841ee2de62867890c818b2fa926b011c4c65dfb
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Jun 25 23:17:55 2012 +0200

    s3:smb2_server: split out a smb2_validate_sequence_number() function
    
    metze
    (similar to commit 984fdaf9149d96d0d28600443981d87d13eb355c)
    (cherry picked from commit 4391a14adca1c94016318b6890129f842b9ae1e7)

commit da50122ef9b33b1ff552e881950698d7417cb7d0
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jun 26 08:08:37 2012 +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)

commit 3430b3a33fde0750974db64d4fe6f112e8cce327
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jun 26 09:12:44 2012 +0200

    s3:smb2_server: fix calculation of the next bitmap_offset
    
    metze
    (similar to commit bd6d415cae550e97e04830eecefa2881b497de89)
    (cherry picked from commit 492f0878e49c141f31bb076c906c52131d7660ab)

commit db974727361f7ee5d9e624318c515935a8e05ae1
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jun 26 09:11:23 2012 +0200

    s3:smb2_server: remove unused and confusing DEFAULT_SMB2_MAX_CREDIT_BITMAP_FACTOR
    
    metze
    (similar to commit d1ee774ed0b4b3882b4b85da16d9bb9c082a0c49)
    (cherry picked from commit 4bea48ff5a6c23818082b6b42401c72d892de51a)

commit 0af77fd6ddb0d17d361cd46edb6b1464a147648e
Author: Stefan Metzmacher <metze at samba.org>
Date:   Mon Jun 25 23:14:24 2012 +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)

commit 901432b3f777f0e6b9409252a469727aafc541fd
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jun 26 14:23:12 2012 +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)

commit 8f6116e98fc83088314266d80bff559afe5afbda
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Jul 13 08:38:07 2012 +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)

commit b33a97c5b057e68e0fdf85f5b234b99896349db2
Author: Jeremy Allison <jra at samba.org>
Date:   Tue Jul 10 21:13:03 2012 -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)

commit b87847f320f0ec8ba7e40db2ad91e6f2d9101056
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu Dec 22 14:20:32 2011 +0100

    s3:vfs_gpfs: be less verbose in get/set_xattr functions
    
    metze
    
    Signed-off-by: Christian Ambach <ambi at 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)

commit a30bd6faecd0cca56f1c8475c8dc7a2d853a210a
Author: Volker Lendecke <vl at samba.org>
Date:   Fri Jun 22 15:46:13 2012 +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 at samba.org>
    
    Autobuild-User(master): Stefan Metzmacher <metze at 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)

commit f07890af7039f4196ac26aaad7017658f43bac98
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jun 19 17:57:19 2012 +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)

commit b193272b055b858fd3b14ba0d35a5096ab0f07bc
Author: Stefan Metzmacher <metze at samba.org>
Date:   Tue Jun 19 17:57:19 2012 +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)

commit dbe86be6f24681a314e6e1b5089e6540548f603a
Author: Stefan Metzmacher <metze at samba.org>
Date:   Thu May 24 09:08:21 2012 +0200

    s3:winbindd: do not expose negative cache idmap entries as valid mappings (bug #9002)
    
    metze
    (cherry picked from commit a1a0babdbd89b229a9d539993c2ad3791b654952)

commit 032e651b8717b798bf3bec2eaeff3cc06537a566
Author: Stefan Metzmacher <metze at samba.org>
Date:   Fri Mar 2 05:08:17 2012 +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)

commit aed0136b8eeacd0aece3abd1f1b2bf8ef88e61cf
Author: Björn Jacke <bj at sernet.de>
Date:   Wed Jun 13 19:28:06 2012 +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 at 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)

commit 22543c796792a1cd3774c49abe646539acfb9d04
Author: Jeremy Allison <jra at samba.org>
Date:   Wed Jun 20 15:50:00 2012 -0700

    Fix bug #8974 - Kernel oplocks are broken when uid(file) != uid(process).
    
    Based on a fix from "Etienne Dechamps " <e-t172 at akegroup.org>
    (cherry picked from commit 0e2fb6c69e971c7502fabe17fa71d1453dda18a6)

commit 14296e43ab838f0c40444478bd624976ce2ffd28
Author: Olaf Flebbe <o.flebbe at science-computing.de>
Date:   Fri Oct 28 09:59:07 2011 +0200

    s3: Correct documentation of case sensitive
    
    this fixes bug #8552
    
    Autobuild-User(master): Björn Jacke <bj at 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)

commit 96b47beb0271c787cfda678f5a6f023a6145bed9
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Jun 18 16:24:12 2012 -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)

commit 769713683feab467e503bfe67e387a49368c0a7c
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Jun 18 16:23:13 2012 -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 at gmail.com>. The correct
    command code in a reply to NT Transact Secondary (0xa1) is
    NT Transact (0xa0).
    (cherry picked from commit 115f5af9a89a20929f02578c08a34ae2736951dd)

-----------------------------------------------------------------------

Summary of changes:
 WHATSNEW.txt                                   |   54 +++-
 docs-xml/smbdotconf/filename/casesensitive.xml |    2 +-
 lib/crypto/hmacmd5.c                           |    4 +-
 lib/crypto/hmacmd5.h                           |    2 +-
 lib/crypto/md5.h                               |   12 +
 lib/crypto/md5test.c                           |    2 +-
 libcli/auth/credentials.c                      |    2 +-
 libcli/auth/ntlmssp_server.c                   |    2 +-
 libcli/auth/ntlmssp_sign.c                     |    2 +-
 libcli/auth/schannel_sign.c                    |    2 +-
 libcli/auth/smbencrypt.c                       |    8 +-
 libcli/drsuapi/repl_decrypt.c                  |    4 +-
 libgpo/gpo_util.c                              |    7 +-
 librpc/idl/ntprinting.idl                      |    6 +-
 librpc/ndr/ndr_basic.c                         |   34 +-
 librpc/ndr/ndr_ntprinting.c                    |    1 +
 source3/Makefile.in                            |    2 +-
 source3/configure.in                           |   19 +
 source3/include/local.h                        |    1 -
 source3/include/printing.h                     |   23 +-
 source3/include/proto.h                        |    3 +-
 source3/lib/util_sec.c                         |    2 +-
 source3/lib/util_sid.c                         |    9 +-
 source3/libsmb/ntlmssp.c                       |    2 +-
 source3/libsmb/smb_signing.c                   |    2 +-
 source3/modules/vfs_default.c                  |    5 -
 source3/modules/vfs_gpfs.c                     |    8 +-
 source3/modules/vfs_streams_xattr.c            |    2 +-
 source3/passdb/lookup_sid.c                    |    4 +-
 source3/printing/lpq_parse.c                   |   41 +--
 source3/printing/print_cups.c                  |  209 ++++++----
 source3/printing/print_generic.c               |  149 +++++---
 source3/printing/print_iprint.c                |  255 +++++++-----
 source3/printing/printing.c                    |  504 +++++++++++++++---------
 source3/printing/printspoolss.c                |   11 +-
 source3/printing/tests/vlp.c                   |    3 +-
 source3/rpc_client/init_samr.c                 |    2 +-
 source3/rpc_server/spoolss/srv_spoolss_nt.c    |   30 +-
 source3/rpcclient/cmd_lsarpc.c                 |    2 +-
 source3/smbd/globals.h                         |   44 ++-
 source3/smbd/nttrans.c                         |   11 +-
 source3/smbd/oplock_linux.c                    |   13 +
 source3/smbd/smb2_server.c                     |  258 +++++++++----
 source3/smbd/smb2_write.c                      |    2 +-
 source3/smbd/trans2.c                          |   15 +-
 source3/web/swat.c                             |    2 +-
 source3/winbindd/winbindd_pam.c                |    2 +-
 source3/winbindd/winbindd_sids_to_xids.c       |   94 ++++-
 source3/winbindd/winbindd_util.c               |   12 +-
 source4/auth/credentials/credentials_ntlm.c    |    2 +-
 source4/dsdb/samdb/ldb_modules/password_hash.c |    2 +-
 source4/libcli/raw/smb_signing.c               |    4 +-
 source4/libnet/libnet_passwd.c                 |    4 +-
 source4/ntp_signd/ntp_signd.c                  |    2 +-
 source4/rpc_server/samr/samr_password.c        |    2 +-
 source4/torture/ndr/ndr.c                      |    1 +
 source4/torture/ndr/ntprinting.c               |  440 +++++++++++++++++++++
 source4/torture/ntp/ntp_signd.c                |    2 +-
 source4/torture/rpc/samba3rpc.c                |    2 +-
 source4/torture/rpc/samlogon.c                 |    2 +-
 source4/torture/rpc/samr.c                     |    8 +-
 source4/torture/rpc/spoolss.c                  |   80 ++++
 source4/torture/wscript_build                  |    2 +-
 63 files changed, 1747 insertions(+), 691 deletions(-)
 create mode 100644 source4/torture/ndr/ntprinting.c


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 5361cbc..a3c3fa7 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -8,12 +8,64 @@ This is is the latest stable release of Samba 3.6.
 
 Major enhancements in Samba 3.6.7 include:
 
-o  
+o  Fix resolving our own "Domain Local" groups (bug #9052).
+o  Fix migrating printers while upgrading from 3.5.x (bug #9026).
+
 
 Changes since 3.6.6:
 --------------------
 
 o   Jeremy Allison <jra at samba.org>
+    * BUG 8974: Fix kernel oplocks when uid(file) != uid(process).
+    * BUG 8989: Send correct responses to NT Transact Secondary when no data and
+      no params for the Trans2 calls are set.
+    * BUG 9034: Fix typo in set_re_uid() call when USE_SETRESUID selected in
+      configure.
+
+
+o   David Binderman <dcb314 at hotmail.com>
+    * BUG 9062: rpcclient: Fix bad call to data_blob_const.
+
+
+o   Günther Deschner <gd at samba.org>
+    * BUG 9026: Fix migrating printers while upgrading from 3.5.x.
+
+
+o   David Disseldorp <ddiss at samba.org>
+    * BUG 8719: Printing fails in function cups_job_submit.
+    * BUG 9026: Fix migrating printers while upgrading from 3.5.x.
+
+
+o   Olaf Flebbe <o.flebbe at science-computing.de>
+    * BUG 8552: Correct documentation of "case sensitive".
+
+
+o   Björn Jacke <bj at sernet.de>
+    * BUG 8996: Fix build without ads support.
+
+
+o   Volker Lendecke <vl at samba.org>
+    * BUG 9003: Fix posix acl on gpfs.
+    * BUG 9040: Using asynchronous IO with SMB2 can return NT_STATUS_FILE_CLOSED
+      in error instead ofNT_STATUS_FILE_LOCK_CONFLICT.
+
+
+o   Stefan Metzmacher <metze at samba.org>
+    * BUG 9002: Don't turn negative cache entries into valid idmappings.
+    * BUG 9022: Make vfs_gpfs less verbose in get/set_xattr functions.
+    * BUG 9057: Fix bugs in SMB2 credit handling code.
+
+
+o   Jiri Popelka <jpopelka at redhat.com>
+    * BUG 9055: Fix build against CUPS 1.6.
+
+
+o   Jura Sasek <jiri.sasek at oracle.com>
+    * BUG 9037: Fix 'net ads join' on T4 (sun4v) systems on Solaris 10.
+
+
+o   Andreas Schneider <asn at samba.org>
+    * BUG 9052: Fix resolving our own "Domain Local" groups.
 
 
 ######################################################################
diff --git a/docs-xml/smbdotconf/filename/casesensitive.xml b/docs-xml/smbdotconf/filename/casesensitive.xml
index ed77050..e90f468 100644
--- a/docs-xml/smbdotconf/filename/casesensitive.xml
+++ b/docs-xml/smbdotconf/filename/casesensitive.xml
@@ -8,5 +8,5 @@
 	<para>See the discussion in the section <smbconfoption name="name mangling"/>.</para>
 </description>
 
-<value type="default">no</value>
+<value type="default">auto</value>
 </samba:parameter>
diff --git a/lib/crypto/hmacmd5.c b/lib/crypto/hmacmd5.c
index cfbd428..2419bdb 100644
--- a/lib/crypto/hmacmd5.c
+++ b/lib/crypto/hmacmd5.c
@@ -36,7 +36,7 @@ _PUBLIC_ void hmac_md5_init_rfc2104(const uint8_t *key, int key_len, HMACMD5Cont
         /* if key is longer than 64 bytes reset it to key=MD5(key) */
         if (key_len > 64)
 	{
-                struct MD5Context tctx;
+		MD5_CTX tctx;
 
                 MD5Init(&tctx);
                 MD5Update(&tctx, key, key_len);
@@ -91,7 +91,7 @@ _PUBLIC_ void hmac_md5_update(const uint8_t *text, int text_len, HMACMD5Context
 ***********************************************************************/
 _PUBLIC_ void hmac_md5_final(uint8_t *digest, HMACMD5Context *ctx)
 {
-        struct MD5Context ctx_o;
+	MD5_CTX ctx_o;
 
         MD5Final(digest, &ctx->ctx);          
 
diff --git a/lib/crypto/hmacmd5.h b/lib/crypto/hmacmd5.h
index 91b8ca5..1fc2750 100644
--- a/lib/crypto/hmacmd5.h
+++ b/lib/crypto/hmacmd5.h
@@ -25,7 +25,7 @@
 
 typedef struct 
 {
-        struct MD5Context ctx;
+	MD5_CTX ctx;
         uint8_t k_ipad[65];    
         uint8_t k_opad[65];
 
diff --git a/lib/crypto/md5.h b/lib/crypto/md5.h
index 4064d6f..edddbac 100644
--- a/lib/crypto/md5.h
+++ b/lib/crypto/md5.h
@@ -5,15 +5,27 @@
 #define HEADER_MD5_H 
 #endif
 
+#ifdef HAVE_MD5_H
+/*
+ * Try to avoid clashes with Solaris MD5 implementation.
+ * ...where almost all implementations follows:
+ * "Schneier's Cryptography Classics Library"
+ */
+#include <md5.h>
+#else
+
 struct MD5Context {
 	uint32_t buf[4];
 	uint32_t bits[2];
 	uint8_t in[64];
 };
+typedef struct MD5Context MD5_CTX;
 
 void MD5Init(struct MD5Context *context);
 void MD5Update(struct MD5Context *context, const uint8_t *buf,
 	       size_t len);
 void MD5Final(uint8_t digest[16], struct MD5Context *context);
 
+#endif /* !HAVE_MD5_H */
+
 #endif /* !MD5_H */
diff --git a/lib/crypto/md5test.c b/lib/crypto/md5test.c
index 0457d4d..256ddfa 100644
--- a/lib/crypto/md5test.c
+++ b/lib/crypto/md5test.c
@@ -63,7 +63,7 @@ bool torture_local_crypto_md5(struct torture_context *torture)
 	};
 
 	for (i=0; i < ARRAY_SIZE(testarray); i++) {
-		struct MD5Context ctx;
+		MD5_CTX ctx;
 		uint8_t md5[16];
 		int e;
 
diff --git a/libcli/auth/credentials.c b/libcli/auth/credentials.c
index 8130476..35158ca 100644
--- a/libcli/auth/credentials.c
+++ b/libcli/auth/credentials.c
@@ -69,7 +69,7 @@ static void netlogon_creds_init_128bit(struct netlogon_creds_CredentialState *cr
 {
 	unsigned char zero[4], tmp[16];
 	HMACMD5Context ctx;
-	struct MD5Context md5;
+	MD5_CTX md5;
 
 	ZERO_STRUCT(creds->session_key);
 
diff --git a/libcli/auth/ntlmssp_server.c b/libcli/auth/ntlmssp_server.c
index 802ac40..0a759a8 100644
--- a/libcli/auth/ntlmssp_server.c
+++ b/libcli/auth/ntlmssp_server.c
@@ -359,7 +359,7 @@ static NTSTATUS ntlmssp_server_preauth(struct ntlmssp_state *ntlmssp_state,
 	*/
 	if (ntlmssp_state->neg_flags & NTLMSSP_NEGOTIATE_NTLM2) {
 		if (ntlmssp_state->nt_resp.length == 24 && ntlmssp_state->lm_resp.length == 24) {
-			struct MD5Context md5_session_nonce_ctx;
+			MD5_CTX md5_session_nonce_ctx;
 			state->doing_ntlm2 = true;
 
 			memcpy(state->session_nonce, ntlmssp_state->internal_chal.data, 8);
diff --git a/libcli/auth/ntlmssp_sign.c b/libcli/auth/ntlmssp_sign.c
index 42b459c..454c448 100644
--- a/libcli/auth/ntlmssp_sign.c
+++ b/libcli/auth/ntlmssp_sign.c
@@ -51,7 +51,7 @@ static void calc_ntlmv2_key(uint8_t subkey[16],
 			    DATA_BLOB session_key,
 			    const char *constant)
 {
-	struct MD5Context ctx3;
+	MD5_CTX ctx3;
 	MD5Init(&ctx3);
 	MD5Update(&ctx3, session_key.data, session_key.length);
 	MD5Update(&ctx3, (const uint8_t *)constant, strlen(constant)+1);
diff --git a/libcli/auth/schannel_sign.c b/libcli/auth/schannel_sign.c
index eb605f4..2d92283 100644
--- a/libcli/auth/schannel_sign.c
+++ b/libcli/auth/schannel_sign.c
@@ -110,7 +110,7 @@ static void netsec_do_sign(struct schannel_state *state,
 {
 	uint8_t packet_digest[16];
 	static const uint8_t zeros[4];
-	struct MD5Context ctx;
+	MD5_CTX ctx;
 
 	MD5Init(&ctx);
 	MD5Update(&ctx, zeros, 4);
diff --git a/libcli/auth/smbencrypt.c b/libcli/auth/smbencrypt.c
index f1451ea..ed1172b 100644
--- a/libcli/auth/smbencrypt.c
+++ b/libcli/auth/smbencrypt.c
@@ -99,7 +99,7 @@ bool E_md4hash(const char *passwd, uint8_t p16[16])
 
 void E_md5hash(const uint8_t salt[16], const uint8_t nthash[16], uint8_t hash_out[16])
 {
-	struct MD5Context tctx;
+	MD5_CTX tctx;
 	MD5Init(&tctx);
 	MD5Update(&tctx, salt, 16);
 	MD5Update(&tctx, nthash, 16);
@@ -623,7 +623,7 @@ bool decode_pw_buffer(TALLOC_CTX *ctx,
 
 void encode_or_decode_arc4_passwd_buffer(unsigned char pw_buf[532], const DATA_BLOB *psession_key)
 {
-	struct MD5Context tctx;
+	MD5_CTX tctx;
 	unsigned char key_out[16];
 
 	/* Confounder is last 16 bytes. */
@@ -703,7 +703,7 @@ void encode_wkssvc_join_password_buffer(TALLOC_CTX *mem_ctx,
 					struct wkssvc_PasswordBuffer **pwd_buf)
 {
 	uint8_t buffer[516];
-	struct MD5Context ctx;
+	MD5_CTX ctx;
 	struct wkssvc_PasswordBuffer *my_pwd_buf = NULL;
 	DATA_BLOB confounded_session_key;
 	int confounder_len = 8;
@@ -741,7 +741,7 @@ WERROR decode_wkssvc_join_password_buffer(TALLOC_CTX *mem_ctx,
 					  char **pwd)
 {
 	uint8_t buffer[516];
-	struct MD5Context ctx;
+	MD5_CTX ctx;
 	size_t pwd_len;
 
 	DATA_BLOB confounded_session_key;
diff --git a/libcli/drsuapi/repl_decrypt.c b/libcli/drsuapi/repl_decrypt.c
index 6fff2fe..00b8db8 100644
--- a/libcli/drsuapi/repl_decrypt.c
+++ b/libcli/drsuapi/repl_decrypt.c
@@ -39,7 +39,7 @@ WERROR drsuapi_decrypt_attribute_value(TALLOC_CTX *mem_ctx,
 	DATA_BLOB confounder;
 	DATA_BLOB enc_buffer;
 
-	struct MD5Context md5;
+	MD5_CTX md5;
 	uint8_t _enc_key[16];
 	DATA_BLOB enc_key;
 
@@ -198,7 +198,7 @@ static WERROR drsuapi_encrypt_attribute_value(TALLOC_CTX *mem_ctx,
 	DATA_BLOB rid_crypt_out = data_blob(NULL, 0);
 	DATA_BLOB confounder;
 
-	struct MD5Context md5;
+	MD5_CTX md5;
 	uint8_t _enc_key[16];
 	DATA_BLOB enc_key;
 
diff --git a/libgpo/gpo_util.c b/libgpo/gpo_util.c
index 553402a..91078bb 100644
--- a/libgpo/gpo_util.c
+++ b/libgpo/gpo_util.c
@@ -843,6 +843,7 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
 				const char *dn,
 				struct security_token **token)
 {
+#ifdef HAVE_ADS
 	struct security_token *ad_token = NULL;
 	ADS_STATUS status;
 #if _SAMBA_BUILD_ == 4
@@ -851,9 +852,6 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
 	NTSTATUS ntstatus;
 #endif
 
-#ifndef HAVE_ADS
-	return ADS_ERROR_NT(NT_STATUS_NOT_SUPPORTED);
-#endif
 	status = ads_get_sid_token(ads, mem_ctx, dn, &ad_token);
 	if (!ADS_ERR_OK(status)) {
 		return status;
@@ -869,4 +867,7 @@ ADS_STATUS gp_get_machine_token(ADS_STRUCT *ads,
 	}
 #endif
 	return ADS_SUCCESS;
+#else
+	return ADS_ERROR_NT(NT_STATUS_NOT_SUPPORTED);
+#endif
 }
diff --git a/librpc/idl/ntprinting.idl b/librpc/idl/ntprinting.idl
index 9098291..7013566 100644
--- a/librpc/idl/ntprinting.idl
+++ b/librpc/idl/ntprinting.idl
@@ -26,7 +26,7 @@ interface ntprinting
 		uint32 bottom;
 	} ntprinting_form;
 
-	void decode_ntprinting_form(
+	[public] void decode_ntprinting_form(
 		[in] ntprinting_form form
 		);
 
@@ -46,7 +46,7 @@ interface ntprinting
 		[flag(STR_UTF8|STR_NOTERM|NDR_REMAINING)] string_array dependent_files;
 	} ntprinting_driver;
 
-	void decode_ntprinting_driver(
+	[public] void decode_ntprinting_driver(
 		[in] ntprinting_driver driver
 		);
 
@@ -146,7 +146,7 @@ interface ntprinting
 		ntprinting_printer_data printer_data[count];
 	} ntprinting_printer;
 
-	void decode_ntprinting_printer(
+	[public] void decode_ntprinting_printer(
 		[in] ntprinting_printer printer
 		);
 }
diff --git a/librpc/ndr/ndr_basic.c b/librpc/ndr/ndr_basic.c
index b444300..c7a2c11 100644
--- a/librpc/ndr/ndr_basic.c
+++ b/librpc/ndr/ndr_basic.c
@@ -1213,16 +1213,21 @@ _PUBLIC_ void ndr_print_DATA_BLOB(struct ndr_print *ndr, const char *name, DATA_
 
 
 /*
-  push a DATA_BLOB onto the wire. 
-*/
+ * Push a DATA_BLOB onto the wire.
+ * 1) When called with LIBNDR_FLAG_ALIGN* alignment flags set, push padding
+ *    bytes _only_. The length is determined by the alignment required and the
+ *    current ndr offset.
+ * 2) When called with the LIBNDR_FLAG_REMAINING flag, push the byte array to
+ *    the ndr buffer.
+ * 3) Otherwise, push a uint32 length _and_ a corresponding byte array to the
+ *    ndr buffer.
+ */
 _PUBLIC_ enum ndr_err_code ndr_push_DATA_BLOB(struct ndr_push *ndr, int ndr_flags, DATA_BLOB blob)
 {
 	if (ndr->flags & LIBNDR_FLAG_REMAINING) {
 		/* nothing to do */
-	} else if (ndr->flags & LIBNDR_ALIGN_FLAGS) {
-		if (ndr->flags & LIBNDR_FLAG_NOALIGN) {
-			blob.length = 0;
-		} else if (ndr->flags & LIBNDR_FLAG_ALIGN2) {
+	} else if (ndr->flags & (LIBNDR_ALIGN_FLAGS & ~LIBNDR_FLAG_NOALIGN)) {
+		if (ndr->flags & LIBNDR_FLAG_ALIGN2) {
 			blob.length = NDR_ALIGN(ndr, 2);
 		} else if (ndr->flags & LIBNDR_FLAG_ALIGN4) {
 			blob.length = NDR_ALIGN(ndr, 4);
@@ -1239,18 +1244,23 @@ _PUBLIC_ enum ndr_err_code ndr_push_DATA_BLOB(struct ndr_push *ndr, int ndr_flag
 }
 
 /*
-  pull a DATA_BLOB from the wire. 
-*/
+ * Pull a DATA_BLOB from the wire.
+ * 1) when called with LIBNDR_FLAG_ALIGN* alignment flags set, pull padding
+ *    bytes _only_. The length is determined by the alignment required and the
+ *    current ndr offset.
+ * 2) When called with the LIBNDR_FLAG_REMAINING flag, pull all remaining bytes
+ *    from the ndr buffer.
+ * 3) Otherwise, pull a uint32 length _and_ a corresponding byte array from the
+ *    ndr buffer.
+ */
 _PUBLIC_ enum ndr_err_code ndr_pull_DATA_BLOB(struct ndr_pull *ndr, int ndr_flags, DATA_BLOB *blob)
 {
 	uint32_t length = 0;
 
 	if (ndr->flags & LIBNDR_FLAG_REMAINING) {
 		length = ndr->data_size - ndr->offset;
-	} else if (ndr->flags & LIBNDR_ALIGN_FLAGS) {
-		if (ndr->flags & LIBNDR_FLAG_NOALIGN) {
-			length = 0;
-		} else if (ndr->flags & LIBNDR_FLAG_ALIGN2) {
+	} else if (ndr->flags & (LIBNDR_ALIGN_FLAGS & ~LIBNDR_FLAG_NOALIGN)) {
+		if (ndr->flags & LIBNDR_FLAG_ALIGN2) {
 			length = NDR_ALIGN(ndr, 2);
 		} else if (ndr->flags & LIBNDR_FLAG_ALIGN4) {
 			length = NDR_ALIGN(ndr, 4);
diff --git a/librpc/ndr/ndr_ntprinting.c b/librpc/ndr/ndr_ntprinting.c
index 87b743d..76b296d 100644
--- a/librpc/ndr/ndr_ntprinting.c
+++ b/librpc/ndr/ndr_ntprinting.c
@@ -54,6 +54,7 @@ _PUBLIC_ enum ndr_err_code ndr_pull_ntprinting_printer(struct ndr_pull *ndr, int
 				uint32_t ptr = 0;
 				ptr = IVAL(ndr->data, ndr->offset);
 				if (ptr == 0) {
+					ndr->offset = ndr->offset + 4;
 					break;
 				}
 				r->printer_data = talloc_realloc(ndr, r->printer_data, struct ntprinting_printer_data, r->count + 1);
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 1a7ad8a..f4e8579 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -430,7 +430,7 @@ UTIL_OBJ = ../lib/util/rbtree.o ../lib/util/signal.o ../lib/util/time.o \
 		   ../lib/util/blocking.o ../lib/util/rfc1738.o \
 		   ../lib/util/select.o ../lib/util/util_pw.o
 
-CRYPTO_OBJ = ../lib/crypto/crc32.o ../lib/crypto/md5.o \
+CRYPTO_OBJ = ../lib/crypto/crc32.o @CRYPTO_MD5_OBJ@ \
 			 ../lib/crypto/hmacmd5.o ../lib/crypto/arcfour.o \
 			 ../lib/crypto/md4.o \
 			 ../lib/crypto/sha256.o ../lib/crypto/hmacsha256.o \
diff --git a/source3/configure.in b/source3/configure.in
index d8d3a1f..373396a 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -751,6 +751,25 @@ AC_CHECK_HEADERS(xfs/libxfs.h)
 AC_CHECK_HEADERS(netgroup.h)
 AC_CHECK_HEADERS(linux/falloc.h)
 
+dnl check for OS implementation of md5 conformant to rfc1321
+AC_CHECK_HEADERS(md5.h)
+if test x"$ac_cv_header_md5_h" = x"yes"; then
+	AC_DEFINE(HAVE_MD5_H, 1,
+		[Whether md5.h is available.])
+	AC_CHECK_LIB(md5, MD5Update,
+	    [
+		LIBS="${LIBS} -lmd5"
+		CRYPTO_MD5_OBJ=
+		AC_DEFINE(HAVE_LIBMD5, 1,
+		    [Whether libmd5 conformant to rfc1321 is available.])],
+	    [
+		CRYPTO_MD5_OBJ="../lib/crypto/md5.o"])
+else
+	CRYPTO_MD5_OBJ="../lib/crypto/md5.o"
+fi
+AC_SUBST(CRYPTO_MD5_OBJ)
+
+
 AC_CHECK_HEADERS(rpcsvc/yp_prot.h,,,[[
 #if HAVE_RPC_RPC_H
 #include <rpc/rpc.h>
diff --git a/source3/include/local.h b/source3/include/local.h
index d659522..499f468 100644
--- a/source3/include/local.h
+++ b/source3/include/local.h
@@ -265,6 +265,5 @@
 #define DEFAULT_SMB2_MAX_WRITE (64*1024)
 #define DEFAULT_SMB2_MAX_TRANSACT (64*1024)
 #define DEFAULT_SMB2_MAX_CREDITS 8192
-#define DEFAULT_SMB2_MAX_CREDIT_BITMAP_FACTOR 2
 
 #endif
diff --git a/source3/include/printing.h b/source3/include/printing.h
index bba7d53..c511fa2 100644
--- a/source3/include/printing.h
+++ b/source3/include/printing.h
@@ -46,7 +46,7 @@ enum {
 };
 
 typedef struct _print_queue_struct {
-	int job;		/* normally the UNIX jobid -- see note in
+	int sysjob;		/* normally the UNIX jobid -- see note in
 				   printing.c:traverse_fn_delete() */
 	int size;
 	int page_count;
@@ -68,6 +68,7 @@ typedef struct {
 /* Information for print jobs */
 struct printjob {
 	pid_t pid; /* which process launched the job */
+	uint32_t jobid; /* the spoolss print job identifier */
 	int sysjob; /* the system (lp) job number */
 	int fd; /* file descriptor of open file if open */
 	time_t starttime; /* when the job started spooling */
@@ -100,7 +101,9 @@ struct printif
   int (*job_delete)(const char *sharename, const char *lprm_command, struct printjob *pjob);
   int (*job_pause)(int snum, struct printjob *pjob);
   int (*job_resume)(int snum, struct printjob *pjob);
-  int (*job_submit)(int snum, struct printjob *pjob);
+  int (*job_submit)(int snum, struct printjob *pjob,
+		    enum printing_types printing_type,
+		    char *lpq_command);
 };
 
 extern struct printif	generic_printif;
@@ -123,7 +126,7 @@ extern struct printif	iprint_printif;
 #ifndef PRINT_SPOOL_PREFIX
 #define PRINT_SPOOL_PREFIX "smbprn."
 #endif


-- 
Samba Shared Repository


More information about the samba-cvs mailing list