1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00
Commit Graph

115803 Commits

Author SHA1 Message Date
Stefan Metzmacher
e49df24e80 replace: only include <sys/capability.h> with HAVE_POSIX_CAPABILITIES
On FreeBSD <sys/capability.h> is a legacy wrapper to <sys/capsicum.h>,
which implements something different. With FreeBSD 12 including
<sys/capability.h> generates a compiler warning/error.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2019-01-29 22:09:07 +01:00
Stefan Metzmacher
8061983d48 wscript: separate embedded_heimdal from system_heimdal
This allows to default (embedded_heimdal) to build even with a
broken krb5-config file from Heimdal.

In the system_heimdal case we parse the content of krb5-config
instead of just executing it. This fails on FreeBSD 12 as
krb5-config contains iso-8859-1 characters, which can't be parsed
as unicode python buffers when using python3.

Fixing the system_heimdal case is a task for another day,
I guess it will only work once we imported a current heimdal version
and actually tested the system_heimdal case.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2019-01-29 22:09:07 +01:00
Volker Lendecke
60b062d614 vfs_gpfs: Fix the 32-bit build
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>

Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Tue Jan 29 22:06:59 CET 2019 on sn-devel-144
2019-01-29 22:06:59 +01:00
Douglas Bagnall
ca93b1e15a s4/param/provision py_dom_sid_FromSid: avoid python memleak
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>

Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Tue Jan 29 16:54:48 CET 2019 on sn-devel-144
2019-01-29 16:54:48 +01:00
Douglas Bagnall
a3aa5af3d5 s4/pyrpc_util: catch alloc failure in py_dcerpc_interface_init_helper()
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2019-01-29 13:45:32 +01:00
Douglas Bagnall
e23b9f88cc s4/pyrpc_util: appropriately decrement refcounts on failure
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2019-01-29 13:45:32 +01:00
Douglas Bagnall
3584fe46d9 s3/py_passdb: maintain correct refcount on allocation failure
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2019-01-29 13:45:32 +01:00
Douglas Bagnall
1f07c478ec python/modules: maintain correct refcount for path items
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
2019-01-29 13:45:32 +01:00
David Disseldorp
e132458039 tests: don't rely on implicit int return type
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Tue Jan 29 03:47:27 CET 2019 on sn-devel-144
2019-01-29 03:47:27 +01:00
David Disseldorp
f1b43dfe4a s3/lib: clean up have_syscall() formatting
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2019-01-29 00:29:17 +01:00
David Disseldorp
45a202a197 s3/lib: don't rely on implicit int return type
C99 removed this behaviour.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2019-01-29 00:29:17 +01:00
Justin Stephenson
232273bfac s4:torture: Enforce Printer Class
Ensure that the provided inf defines Class=Printer for driver installation
to succeed.

Some driver packages(HP Universal Print Driver) include inf files with
other device types such as Class=USB. Attempting to install these will fail
when tested against Windows Server 2016 Print server using
iremotewinspool RPC calls.

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>

Autobuild-User(master): Björn Jacke <bjacke@samba.org>
Autobuild-Date(master): Mon Jan 28 19:34:41 CET 2019 on sn-devel-144
2019-01-28 19:34:41 +01:00
Justin Stephenson
669b135b49 s4:torture: Uninstall driver and cleanup
Uninstall and remove the print driver packages to cleanup
after the install. Cleanup and remove smb directory created
inside print$.

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:19 +01:00
Justin Stephenson
38967fd954 s4:torture: Add test_ValidatePrinterDriverInstalled
Perform checks against the print driver registry information
to ensure the driver was installed as expected.

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:19 +01:00
Justin Stephenson
c627b4e33b s4:torture: Add test_InstallPrinterDriverFromPackage
Install a previous uploaded driver package.

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:19 +01:00
Justin Stephenson
a9f283c84f s4:torture: Add test_UploadPrinterDriverPackage
Add test to Upload Print Driver, a prerequisite RPC call before
installing the print driver. The inf driver file to use in this test
will be provided using torture option:inf_file

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:19 +01:00
Justin Stephenson
a9619abb95 s4:torture: Add test_CopyDriverFiles
Add test to copy driver files from a torture option provided local driver_path
to the print$ share of //server/.

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:19 +01:00
Justin Stephenson
01f1bd3ff1 s4:torture: Add test_init_driver_info function
Validate torture options, obtain and retrieve driver information, and
call driver parsing function to retrieve driver info needed for
performing the test.

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:19 +01:00
Justin Stephenson
1ac1b3e12f s4:torture: Add driver parsing wrapper
Add wrapper function to parse inf driver file and get
validated driver information.

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:19 +01:00
Justin Stephenson
7783c62bbf lib:printer_driver: Retrieve Class value
Retrieve the Class value from the inf file [Version] section.

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:18 +01:00
Justin Stephenson
5442355cdb lib:printer_driver: Don't overwrite printprocessor
If the printprocessor is parsed from the inf file in the codepath:

setup_driver_name
  find_driver_files
    process_driver_section_printprocessor

Don't overwrite the value later on in setup_driver_name with the default "winprint"

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:18 +01:00
Justin Stephenson
166380111b lib:printer_driver: Parse SourceDisksNames section
This allows a driver inf with a [SourceDisksNames] section
excluding the system architecture to be parsed.

https://docs.microsoft.com/en-us/windows-hardware/drivers/install/inf-sourcedisksnames-section?f=255&MSPPError=-2147217396

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:18 +01:00
Justin Stephenson
04d92b0020 lib:printer_driver: Handle PrintProcessor string
This fixes an issue parsing the section of a certain HP
driver inf file:

PrintProcessor=%PRINT_PROCESSOR%

where %PRINT_PROCESSOR% is a [Strings] substituted value,
gp_inifile_getstring_ext() performs the substitution correctly.

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:18 +01:00
Guenther Deschner
b6712ab902 lib:printer_driver: Add printer_driver library to parse printer driver inf files
Pair-Programmed-With: Justin Stephenson <jstephen@redhat.com>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:18 +01:00
Günther Deschner
7d42029ff7 utils:libgpo: re-add libgpo as library, it should not be part of gpext
It was initially removed in 78fd02cf31 but
is needed by the inf file parsing.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:18 +01:00
Andreas Schneider
7abf1d0339 util: Add file tree walk interface
Add tftw() utility to emulate nftw() behavior with a userdata pointer.
This is repurposed from the csync project custom file tree walker.

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:18 +01:00
Justin Stephenson
5e97d3cda8 s4:torture: Use test client user and machine name defaults
Use "testclient_machine" and "testclient_user" in open printer calls.

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:18 +01:00
Justin Stephenson
a9c50a71e6 s4:torture: Add iremotewinspool driver torture template
Add the template with setup and teardown functions
for the iremotewinspool_driver torture suite, and
add this to the list of torture tests

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:18 +01:00
Justin Stephenson
5c1514e677 librpc:idl: Fix pszDestInfPath winspool parameter type
The in/out type of pszDestInfPath needs to be a string type for
RPC call UploadPrinterDriverPackage.

Per the Spec:

[in, out, unique, size_is(*pcchDestInfPath)] wchar_t* pszDestInfPath,

 pszDestInfPath: A pointer to a buffer that receives a string that
 specifies the full path of the directory to which the driver
 installation control file was copied.

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:18 +01:00
Justin Stephenson
8f240b12f9 s4:torture: Seperate out function calls inside params
Minor change to allow for easier debugging

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:18 +01:00
Justin Stephenson
e2eadf9a92 s4:torture: Share test iremotewinspool functions
Create iremotewinspool_common.c and iremotewinspool_common.h to make
test functions available for additional tests

Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Bjoern Jacke <bjacke@samba.org>
2019-01-28 15:44:18 +01:00
Douglas Bagnall
ed209cfee3 s3:nmbd: small improvements in --help strings
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Jan 28 14:28:29 CET 2019 on sn-devel-144
2019-01-28 14:28:29 +01:00
Douglas Bagnall
9e4ddff2d3 libgpo: remove 404 link in comment
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2019-01-28 10:29:26 +01:00
Douglas Bagnall
1f37ac3b06 libgpo: remove duplicate entry in value table
previously added a few lines up.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2019-01-28 10:29:26 +01:00
Douglas Bagnall
1c4ba8e93a pyrpc: typo in transfer syntax docstring
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
2019-01-28 10:29:26 +01:00
Andreas Schneider
6a332618b6 libcli:smb: Use C99 initializer for derivation in smbXcli_base
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:26 +01:00
Andreas Schneider
8c774f5a5d s4:cifsdd: Use C99 initializers for cifsdd argdef
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:26 +01:00
Andreas Schneider
4609e6fb2b s4:torture: Fix C99 initializers for vfs fruit tests
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:26 +01:00
Andreas Schneider
bb5b1c8078 s4:torture: Use C99 initializers in gentest
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:26 +01:00
Andreas Schneider
3e3e3a92f0 s4:torture: Add missing C99 initializer for torture_rpc_samlogon
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:26 +01:00
Andreas Schneider
c0a6f69e0a s4:torture: Use C99 initializer in test_SecurityDescriptorsSecInfo
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:25 +01:00
Andreas Schneider
7c9abe78bd s4:torture: Use C99 initializer for last element in get_and_set_info
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:25 +01:00
Andreas Schneider
6b0963f68e s4:torture: Complete C99 initializers for levels in raw qfileinfo test
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:25 +01:00
Andreas Schneider
0bcbec40bb s4:torture: Use C99 initializers for file_levels in smb2 getinfo test
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:25 +01:00
Andreas Schneider
660428a2e3 s4:torture: Use C99 initializers for level in smb2 dir test
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:25 +01:00
Andreas Schneider
a5362457af s4:torture: Use C99 initializers for hold_sharemode_table in smb2 sharemode test
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:25 +01:00
Andreas Schneider
7ceffb31d0 s4:torture: Use C99 initializers for dirs in smb2 oplock test
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:25 +01:00
Andreas Schneider
d731ddf869 s4:torture: Use C99 initializers for levels in raw notify test
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:25 +01:00
Andreas Schneider
1474de31a1 s4:torture: Use C99 initializers for levels in raw search test
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:24 +01:00
Andreas Schneider
2df8e808d6 s4:torture: Use C99 initializers for dirs in smb2 notify test
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
2019-01-28 10:29:24 +01:00