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

48420 Commits

Author SHA1 Message Date
Günther Deschner
8ec9d694fa werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in source3/printing/
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:17 +02:00
Günther Deschner
0fc0c6a24f werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in source3/libgpo/gpo_reg.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:17 +02:00
Günther Deschner
6748cdae00 werror: replace WERR_BADFILE with WERR_FILE_NOT_FOUND in source3/lib/smbconf/smbconf_reg.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:17 +02:00
Günther Deschner
46eace2f9f werror: replace WERR_BADFUNC with WERR_INVALID_FUNCTION in source3/rpc_server/spoolss/srv_spoolss_nt.c
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-28 00:04:16 +02:00
Jeremy Allison
7e9b6c613b s3: tidyup - move struct idle_event to util_event.h
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Sep 27 07:55:02 CEST 2016 on sn-devel-144
2016-09-27 07:55:02 +02:00
Ralph Boehme
71937b16bf s3/vfs/nfs4_acls: avoid a stat
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Sep 27 04:03:03 CEST 2016 on sn-devel-144
2016-09-27 04:03:02 +02:00
Günther Deschner
85a309b5a3 s3-rpc_client: use spoolss_driver_version_to_qword in winreg_printer_ver_to_qword
Guenter

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>

Autobuild-User(master): Uri Simchoni <uri@samba.org>
Autobuild-Date(master): Tue Sep 27 00:09:18 CEST 2016 on sn-devel-144
2016-09-27 00:09:18 +02:00
Günther Deschner
04bb54dbd8 s3-rpc_client: use spoolss_timestr_to_NTTIME in winreg_printer_date_to_NTTIME
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-09-26 20:24:18 +02:00
Günther Deschner
2f4f9a086c s3-rpc_client: add spoolss_driver_version_to_qword()
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-09-26 20:24:18 +02:00
Günther Deschner
56949a1c32 s3-rpc_client: add spoolss_timestr_to_NTTIME()
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
2016-09-26 20:24:18 +02:00
Günther Deschner
dc1754937f s3-modules: fix build warning in vfs shadow copy2 module
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Sun Sep 25 16:42:30 CEST 2016 on sn-devel-144
2016-09-25 16:42:30 +02:00
Andreas Schneider
631e063f6b s3-lib: Do not set an empty string in split_domain_user()
The function should also return if it failed or not.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sun Sep 25 12:56:17 CEST 2016 on sn-devel-144
2016-09-25 12:56:17 +02:00
Andreas Schneider
0c4e132438 s3-lib: Parse WORKGROUP\username in set_cmdline_auth_info_username()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-25 09:05:27 +02:00
Andreas Schneider
5328325f94 s3-lib: Do not create 'MACHINE$@' usernames
If there is no realm set we should not add it to the machine account.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-25 09:05:27 +02:00
Andreas Schneider
9413e337ce s3-script: Use unique krb5ccache name
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-25 09:05:27 +02:00
Andreas Schneider
3470dca36d s3-selftest: Rename samba3.ntlm_auth.krb5 old ccache test
This makes it easier to run only one of them.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-25 09:05:27 +02:00
Volker Lendecke
c60ea2c178 glusterfs: Avoid tevent_internal.h
Günther confirmed it still compiles :-)

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Sep 24 23:41:56 CEST 2016 on sn-devel-144
2016-09-24 23:41:56 +02:00
Jeremy Allison
4ed790ebbf s3: events. Move events.c to util_event.c
Remove all tevent internal code.

Everything is now stock tevent.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-09-24 19:52:08 +02:00
Jeremy Allison
fbfea52e1c s3: server: s3_tevent_context_init() -> samba_tevent_context_init()
We can now remove source3/lib/events.c

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-09-24 19:52:08 +02:00
Jeremy Allison
72785309aa s3: winbind: Remove dump_event_list() calls.
If needed we can add this into actual tevent.

Preparing to remove source3/lib/events.c

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-09-24 19:52:08 +02:00
Jeremy Allison
6e8bd13660 s3: nmbd: Final changeover to stock tevent for nmbd.
Removes unused references to fds array used for (removed)
poll call. Renames create_listen_pollfds() to
create_listen_array().

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-09-24 19:52:08 +02:00
Jeremy Allison
b857bf9b3f s3: nmbd: Change over to using tevent functions from direct poll.
This will allow us to eventually remove source3/lib/events.c
dependency and make nmbd purely tevent based.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-09-24 19:52:08 +02:00
Jeremy Allison
36b67729a6 s3: nmbd: Add a talloc_stackframe().
We will use this to create real tevent timer and fd
events.

This will allow us to eventually remove source3/lib/events.c
dependency and make nmbd purely tevent based.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-09-24 19:52:08 +02:00
Jeremy Allison
cca25c8f75 s3: nmbd: Add (currently unused) timeout and fd handlers.
This will allow us to eventually remove source3/lib/events.c
dependency and make nmbd purely tevent based.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-09-24 19:52:08 +02:00
Jeremy Allison
376e04656b s3: nmbd: Now attrs array mirrors fd's array use it in preference.
This will allow us to eventually remove source3/lib/events.c
dependency and make nmbd purely tevent based.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-09-24 19:52:08 +02:00
Jeremy Allison
7f0717e751 s3: nmbd: Ensure attrs array mirrors fd's array for dns.
This will allow us to eventually remove source3/lib/events.c
dependency and make nmbd purely tevent based.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-09-24 19:52:08 +02:00
Jeremy Allison
d8ade07307 s3: nmbd: Add fd, triggered elements to struct socket_attributes.
Zero the attrs array on allocation, and mirror the fd's.

This will allow us to eventually remove source3/lib/events.c
dependency and make nmbd purely tevent based.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12283
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2016-09-24 19:52:08 +02:00
Stefan Metzmacher
4470f01605 s3:nmbd: fix talloc_zero_array() check in nmbd_packets.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Sep 23 18:08:21 CEST 2016 on sn-devel-144
2016-09-23 18:08:21 +02:00
Günther Deschner
4ca831d09c s3-spoolss: in _spoolss_OpenPrinterEx map max_allowed for the print server
TODO: do real access checks against the security descriptor.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Guenther Deschner <gd@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
52b8b592c2 s3-spoolss: allow SetPrinter level 3 for server handles as well.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
b9475e88de s3-spoolss: use server sd stored in the backend in _spoolss_GetPrinter level 3
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
23a3abfe00 s3-rpc_client: add winreg_set_printserver_secdesc.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
302cb086a6 s3-rpc_client: add winreg_get_printserver_secdesc.
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
e207febf15 s3-spoolss: Fix _spoolss_GetPrinter behaviour for server handles.
Without this the security tab of the print server properties will be obviously
empty and only display a warning.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
1e4ea50a4c spoolss: rename spoolss_RpcSendRecvBidiData to spoolss_SendRecvBidiData
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
6476153069 spoolss: rename spoolss_RpcEnumJobNamedProperties to spoolss_EnumJobNamedProperties
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
cdf958824e spoolss: rename spoolss_RpcDeleteJobNamedProperty to spoolss_DeleteJobNamedProperty
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:27 +02:00
Günther Deschner
17d94d0531 spoolss: rename spoolss_RpcSetJobNamedProperty to spoolss_SetJobNamedProperty
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:26 +02:00
Günther Deschner
d64b316fed spoolss: rename spoolss_RpcGetJobNamedPropertyValue to spoolss_GetJobNamedPropertyValue
Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:26 +02:00
Günther Deschner
23f404b7f5 spoolss: rename spoolss_EnumPrintProcDataTypes to spoolss_EnumPrintProcessorDataTypes
This change makes automatic mapping for PAR->RPRN opcodes easier.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2016-09-22 12:29:26 +02:00
Volker Lendecke
b208499960 gencache: Bail out of stabilize if we can not get the allrecord lock
Bug: https://bugzilla.samba.org/show_bug.cgi?id=12045

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Sep 20 04:09:33 CEST 2016 on sn-devel-144
2016-09-20 04:09:33 +02:00
Ralph Boehme
70e2418975 s3/smbd: use correct talloc memory context for tevent subrequests
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Sep 19 23:25:37 CEST 2016 on sn-devel-144
2016-09-19 23:25:37 +02:00
Ralph Boehme
4f9d956fc4 s3/smbd: remove a misleading error message
It can happen that we get 0 cleanup events, so remove this error
message.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Sep 16 16:43:16 CEST 2016 on sn-devel-144
2016-09-16 16:43:16 +02:00
Ralph Boehme
2a2ac63975 s3/smbd: set FILE_ATTRIBUTE_DIRECTORY as necessary
Some VFS modules like GPFS will always return success from
SMB_VFS_GET_DOS_ATTRIBUTES() but only set a subset of the attributes. It
neither sets FILE_ATTRIBUTE_NORMAL nor FILE_ATTRIBUTE_DIRECTORY.

We already handle the case that the VFS stack returns with result==0 and
then add the FILE_ATTRIBUTE_NORMAL, regardless of the type of the
filesystem object. If we want to handle result==0 situation in the
SMB_VFS_GET_DOS_ATTRIBUTES() caller, then do it right by either setting
FILE_ATTRIBUTE_NORMAL or FILE_ATTRIBUTE_DIRECTORY.

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

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep 16 00:34:43 CEST 2016 on sn-devel-144
2016-09-16 00:34:42 +02:00
Christof Schmitt
5d4f7bfda5 nfs4acl: Fix owner mapping with ID_TYPE_BOTH
This fixes a corner case when using NFS4 ACLs with ID_TYPE_BOTH.  Before
this patch, the owner entry in the ACL would be mapped to a gid entry in
the NFSv4 ACL, and not the expected special owner entry. This is caused
by the id mapping returning a valid gid and the nfs4 mapping assumed
that this was actually a group.

Fix this by asking for the uid first, and explicitly checking if the
mapped uid matches the owner. That creates a uid entry in the NFSv4 ACL
that can be changed later in smbacl4_substitute_{simple,special} to the
expected special owner entry.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-15 20:50:06 +02:00
Günther Deschner
a9a1a16cc8 s3-spoolss: fix winreg_printer_ver_to_qword
We were reporting the OS minor number as the driver version number in all
GetDriver/EnumDriver calls.

Guenther

Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2016-09-15 20:50:06 +02:00
Volker Lendecke
e69b17d603 smbd: Reset O_NONBLOCK on open files
See the comment inline :-)

Bug: https://bugzilla.samba.org/show_bug.cgi?id=12268
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Simo <simo@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Sep 15 20:21:41 CEST 2016 on sn-devel-144
2016-09-15 20:21:41 +02:00
Volker Lendecke
e62ff6c41d unix_msg: Fix unix_dgram_send_queue_init
We should not free a DLIST element

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Sep 14 19:30:28 CEST 2016 on sn-devel-144
2016-09-14 19:30:27 +02:00
Volker Lendecke
5f764be23d unix_msg: Fix CID 1372875 Double close
The two error callers of unix_dgram_sendq_schedule_free already run down the
sendq in the error case.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
2016-09-14 15:42:26 +02:00
Amitay Isaacs
b9f120dfa1 s3-ctdb: Use correct db_id size in marshalling record buffer
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
2016-09-14 08:39:28 +02:00