ddiss/samba.git
13 years agos3-printing: fix memory leak in print_cups.c
David Disseldorp [Wed, 9 Mar 2011 14:18:22 +0000 (15:18 +0100)]
s3-printing: fix memory leak in print_cups.c

As found by valgrind, tmp_pcap_cache is not freed following printer list
tdb update.

Signed-off-by: Andreas Schneider <asn@samba.org>
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Mar 16 16:37:58 CET 2011 on sn-devel-104
(cherry picked from commit 97cdf15f0905039ca76a40093c712db8b0984caa)

13 years agos3-printing: remove duplicate cups response processing code
David Disseldorp [Wed, 9 Mar 2011 13:05:39 +0000 (14:05 +0100)]
s3-printing: remove duplicate cups response processing code

There is currently a lot of duplicate code included for processing
responses to CUPS_GET_PRINTERS and CUPS_GET_CLASSES requests. This
change splits this code into a separate function.

Signed-off-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 52845c1054941e697143940b94a0792f4d4e07c5)

13 years agos3-printing: use printcap IDL for IPC
David Disseldorp [Tue, 8 Mar 2011 15:36:03 +0000 (16:36 +0100)]
s3-printing: use printcap IDL for IPC

Use printcap IDL for marshalling and unmarshalling messages between cups
child and parent smbd processes. This simplifies the IPC and ensures
the parent is notified of cups errors encountered by the child.

https://bugzilla.samba.org/show_bug.cgi?id=7994
Signed-off-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit d6cb4feae1eab22d63b42eb5c480578fb1ee99bf)

13 years agoidl: define printcap IPC message format
David Disseldorp [Mon, 7 Mar 2011 14:32:02 +0000 (15:32 +0100)]
idl: define printcap IPC message format

Signed-off-by: Andreas Schneider <asn@samba.org>
(cherry picked from commit 9ea602741934f4e546147fa238332644e8e9f316)

13 years agos3: Use jenkins hash for str_checksum, fix bug 8010
Volker Lendecke [Tue, 15 Mar 2011 08:30:22 +0000 (09:30 +0100)]
s3: Use jenkins hash for str_checksum, fix bug 8010

From the bugreport:

I have a folder with ~90 photos: IMG_XXXX.JPG where XXXX is a four digit
number, almost consecutive (photos from camera for one day).
Current implementation gives about 30 different checksums for this set of
files.

13 years agolibwbclient: CID 2199 -- NULL pointer return
Volker Lendecke [Tue, 15 Mar 2011 10:19:57 +0000 (11:19 +0100)]
libwbclient: CID 2199 -- NULL pointer return

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Mar 15 12:08:48 CET 2011 on sn-devel-104

13 years agos3: Fix Coverity ID 2278: Uninitialized read
Volker Lendecke [Tue, 15 Mar 2011 10:09:26 +0000 (11:09 +0100)]
s3: Fix Coverity ID 2278: Uninitialized read

We passed the structure including the uninitialized elements to
dcerpc_winreg_SetValue.

13 years agos3: Fix Coverity ID 2279: Uninitialized read
Volker Lendecke [Tue, 15 Mar 2011 10:08:12 +0000 (11:08 +0100)]
s3: Fix Coverity ID 2279: Uninitialized read

We passed the structure including the uninitialized elements to
dcerpc_winreg_SetValue.

13 years agos3: Fix Coverity ID 2280: Uninitialized read
Volker Lendecke [Tue, 15 Mar 2011 10:06:49 +0000 (11:06 +0100)]
s3: Fix Coverity ID 2280: Uninitialized read

We passed the structure including the uninitialized elements to
dcerpc_winreg_SetValue.

13 years agos3: Fix Coverity ID 2281: Uninitialized read
Volker Lendecke [Tue, 15 Mar 2011 10:05:48 +0000 (11:05 +0100)]
s3: Fix Coverity ID 2281: Uninitialized read

We passed the structure including the uninitialized elements to
dcerpc_winreg_SetValue.

13 years agos3: Fix Coverity ID 2282: Uninitialized read
Volker Lendecke [Tue, 15 Mar 2011 10:04:23 +0000 (11:04 +0100)]
s3: Fix Coverity ID 2282: Uninitialized read

We passed the structure including the uninitialized elements to
dcerpc_winreg_SetValue.

13 years agos3: Fix Coverity ID 2283: Uninitialized read
Volker Lendecke [Tue, 15 Mar 2011 10:02:57 +0000 (11:02 +0100)]
s3: Fix Coverity ID 2283: Uninitialized read

We passed the structure including the uninitialized elements to
dcerpc_winreg_OpenKey.

13 years agos3: Fix Coverity ID 2284: Uninitialized read
Volker Lendecke [Tue, 15 Mar 2011 10:00:13 +0000 (11:00 +0100)]
s3: Fix Coverity ID 2284: Uninitialized read

We passed the structure including the uninitialized elements to
dcerpc_winreg_DeleteValue.

13 years agos3: Fix Coverity ID 2285: Uninitialized read
Volker Lendecke [Tue, 15 Mar 2011 09:58:55 +0000 (10:58 +0100)]
s3: Fix Coverity ID 2285: Uninitialized read

We passed the structure including the uninitialized elements to
dcerpc_winreg_DeleteValue.

13 years agos3: Fix Coverity ID 2286: Uninitialized read
Volker Lendecke [Tue, 15 Mar 2011 09:56:37 +0000 (10:56 +0100)]
s3: Fix Coverity ID 2286: Uninitialized read

We passed the structure including the uninitialized elements to
dcerpc_winreg_SetValue.

13 years agos3: Fix Coverity ID 2287: Uninitialized read
Volker Lendecke [Tue, 15 Mar 2011 09:54:59 +0000 (10:54 +0100)]
s3: Fix Coverity ID 2287: Uninitialized read

We passed the structure including the uninitialized elements to
dcerpc_winreg_CreateKey.

13 years agos3: Fix Coverity ID 2288: Uninitialized read
Volker Lendecke [Tue, 15 Mar 2011 09:52:49 +0000 (10:52 +0100)]
s3: Fix Coverity ID 2288: Uninitialized read

We passed the structure including the uninitialized elements to
dcerpc_winreg_SetValue.

13 years agos3: Fix Coverity ID 2289: Uninitialized read
Volker Lendecke [Tue, 15 Mar 2011 09:49:00 +0000 (10:49 +0100)]
s3: Fix Coverity ID 2289: Uninitialized read

We passed the structure including the uninitialized elements to
dcerpc_winreg_OpenKey.

13 years agos3: Fix Coverity ID 2290: Uninitialized read
Volker Lendecke [Tue, 15 Mar 2011 09:47:02 +0000 (10:47 +0100)]
s3: Fix Coverity ID 2290: Uninitialized read

We passed the structure including the uninitialized elements to
dcerpc_winreg_DeleteKey.

13 years agoRe-enable base.tcondev test for S3, now we pass it correctly.
Jeremy Allison [Mon, 14 Mar 2011 23:05:55 +0000 (16:05 -0700)]
Re-enable base.tcondev test for S3, now we pass it correctly.
(cherry picked from commit 349731fd32910e85558be1af645f891edd005a80)

13 years agoFix bug #8005 - smbtorture4 BASE-TCONDEV fails when tested on Samba
Jeremy Allison [Mon, 14 Mar 2011 23:12:31 +0000 (16:12 -0700)]
Fix bug #8005 - smbtorture4 BASE-TCONDEV fails when tested on Samba

When pulling non-aligned ucs2 strings, we neglected to add in the
pad byte to the buffer length we've eaten. This caused the device
string in TCONX (which seems to be one of the few places that uses
non-aligned ucs2 strings) to be incorrectly read.

Volker please check.

Jeremy.
(cherry picked from commit e59a950c049679f0394ea41b463dbb9837eb5e63)

13 years agos3: Fix the talloc hierarchy in shadow_copy2_connectpath
Volker Lendecke [Mon, 14 Mar 2011 17:35:36 +0000 (18:35 +0100)]
s3: Fix the talloc hierarchy in shadow_copy2_connectpath

We have to return on talloc_tos() because we don't have a mem_ctx given to us.
So we have to create a separate temporary talloc context.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Mar 14 19:21:11 CET 2011 on sn-devel-104
(cherry picked from commit 746b299ec1b11ea1e70c130b69a9a379ec478750)

13 years agos3: This module needs rewriting...
Volker Lendecke [Mon, 14 Mar 2011 15:17:49 +0000 (16:17 +0100)]
s3: This module needs rewriting...

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Mar 14 17:47:32 CET 2011 on sn-devel-104
(cherry picked from commit 43e343be8142b26b690c30faabf259205098a008)

13 years agos3: Fix bug 8009 - net rap session cannot get username
Volker Lendecke [Mon, 14 Mar 2011 17:35:23 +0000 (10:35 -0700)]
s3: Fix bug 8009 - net rap session cannot get username

Looking in [MS-RAP].pdf - these strings are always 4 bytes as an
offset in the rparam area, the string length is the size in the rdata area.
Se we must always return we have consumed 4 param bytes.

13 years agos3: Enhance error messages in idmap_tdb2_init_hwm
Volker Lendecke [Sun, 13 Mar 2011 09:41:27 +0000 (10:41 +0100)]
s3: Enhance error messages in idmap_tdb2_init_hwm

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar 13 12:59:37 CET 2011 on sn-devel-104
(cherry picked from commit 51ebaac75b8d068766872b156c3a4507ddc0705a)

13 years agoRevert "s3: Fix bug 8009"
Volker Lendecke [Sun, 13 Mar 2011 08:48:38 +0000 (09:48 +0100)]
Revert "s3: Fix bug 8009"

This reverts commit 877e75dc513b2e40b1741516460862037c349eaf.

13 years agos3: Fix bug 8009
Volker Lendecke [Sat, 12 Mar 2011 09:49:27 +0000 (10:49 +0100)]
s3: Fix bug 8009

Jeremy, please check!

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Mar 12 11:39:41 CET 2011 on sn-devel-104
(cherry picked from commit 1829891391d978e8dd322cdbd3320e30e5c78b72)

13 years agos3: Fix a typo
Volker Lendecke [Thu, 10 Mar 2011 16:11:37 +0000 (17:11 +0100)]
s3: Fix a typo

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Mar 11 13:15:00 CET 2011 on sn-devel-104
(cherry picked from commit 70c75b9ddfdc9801be0b5ba89cd095e974c22626)

13 years agopidl:Samba4/NDR/Client: fix arguments to warning()
Stefan Metzmacher [Fri, 11 Mar 2011 08:01:00 +0000 (09:01 +0100)]
pidl:Samba4/NDR/Client: fix arguments to warning()

We want the file:line: information displayed.

metze
(cherry picked from commit 6771ade5e7933af57b286870d73e7773521b8fdd)

13 years agopidl:Samba4/NDR/Parser: fix compiler warnings in 'pipe' related code
Stefan Metzmacher [Fri, 11 Mar 2011 08:00:13 +0000 (09:00 +0100)]
pidl:Samba4/NDR/Parser: fix compiler warnings in 'pipe' related code

metze
(cherry picked from commit f3465da07242cfa3f45da668c7ffa86e8beacf0e)

13 years agotevent/poll: use fde->additional_flags to hold the array index
Stefan Metzmacher [Wed, 2 Mar 2011 14:22:09 +0000 (15:22 +0100)]
tevent/poll: use fde->additional_flags to hold the array index

metze
(cherry picked from commit b7d5ddfa61d3b4c797dcee64cb23eb97cc55759c)

13 years agotevent: change tevent_fd->additional_flags to uint64_t
Stefan Metzmacher [Wed, 2 Mar 2011 14:20:46 +0000 (15:20 +0100)]
tevent: change tevent_fd->additional_flags to uint64_t

metze
(cherry picked from commit 20284f2a8429b5250ffb70e7124fa81115385c58)

13 years agos3: sid->domain_sid in winbindd_samr sam_rids_to_names
Volker Lendecke [Thu, 10 Mar 2011 15:23:20 +0000 (16:23 +0100)]
s3: sid->domain_sid in winbindd_samr sam_rids_to_names

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Mar 10 19:33:47 CET 2011 on sn-devel-104
(cherry picked from commit 257f0491cbcc6d8a7d05520ccb3ffa7dd7c27273)

13 years agoQuite some callers of sid_split_rid do not care about the rid
Volker Lendecke [Thu, 10 Mar 2011 15:19:17 +0000 (16:19 +0100)]
Quite some callers of sid_split_rid do not care about the rid
(cherry picked from commit 16b007c2232cc8432fa9e93409e16367d72b149e)

13 years agos3: Fix paranoia check in sam_rids_to_names
Volker Lendecke [Thu, 10 Mar 2011 15:07:36 +0000 (16:07 +0100)]
s3: Fix paranoia check in sam_rids_to_names
(cherry picked from commit 8d0e2415309ee15fbf509d44caf3e1df5b900620)

13 years agofrstrans.idl: add idl for RawGetFileDataAsync() and RdcGetFileDataAsync()
Stefan Metzmacher [Sat, 18 Sep 2010 17:45:27 +0000 (19:45 +0200)]
frstrans.idl: add idl for RawGetFileDataAsync() and RdcGetFileDataAsync()

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Thu Mar 10 15:18:22 CET 2011 on sn-devel-104
(cherry picked from commit 969c7bd77bdda55b9a07fc6381c4c1f562861cbe)

13 years agopidl: add support for 'pipe' at the NDR layer
Stefan Metzmacher [Mon, 20 Sep 2010 23:44:38 +0000 (01:44 +0200)]
pidl: add support for 'pipe' at the NDR layer

metze
(cherry picked from commit d79fb9098bc3ce37daa8ab6d51dc62ad0bc2ad26)

13 years agopidl/idl.yp: fill 'pipe' elements with array and count
Stefan Metzmacher [Tue, 21 Sep 2010 17:30:08 +0000 (19:30 +0200)]
pidl/idl.yp: fill 'pipe' elements with array and count

metze
(cherry picked from commit f43e757096750dc2844af49363981fd0246d9f48)

13 years agopidl:NDR/Client: skip all functions if pipe elements are used
Stefan Metzmacher [Mon, 11 Oct 2010 06:03:18 +0000 (08:03 +0200)]
pidl:NDR/Client: skip all functions if pipe elements are used

We don't support pipe at the dcerpc level yet.

metze
(cherry picked from commit 91ef69435167f44d1353e15cef2eb4969b53d27c)

13 years agopidl:NDR/Client: skip sync functions if pipe elements are used
Stefan Metzmacher [Mon, 11 Oct 2010 06:03:18 +0000 (08:03 +0200)]
pidl:NDR/Client: skip sync functions if pipe elements are used

metze
(cherry picked from commit f383497436dbbadfdcb1062fee0c111eca50df7d)

13 years agopidl:Python: don't generate functions with pipe elements
Stefan Metzmacher [Mon, 11 Oct 2010 05:54:59 +0000 (07:54 +0200)]
pidl:Python: don't generate functions with pipe elements

metze
(cherry picked from commit 7537f9c9bb78992850a641973a8df818d2fcaf25)

13 years agopidl:Samba3/ClientNDR: don't generate stubs for functions with pipe elements
Stefan Metzmacher [Mon, 11 Oct 2010 05:53:48 +0000 (07:53 +0200)]
pidl:Samba3/ClientNDR: don't generate stubs for functions with pipe elements

metze
(cherry picked from commit 29bd658634e9afe0037170a2f3ad2512f9106761)

13 years agopidl/NDR: add ContainsPipe() function
Stefan Metzmacher [Tue, 21 Sep 2010 00:20:14 +0000 (02:20 +0200)]
pidl/NDR: add ContainsPipe() function

metze
(cherry picked from commit eaa7ecdda7938e12db94f5ecbb978e5e7bca5f16)

13 years agolibrpc/tools/ndrdump: add support for dcerpc 'pipe' elements in functions
Stefan Metzmacher [Tue, 21 Sep 2010 06:34:31 +0000 (08:34 +0200)]
librpc/tools/ndrdump: add support for dcerpc 'pipe' elements in functions

metze
(cherry picked from commit 7d451838b978b7a88bc45a9fc878b99af59be7c3)

13 years agolibrpc/ndr: add ndr_push_pipe_chunk_trailer() and ndr_check_pipe_chunk_trailer()
Stefan Metzmacher [Tue, 21 Sep 2010 03:18:02 +0000 (05:18 +0200)]
librpc/ndr: add ndr_push_pipe_chunk_trailer() and ndr_check_pipe_chunk_trailer()

metze
(cherry picked from commit 2a47ed81066ccf7573b80e0a85bce8eb9866c628)

13 years agolibrpc/ndr: add ndr_interface_call_pipe
Stefan Metzmacher [Sun, 19 Sep 2010 11:56:13 +0000 (13:56 +0200)]
librpc/ndr: add ndr_interface_call_pipe

metze
(cherry picked from commit eceea8641e9079534a15ce01d24ef94acbe49d98)

13 years agopidl/Typelist: add is_fixed_size_scalar()
Stefan Metzmacher [Tue, 8 Mar 2011 14:45:33 +0000 (15:45 +0100)]
pidl/Typelist: add is_fixed_size_scalar()

metze
(cherry picked from commit 6e4e3f57e43189fa2944c841982621594d167d2d)

13 years agopidl/Typelist: dnsp_name and dnsp_string are scalar references
Stefan Metzmacher [Tue, 8 Mar 2011 14:44:31 +0000 (15:44 +0100)]
pidl/Typelist: dnsp_name and dnsp_string are scalar references

metze
(cherry picked from commit 6ef40f31992455c7603f0722846cfab4fe4fa0bc)

13 years agos3:test: ignore "setup directory" parameter in the net registry roundtrip test
Michael Adam [Mon, 7 Mar 2011 16:30:58 +0000 (17:30 +0100)]
s3:test: ignore "setup directory" parameter in the net registry roundtrip test

13 years agos3:test: the registry roundtrip test passes now
Michael Adam [Fri, 4 Mar 2011 23:58:19 +0000 (00:58 +0100)]
s3:test: the registry roundtrip test passes now

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sat Mar  5 02:19:33 CET 2011 on sn-devel-104

13 years agoselftest the raw.mux test is flaky:
Andrew Bartlett [Tue, 22 Feb 2011 02:37:06 +0000 (13:37 +1100)]
selftest the raw.mux test is flaky:

TESTING MULTIPLEXED LOCK/LOCK/UNLOCK
establishing a lock
the second lock will conflict with the first
this will too, but we'll unlock while waiting
unlock the first range
recv the async reply
async lock took 265.40 msec
failed to trigger early lock retry
UNEXPECTED(error): samba3.posix_s3.raw.mux.mux

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Feb 22 07:09:07 CET 2011 on sn-devel-104

13 years agos3:test: run the net.rpc.registry test under "dc" not "dc:local"
Michael Adam [Wed, 16 Feb 2011 13:48:16 +0000 (14:48 +0100)]
s3:test: run the net.rpc.registry test under "dc" not "dc:local"

There is no need to run it on the rpc server, but it should
be run from a remote host.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Feb 16 16:05:58 CET 2011 on sn-devel-104

13 years agos3:test: rename samba3.blackbox.testparm_s3 -> samba3.blackbox.testparm
Michael Adam [Wed, 16 Feb 2011 13:43:41 +0000 (14:43 +0100)]
s3:test: rename samba3.blackbox.testparm_s3 -> samba3.blackbox.testparm

13 years agos3:test: rename samba3.blackbox.net_s3_registry_roundtrip -> samba3.blackbox.net...
Michael Adam [Wed, 16 Feb 2011 13:39:26 +0000 (14:39 +0100)]
s3:test: rename samba3.blackbox.net_s3_registry_roundtrip -> samba3.blackbox.net.local.registry.roundtrip

13 years agos3:test: rename samba3.blackbox.net_s3_registry_rpc -> samba3.blackbox.net.rpc.registry
Michael Adam [Wed, 16 Feb 2011 13:37:05 +0000 (14:37 +0100)]
s3:test: rename samba3.blackbox.net_s3_registry_rpc -> samba3.blackbox.net.rpc.registry

13 years agos3:test: rename samba3.blackbox.net_s3_registry -> samba3.blackbox.net.local.registry
Michael Adam [Wed, 16 Feb 2011 13:37:05 +0000 (14:37 +0100)]
s3:test: rename samba3.blackbox.net_s3_registry -> samba3.blackbox.net.local.registry

13 years agos3:test: rename samba3.blackbox.net_s3_misc --> samba3.blackbox.net.misc
Michael Adam [Wed, 16 Feb 2011 13:35:53 +0000 (14:35 +0100)]
s3:test: rename samba3.blackbox.net_s3_misc --> samba3.blackbox.net.misc

13 years agos3:test: mark the net_registry_roundtrip test as knownfail
Michael Adam [Wed, 16 Feb 2011 11:38:26 +0000 (12:38 +0100)]
s3:test: mark the net_registry_roundtrip test as knownfail

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Feb 16 13:45:09 CET 2011 on sn-devel-104

13 years agos3:test: add the registry roundtrip test as samba3.blackbox.net_s3_registry_roundtrip
Michael Adam [Wed, 16 Feb 2011 10:54:58 +0000 (11:54 +0100)]
s3:test: add the registry roundtrip test as samba3.blackbox.net_s3_registry_roundtrip

13 years agos3:test: mark vanished parameter "postscript" invalid in net registry roundtrip test
Michael Adam [Fri, 4 Mar 2011 23:55:27 +0000 (00:55 +0100)]
s3:test: mark vanished parameter "postscript" invalid in net registry roundtrip test

13 years agos3:test: in net registry roundtrip test, mark "lock dir" as invalid parameter
Michael Adam [Fri, 4 Mar 2011 23:54:28 +0000 (00:54 +0100)]
s3:test: in net registry roundtrip test, mark "lock dir" as invalid parameter

This is a synonym of lock directory which is already marked invalid.

13 years agos3:test: in net registry roundtrip test, exclude the files from exclude/logon
Michael Adam [Fri, 4 Mar 2011 23:50:21 +0000 (00:50 +0100)]
s3:test: in net registry roundtrip test, exclude the files from exclude/logon

These files are not samba config files...

13 years agos3:test: correctly react to each failing step in the net registry roundtrip tests
Michael Adam [Fri, 4 Mar 2011 22:17:02 +0000 (23:17 +0100)]
s3:test: correctly react to each failing step in the net registry roundtrip tests

13 years agos3:test: improve logging in the net registry roundtrip test steps
Michael Adam [Fri, 4 Mar 2011 22:12:08 +0000 (23:12 +0100)]
s3:test: improve logging in the net registry roundtrip test steps

13 years agos3:test: fix smbclient test on older systems (usage of mktemp)
Michael Adam [Mon, 28 Feb 2011 16:06:01 +0000 (17:06 +0100)]
s3:test: fix smbclient test on older systems (usage of mktemp)

--tmpdir is not a valid option to mktemp on older systems

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Feb 28 18:12:46 CET 2011 on sn-devel-104

13 years agos3:test: fix registry roundtrip test on older systems (usage of mktemp)
Michael Adam [Mon, 28 Feb 2011 16:06:01 +0000 (17:06 +0100)]
s3:test: fix registry roundtrip test on older systems (usage of mktemp)

--tmpdir is not a valid option to mktemp on older systems

13 years agos3:tests: move the log directory of the smbclient_s3 test to st/
Michael Adam [Mon, 21 Feb 2011 11:48:48 +0000 (12:48 +0100)]
s3:tests: move the log directory of the smbclient_s3 test to st/

And use a proper mktemp call to create a unique name.
The old location under /tmp/ was bad.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Feb 21 13:39:06 CET 2011 on sn-devel-104

13 years agos3:tests: clean up old log directories of the registry.roundtrip test
Michael Adam [Mon, 21 Feb 2011 11:48:15 +0000 (12:48 +0100)]
s3:tests: clean up old log directories of the registry.roundtrip test

13 years agos3:tests: fix the smbclient_s3 test for multiple users running it.
Michael Adam [Sat, 19 Feb 2011 10:49:43 +0000 (11:49 +0100)]
s3:tests: fix the smbclient_s3 test for multiple users running it.

The test created /tmp/log.smbclient, which lets the test fail if
two users are running the test simultaneously.

Now /tmp/log.test_smbclient_s3.$$ is used.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sat Feb 19 13:06:57 CET 2011 on sn-devel-104

13 years agos3:tests: remove unused script/tests/test_functions.sh
Michael Adam [Sat, 19 Feb 2011 01:29:54 +0000 (02:29 +0100)]
s3:tests: remove unused script/tests/test_functions.sh

This is not used any more now with selftest.

13 years agos3:tests: include subunit.sh instead of test_functions.sh in test_posix_s3.sh
Michael Adam [Sat, 19 Feb 2011 00:14:54 +0000 (01:14 +0100)]
s3:tests: include subunit.sh instead of test_functions.sh in test_posix_s3.sh

It would actually not be necessary at all to include a script providing
testit() and so on, since this script snippet is currently only sourced
in tests.sh to plan the included test.

13 years agos3:tests: include subunit.sh instead of test_functions.sh in test_ntlm_auth_s3.sh
Michael Adam [Sat, 19 Feb 2011 00:14:54 +0000 (01:14 +0100)]
s3:tests: include subunit.sh instead of test_functions.sh in test_ntlm_auth_s3.sh

It would actually not be necessary at all to include a script providing
testit() and so on, since this script snippet is currently only sourced
in tests.sh to plan the included test.

13 years agos3:tests: include subunit.sh instead of test_functions.sh in test_smbtorture_s3.sh
Michael Adam [Sat, 19 Feb 2011 00:14:54 +0000 (01:14 +0100)]
s3:tests: include subunit.sh instead of test_functions.sh in test_smbtorture_s3.sh

It would actually not be necessary at all to include a script providing
testit() and so on, since this script snippet is currently only sourced
in tests.sh to plan the included test.

13 years agos3:tests: include subunit.sh instead of test_functions.sh in test_wbinfo_s3.sh
Michael Adam [Sat, 19 Feb 2011 00:14:54 +0000 (01:14 +0100)]
s3:tests: include subunit.sh instead of test_functions.sh in test_wbinfo_s3.sh

It would actually not be necessary at all to include a script providing
testit() and so on, since this script snippet is currently only sourced
in tests.sh to plan the included test.

13 years agos3:tests: use the blackbox subunit output formatter for the testparm_s3 test.
Michael Adam [Fri, 18 Feb 2011 23:32:06 +0000 (00:32 +0100)]
s3:tests: use the blackbox subunit output formatter for the testparm_s3 test.

With the old output, failures would go unnoticed by selftest.

13 years agos3:tests: include subunit.sh instead of test_functions.sh in test_local_s3.sh
Michael Adam [Sat, 19 Feb 2011 00:14:54 +0000 (01:14 +0100)]
s3:tests: include subunit.sh instead of test_functions.sh in test_local_s3.sh

It would actually not be necessary at all to include a script providing
testit() and so on, since this script snippet is currently only sourced
in tests.sh to plan the included test.

13 years agos3:tests: use the blackbox subunit output formatter for the smbclient_s3 test.
Michael Adam [Fri, 18 Feb 2011 23:32:06 +0000 (00:32 +0100)]
s3:tests: use the blackbox subunit output formatter for the smbclient_s3 test.

With the old output, failures would go unnoticed by selftest.

13 years agos3:test: remove the give/take admin rights code from the net(rpc)registry test
Michael Adam [Wed, 16 Feb 2011 13:47:02 +0000 (14:47 +0100)]
s3:test: remove the give/take admin rights code from the net(rpc)registry test

This is not neede any more.
The token has been fixed at the lower level on the dc.

13 years agos3:test: move the registry roundtrip test to a test script of its own
Michael Adam [Wed, 16 Feb 2011 10:52:39 +0000 (11:52 +0100)]
s3:test: move the registry roundtrip test to a test script of its own

13 years agos3:test: add comment header to test_net_registry.sh
Michael Adam [Wed, 16 Feb 2011 10:50:57 +0000 (11:50 +0100)]
s3:test: add comment header to test_net_registry.sh

13 years agos3:test: use the blackbox subunit test driver in the net_registry tests.
Michael Adam [Tue, 15 Feb 2011 21:54:06 +0000 (22:54 +0100)]
s3:test: use the blackbox subunit test driver in the net_registry tests.

13 years agos3:test: use the blackbox subunit test driver in the net_misc tests.
Michael Adam [Tue, 15 Feb 2011 21:54:06 +0000 (22:54 +0100)]
s3:test: use the blackbox subunit test driver in the net_misc tests.

13 years agos3:test: add a simple failing blackbox testsuite
Michael Adam [Tue, 15 Feb 2011 15:08:49 +0000 (16:08 +0100)]
s3:test: add a simple failing blackbox testsuite

13 years agos3:test: add a simple blackbox test that succeeds.
Michael Adam [Tue, 15 Feb 2011 15:05:06 +0000 (16:05 +0100)]
s3:test: add a simple blackbox test that succeeds.

13 years agotestprogs/blackbox/subunit: add testok() for easier integration of s3 tests.
Michael Adam [Tue, 15 Feb 2011 15:03:58 +0000 (16:03 +0100)]
testprogs/blackbox/subunit: add testok() for easier integration of s3 tests.

13 years agolibsmbclient: Fix a typo
Volker Lendecke [Wed, 9 Mar 2011 09:16:30 +0000 (10:16 +0100)]
libsmbclient: Fix a typo

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Mar  9 11:19:36 CET 2011 on sn-devel-104
(cherry picked from commit dec9d03e2585bdf4bfbb72ed8cd7c0f9c0026f76)

13 years agos3: state->ev is not needed in winbindd_lookupsid
Volker Lendecke [Mon, 7 Mar 2011 19:04:48 +0000 (20:04 +0100)]
s3: state->ev is not needed in winbindd_lookupsid

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Mon Mar  7 20:52:53 CET 2011 on sn-devel-104
(cherry picked from commit 6013d7589bc5ef0ca53eb2bab3b4cd791de2a027)

13 years agos3-docs: manpage for "net idmap delete"
Gregor Beck [Mon, 7 Mar 2011 08:57:10 +0000 (09:57 +0100)]
s3-docs: manpage for "net idmap delete"

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Mar  7 14:26:42 CET 2011 on sn-devel-104

13 years agos3-docs: manpage for "smbcontrol xx idmap"
Gregor Beck [Mon, 7 Mar 2011 08:56:48 +0000 (09:56 +0100)]
s3-docs: manpage for "smbcontrol xx idmap"

13 years agos3:registry: fix invalid write in iconvert_talloc()
Michael Adam [Fri, 4 Mar 2011 22:53:44 +0000 (23:53 +0100)]
s3:registry: fix invalid write in iconvert_talloc()

For a non-preallocated dest-string and sourcestring of len < 2,
(one or both of the) final two two zero-bytes would be written
after the end of the allocated dest-string. The sourcelen did
not include the source string terminator. For longer strings,
this was not a problem because the dest-string would have been
reallocated in the convert-loop. This is fixed now by allocating
two extra bytes for the terminating 0-bytes that are needed anyways
in the initial allocation.

Pair-Programmed-With: Gregor Beck <gbeck@sernet.de>

13 years agoFix the examples/VFS build.
Jeremy Allison [Mon, 7 Mar 2011 12:46:20 +0000 (04:46 -0800)]
Fix the examples/VFS build.
(cherry picked from commit 79c6f0d440b30d2c36a50a8ea5735a5a1818b551)

13 years agoFix examples/VFS to use correct prototypes for is_offline() and set_offline().
Jeremy Allison [Mon, 7 Mar 2011 11:53:11 +0000 (03:53 -0800)]
Fix examples/VFS to use correct prototypes for is_offline() and set_offline().
(cherry picked from commit 0faffd4556438f7add6312e58acca345abfbe7fb)

13 years agolib/socket_wrapper: try to fix the build on solaris
Stefan Metzmacher [Fri, 4 Mar 2011 20:14:27 +0000 (21:14 +0100)]
lib/socket_wrapper: try to fix the build on solaris

struct msg does not contain msg_control, msg_controllen and msg_flags
on solaris.

metze
(cherry picked from commit 2c7c3d03d5c6b99370f9007aa6fe874d36512be2)

13 years agos3: add two missing vfs disconnect calls
David Disseldorp [Fri, 4 Mar 2011 13:53:39 +0000 (14:53 +0100)]
s3: add two missing vfs disconnect calls

The fix for bug 7976 added a vfs connect call to create_conn_struct.
This change adds two further disconnect calls that were missed by the
original change.

13 years agos3-printing: fix cups pcap reload with no printers
David Disseldorp [Thu, 30 Dec 2010 14:58:48 +0000 (15:58 +0100)]
s3-printing: fix cups pcap reload with no printers

cups_async_callback() is called to receive new printcap data from a
child process which requests the information from cupsd.
Newly received printcap information is stored in a temporary printcap
cache (tmp_pcap_cache). Once the child process closes the printcap IPC
file descriptor, the system printcap cache is replaced with the newly
populated tmp_pcap_cache, however this only occurs if tmp_pcap_cache is
non null (has at least one printer).

If the printcap cache is empty, which is the case when cups is not
exporting any printers, the printcap cache is not replaced resulting in
stale data.

https://bugzilla.samba.org/show_bug.cgi?id=7915

13 years agos3-printing: remove unneeded local_pcap_copy global
David Disseldorp [Thu, 30 Dec 2010 13:32:29 +0000 (14:32 +0100)]
s3-printing: remove unneeded local_pcap_copy global

The cups local_pcap_copy global served as a temporary buffer during
asynchronous cups printcap cache updates, as well as indicating when
the printcap cache had not yet been filled and printcap cache update
should block.

As smbd printcap reads are now triggered by the parent smbd following
printcap cache update, the variable and blocking mechanism are no longer
needed.

13 years agos3-printing: follow force user/group for driver IO
David Disseldorp [Wed, 2 Mar 2011 13:34:28 +0000 (14:34 +0100)]
s3-printing: follow force user/group for driver IO

Configuring force user/group settings for the print$ share currently has
unexpected results, this is explained by how the driver upload/add
process takes place. Consider the following example:

[print$]
        path = /print-drv
        write list = $DRIVER_UPLOAD_USER
        force group = ntadmin

- the client connects to the [print$] share and uploads all driver
  files to the /print-drv/W32X86 directory.

- This is permitted, as /print-drv/W32X86 is owned by group ntadmin, and
  the "force group = ntadmin" takes effect for the [print$] session.

- Once all files are uploaded, the client connects to the [ipc$]
  share and issues an AddPrinterDriverEx spoolss request.

- In handling this request move_driver_to_download_area() is called,
  which attempts to create the directory /print-drv/W32X86/3

- The create directory fails, as it is done as the user connected to
  the [ipc$] share which does not have permission to write to the driver
  directory. The [print$] "force group = ntadmin" has no effect.

This is a regression from previous behaviour prior to the commit:
783ab04 Convert move_driver_to_download_area to use create_conn_struct.

https://bugzilla.samba.org/show_bug.cgi?id=7921

13 years agos3: Move EXOP definitions to smbldap.h
Volker Lendecke [Sun, 6 Mar 2011 08:31:40 +0000 (09:31 +0100)]
s3: Move EXOP definitions to smbldap.h

This attempts to fix the build on Solaris

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sun Mar  6 10:45:16 CET 2011 on sn-devel-104
(cherry picked from commit f6f8ec8d8bccee5eec05c7f546e306bced897bbb)

13 years agos3: Fix uninitialized variables
Volker Lendecke [Sat, 5 Mar 2011 16:37:53 +0000 (17:37 +0100)]
s3: Fix uninitialized variables

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Mar  5 17:25:43 CET 2011 on sn-devel-104
(cherry picked from commit a40bb91213a321ea08897d7152d9d64defa1a8b1)

13 years agos3: Fix a memory leak in check_sam_security_info3
Volker Lendecke [Sat, 5 Mar 2011 11:57:59 +0000 (12:57 +0100)]
s3: Fix a memory leak in check_sam_security_info3

Abartlet, this commit makes check_sam_security_info3 use talloc_tos() and also
cleans up the temporary talloc stackframe.

The old code created a temporary talloc context off "mem_ctx" but failed to
clean up the tmp_ctx in all but one return paths.

talloc_stackframe()/talloc_tos() is designed as a defense against exactly this
error: Even if we failed to free the frame when returning from the routine, it
would be cleaned up very soon, in our main event loop.

Please check this patch!

Thanks,

Volker

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat Mar  5 14:08:37 CET 2011 on sn-devel-104
(cherry picked from commit dcbfb6fc0b9050168e2010673caccb7ec8807bd1)