kai/samba-autobuild/.git
8 years agogpfswrap: Remove unused wrapper for gpfs_fnctl
Christof Schmitt [Thu, 2 Jul 2015 22:20:01 +0000 (15:20 -0700)]
gpfswrap: Remove unused wrapper for gpfs_fnctl

With the removal of the fileset quota check this wrapper function is
longer used.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
8 years agovfs_gpfs: Use C99 initializers instead of ZERO_STRUCT
Christof Schmitt [Mon, 23 Mar 2015 19:57:39 +0000 (12:57 -0700)]
vfs_gpfs: Use C99 initializers instead of ZERO_STRUCT

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
8 years agovfs_gpfs: Use ACL defines from GPFS 3.5 header files
Christof Schmitt [Mon, 23 Mar 2015 19:54:34 +0000 (12:54 -0700)]
vfs_gpfs: Use ACL defines from GPFS 3.5 header files

GPFS 3.5 is now the oldest support version. Cleanup the ACL code by
using the defines and structs from the 3.5 header file.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
8 years agoctdb: Accept hex format for pdelete and ptrans commands
Christof Schmitt [Mon, 6 Jul 2015 21:32:15 +0000 (14:32 -0700)]
ctdb: Accept hex format for pdelete and ptrans commands

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoctdb: Create helper function for optional hex input
Christof Schmitt [Mon, 6 Jul 2015 20:07:33 +0000 (13:07 -0700)]
ctdb: Create helper function for optional hex input

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoRemove ctdb_conn.[ch]
Volker Lendecke [Sun, 3 May 2015 16:30:45 +0000 (16:30 +0000)]
Remove ctdb_conn.[ch]

This was only used in notify_internal.c

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): Wed Jul  8 02:53:33 CEST 2015 on sn-devel-104

8 years agonotifyd: Add notifydd
Volker Lendecke [Tue, 16 Jun 2015 14:57:14 +0000 (14:57 +0000)]
notifyd: Add notifydd

A little standalone notify daemon to play around with.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoutils: add net notify
Volker Lendecke [Mon, 15 Jun 2015 12:14:03 +0000 (12:14 +0000)]
utils: add net notify

A little tool to play with the notify daemon

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agonotify: Remove two now unused stubs
Volker Lendecke [Fri, 9 Jan 2015 12:59:46 +0000 (12:59 +0000)]
notify: Remove two now unused stubs

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agosmbd: Remove SMB_VFS_NOTIFY_WATCH
Volker Lendecke [Fri, 12 Dec 2014 14:37:30 +0000 (15:37 +0100)]
smbd: Remove SMB_VFS_NOTIFY_WATCH

No longer needed

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agonotify: Re-add notify_walk()
Volker Lendecke [Fri, 9 Jan 2015 12:48:56 +0000 (12:48 +0000)]
notify: Re-add notify_walk()

This used to be a tdb traverse wrapper. Now we get the notify db from
notifyd via messages.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agonotifyd: Add notifyd_parse_db()
Volker Lendecke [Fri, 9 Jan 2015 12:24:58 +0000 (12:24 +0000)]
notifyd: Add notifyd_parse_db()

The database format notifyd is "private" to it. This makes it
possible for smbcontrol and others to query notifyd's database with
MSG_SMB_NOTIFY_GET_DB and inspect it without having to know exactly what
format it uses.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agosmbd: Remove the notify_fam module
Volker Lendecke [Fri, 21 Nov 2014 16:28:02 +0000 (17:28 +0100)]
smbd: Remove the notify_fam module

This has been moved to main smbd

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agosmbd: Kernel change notify is done by notifyd
Volker Lendecke [Fri, 21 Nov 2014 16:23:18 +0000 (17:23 +0100)]
smbd: Kernel change notify is done by notifyd

smbd itself does not need to call VFS_NOTIFY_WATCH anymore

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agosmbd: Replace the tdb-based notify_internal with notify_msg
Volker Lendecke [Fri, 21 Nov 2014 16:05:16 +0000 (17:05 +0100)]
smbd: Replace the tdb-based notify_internal with notify_msg

For the moment, this removes smbstatus -N output. It will come back with
the next commits.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agosmbd: Don't start the notify cleanup anymore
Volker Lendecke [Fri, 21 Nov 2014 15:58:47 +0000 (16:58 +0100)]
smbd: Don't start the notify cleanup anymore

We don't have a database to clean up anymore

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agosmbd: Start the notify daemon
Volker Lendecke [Fri, 21 Nov 2014 15:55:25 +0000 (16:55 +0100)]
smbd: Start the notify daemon

For this we need the kernel change notify stuff to be global: There's only one
notifyd and we have to pass over the kernel change notify watch function

Signed-off-by: Volker Lendecke <vl@samba.org>
8 years agosmbd: Add the notify daemon
Volker Lendecke [Fri, 21 Nov 2014 15:52:47 +0000 (16:52 +0100)]
smbd: Add the notify daemon

This adds the notify daemon listening on MSG_SMB_NOTIFY_REC_CHANGE
and MSG_SMB_NOTIFY_TRIGGER messages. It relies on ctdbd to distribute
the notify database and events in a cluster.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agosmbd: Add direct notify_fam support
Volker Lendecke [Thu, 20 Nov 2014 15:30:51 +0000 (15:30 +0000)]
smbd: Add direct notify_fam support

notifyd won't have the VFS around, it is a systemwide daemon without
a connection to specific shares. To continue FAM support, notifyd
needs to be able to link it directly. This adds code to make fam
equivalent to inotify.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: Make "kernel change notify" global
Volker Lendecke [Fri, 21 Nov 2014 15:02:27 +0000 (16:02 +0100)]
param: Make "kernel change notify" global

With a central notifyd, we can't do this per share anymore. Notifyd will
only look at absolute paths, not shares.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agoparam: Make "change notify" global
Volker Lendecke [Fri, 21 Nov 2014 14:53:53 +0000 (15:53 +0100)]
param: Make "change notify" global

With a central notifyd, we can't do this per share anymore. Notifyd will
only look at absolute paths, not shares.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agolib: Add server_id_db_set_exclusive
Volker Lendecke [Tue, 9 Jun 2015 05:03:25 +0000 (05:03 +0000)]
lib: Add server_id_db_set_exclusive

This is used for server names where only one instance can exist.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agolib: Add server_id_db_pid()
Volker Lendecke [Mon, 8 Jun 2015 20:46:54 +0000 (20:46 +0000)]
lib: Add server_id_db_pid()

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agolib: Add server_id_db_prune_name
Volker Lendecke [Sun, 26 Apr 2015 09:02:27 +0000 (11:02 +0200)]
lib: Add server_id_db_prune_name

With this you can remove a foreign mapping. Required to clean up dead
processes.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agolib: Add tevent_req_poll_unix
Volker Lendecke [Wed, 9 Jul 2014 12:50:24 +0000 (12:50 +0000)]
lib: Add tevent_req_poll_unix

This makes sync wrappers a bit shorter

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agolibrpc:ndr:witness: remove an unneeded block, reducing indentation.
Michael Adam [Tue, 7 Jul 2015 07:50:21 +0000 (09:50 +0200)]
librpc:ndr:witness: remove an unneeded block, reducing indentation.

Check with "git diff -w".

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Jul  7 23:37:05 CEST 2015 on sn-devel-104

8 years agolibrpc:ndr:witness: move variables into scope
Michael Adam [Tue, 7 Jul 2015 07:47:51 +0000 (09:47 +0200)]
librpc:ndr:witness: move variables into scope

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agosmbd:trans2: treat new SMB_SIGNING_DESIRED in case
Michael Adam [Tue, 7 Jul 2015 15:15:00 +0000 (17:15 +0200)]
smbd:trans2: treat new SMB_SIGNING_DESIRED in case

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agolibrpc:ndr:witness: fix CID 1311245: Memory - illegal accesses (UNINIT)
Michael Adam [Tue, 7 Jul 2015 06:52:20 +0000 (08:52 +0200)]
librpc:ndr:witness: fix CID 1311245: Memory - illegal accesses (UNINIT)

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agoWHATSNEW: Spotlight
Ralph Boehme [Fri, 27 Mar 2015 16:39:43 +0000 (17:39 +0100)]
WHATSNEW: Spotlight

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): Tue Jul  7 20:35:07 CEST 2015 on sn-devel-104

8 years agos3-mdssvc: add documentation for mdssvc and mdssd
Ralph Boehme [Mon, 11 Aug 2014 20:30:53 +0000 (22:30 +0200)]
s3-mdssvc: add documentation for mdssvc and mdssd

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos3-mdssvc: add mdssd RPC service daemon for mdssvc
Ralph Boehme [Mon, 11 Aug 2014 20:29:09 +0000 (22:29 +0200)]
s3-mdssvc: add mdssd RPC service daemon for mdssvc

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos3-mdssvc: lexer and parser for Spotlight queries
Ralph Boehme [Thu, 31 Jul 2014 16:01:34 +0000 (18:01 +0200)]
s3-mdssvc: lexer and parser for Spotlight queries

Add a lexer and parser for translating Spotlight query strings to
SPARQL.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos3-mdssvc: main Spotlight code
Ralph Boehme [Thu, 26 Mar 2015 21:39:21 +0000 (22:39 +0100)]
s3-mdssvc: main Spotlight code

Implement all Spotlight RPC commands with the Tracker SPARQL async query
API.

Tracker uses glib for implemeting async tasks, we thus have to use a
glib mainloop for processing sheduled tasks in threads.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos3-mdssvc: Spotlight attribute mappings
Ralph Boehme [Thu, 31 Jul 2014 15:56:44 +0000 (17:56 +0200)]
s3-mdssvc: Spotlight attribute mappings

Add mappings for metadata attribute between Spotlight and NEPOMUK for
use with Tracker.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos3-mdssvc: (un)marshalling Spotlight RPC blob
Ralph Boehme [Thu, 31 Jul 2014 15:07:28 +0000 (17:07 +0200)]
s3-mdssvc: (un)marshalling Spotlight RPC blob

Add code for marshalling and unmarshalling Spotlight RPC blobs
from/into a dalloc object store.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos3-mdssvc: dalloc: dynamic object store based on talloc
Ralph Boehme [Thu, 31 Jul 2014 14:27:36 +0000 (16:27 +0200)]
s3-mdssvc: dalloc: dynamic object store based on talloc

dalloc is a hack with a bizarre API, but it does its job: it's a
simple object store that allows for storing simple and complex data
types.

We'll use it for storing Spotlight query data.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos3-mdssvc: add new option 'spotlight'
Ralph Boehme [Thu, 31 Jul 2014 11:49:49 +0000 (13:49 +0200)]
s3-mdssvc: add new option 'spotlight'

Per share option: it reflects whether a share is indexed by Tracker or
not. The global switch that controls whether Spotlight is enabled or
not, are the mdsvc RPC switches.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos3-mdssvc: add Spotlight RPC stubs
Ralph Boehme [Wed, 23 Jul 2014 07:58:45 +0000 (09:58 +0200)]
s3-mdssvc: add Spotlight RPC stubs

'mdssvc' aka 'Metadata Search Service' is an RPC service used by Apple
for passing marshalled Spotlight search queries and results between
client to server.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agomdssvc: IDL file for new RPC service
Ralph Boehme [Wed, 23 Jul 2014 07:58:45 +0000 (09:58 +0200)]
mdssvc: IDL file for new RPC service

'mdssvc' aka 'Metadata Search Service' is an RPC service used by Apple
for passing marshalled Spotlight search queries and results between
client to server.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos3-mdssvc: add configure option --enable-spotlight
Ralph Boehme [Wed, 23 Jul 2014 05:15:50 +0000 (07:15 +0200)]
s3-mdssvc: add configure option --enable-spotlight

configure check with pkg-config for libtracker-sparql, default is
disabled.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos4:torture/rpc: use dcerpc_secondary_auth_connection with creds
Stefan Metzmacher [Fri, 17 Jan 2014 12:39:45 +0000 (13:39 +0100)]
s4:torture/rpc: use dcerpc_secondary_auth_connection with creds

This is the same as calling dcerpc_secondary_connection/dcerpc_bind_auth.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Tue Jul  7 17:07:49 CEST 2015 on sn-devel-104

8 years agos4:torture/rpc: use dcerpc_secondary_auth_connection with anon creds
Stefan Metzmacher [Fri, 17 Jan 2014 08:54:39 +0000 (09:54 +0100)]
s4:torture/rpc: use dcerpc_secondary_auth_connection with anon creds

This is the same as calling dcerpc_secondary_connection/dcerpc_bind_auth_none.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agos4:torture/samba3rpc: use pipe_bind_smb_auth()
Stefan Metzmacher [Thu, 16 Jan 2014 06:20:37 +0000 (07:20 +0100)]
s4:torture/samba3rpc: use pipe_bind_smb_auth()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agos4:torture/samba3rpc: add pipe_bind_smb_auth()
Stefan Metzmacher [Thu, 16 Jan 2014 06:20:20 +0000 (07:20 +0100)]
s4:torture/samba3rpc: add pipe_bind_smb_auth()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agos4:torture/samba3rpc: use pipe_bind_smb2()
Stefan Metzmacher [Thu, 16 Jan 2014 06:19:49 +0000 (07:19 +0100)]
s4:torture/samba3rpc: use pipe_bind_smb2()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agos4:torture/samba3rpc: add pipe_bind_smb2()
Stefan Metzmacher [Thu, 16 Jan 2014 06:19:26 +0000 (07:19 +0100)]
s4:torture/samba3rpc: add pipe_bind_smb2()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agos4:torture/samba3rpc: use pipe_bind_smb() in more places
Stefan Metzmacher [Thu, 16 Jan 2014 06:18:30 +0000 (07:18 +0100)]
s4:torture/samba3rpc: use pipe_bind_smb() in more places

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agos4:torture/samba3rpc: move pipe_bind_smb() to the top
Stefan Metzmacher [Thu, 16 Jan 2014 06:17:00 +0000 (07:17 +0100)]
s4:torture/samba3rpc: move pipe_bind_smb() to the top

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agos4:libnet: make use of dcerpc_secondary_auth_connection_send/recv()
Stefan Metzmacher [Wed, 22 Jan 2014 11:49:58 +0000 (12:49 +0100)]
s4:libnet: make use of dcerpc_secondary_auth_connection_send/recv()

This avoid the bogus usage of dcerpc_pipe_auth().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agos4:libcli/clilsa: only remember the dcerpc_binding_handle
Stefan Metzmacher [Thu, 16 Jan 2014 07:57:30 +0000 (08:57 +0100)]
s4:libcli/clilsa: only remember the dcerpc_binding_handle

We don't need the 'dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agos4:librpc/rpc: add dcerpc_secondary_auth_connection()
Stefan Metzmacher [Fri, 17 Jan 2014 08:31:51 +0000 (09:31 +0100)]
s4:librpc/rpc: add dcerpc_secondary_auth_connection()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agodcerpc.idl: fix calculatin of uint16 secondary_address_size;
Stefan Metzmacher [Fri, 26 Jun 2015 20:12:49 +0000 (22:12 +0200)]
dcerpc.idl: fix calculatin of uint16 secondary_address_size;

This should be 0 for secondary_address = "".

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopidl:Samba4/NDR/Parser: always initialize _mem_save_ pointers to NULL
Stefan Metzmacher [Tue, 7 Jul 2015 11:01:16 +0000 (13:01 +0200)]
pidl:Samba4/NDR/Parser: always initialize _mem_save_ pointers to NULL

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopidl:Samba3/ServerNDR: add pidl_reset() and pidl_return() helper functions
Stefan Metzmacher [Wed, 19 Mar 2014 09:41:52 +0000 (10:41 +0100)]
pidl:Samba3/ServerNDR: add pidl_reset() and pidl_return() helper functions

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopidl:Samba3/ServerNDR: make CallWithStruct() more flexible
Stefan Metzmacher [Wed, 19 Mar 2014 09:36:04 +0000 (10:36 +0100)]
pidl:Samba3/ServerNDR: make CallWithStruct() more flexible

We now pass multiple callbacks $check, $cleanup, $return
down to AllocOutVar().

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopidl:Samba3/ServerNDR: simplify CallWithStruct()
Stefan Metzmacher [Wed, 19 Mar 2014 09:35:14 +0000 (10:35 +0100)]
pidl:Samba3/ServerNDR: simplify CallWithStruct()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agodocs:smb.conf: explain effect of new setting 'desired' of smb encrypt
Michael Adam [Tue, 30 Jun 2015 15:46:36 +0000 (17:46 +0200)]
docs:smb.conf: explain effect of new setting 'desired' of smb encrypt

Thereby clarify some details.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agosmbd:smb2: use encryption_desired in send_break
Michael Adam [Wed, 1 Jul 2015 15:41:38 +0000 (17:41 +0200)]
smbd:smb2: use encryption_desired in send_break

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agosmbd:smb2: only enable encryption in tcon if desired
Michael Adam [Wed, 1 Jul 2015 16:07:52 +0000 (18:07 +0200)]
smbd:smb2: only enable encryption in tcon if desired

Don't enforce it but only announce DATA_ENCRYPT,
making use of encryption_desired in tcon.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agosmbd:smb2: only enable encryption in session if desired
Michael Adam [Wed, 1 Jul 2015 16:07:26 +0000 (18:07 +0200)]
smbd:smb2: only enable encryption in session if desired

Don't enforce it but only announce ENCRYPT_DATA, using the
encryption_desired flag in session setup.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agosmbd:smb2: separate between encryption required and enc desired
Michael Adam [Wed, 1 Jul 2015 15:42:58 +0000 (17:42 +0200)]
smbd:smb2: separate between encryption required and enc desired

this means we:
- accept unencrypted requests if encryption only desired
  and not required,
- but we always send encrypted responses in the desired
  case, not only when the request was encrypted.

For this purpose, the do_encryption in the request
structure is separated into was_encrypted and do_encryption.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agosmbXsrv: add bools encryption_desired to session and tcon
Michael Adam [Wed, 1 Jul 2015 15:34:45 +0000 (17:34 +0200)]
smbXsrv: add bools encryption_desired to session and tcon

This is to indicate that we should sen the ENCRYPT_DATA
flag on session or tcon replies.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agoIntroduce setting "desired" for 'smb encrypt' and 'client/server signing'
Michael Adam [Tue, 30 Jun 2015 12:16:19 +0000 (14:16 +0200)]
Introduce setting "desired" for 'smb encrypt' and 'client/server signing'

This should trigger the behaviour where the server requires
signing when the client supports it, but does not reject
clients that don't support it.

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

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agovfs_fruit: Fix CID 1311244 Out-of-bounds read
Volker Lendecke [Tue, 7 Jul 2015 07:04:22 +0000 (09:04 +0200)]
vfs_fruit: Fix CID 1311244 Out-of-bounds read

We should not call memcpy if the offset is exactly AFP_INFO_SIZE

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Jul  7 14:04:39 CEST 2015 on sn-devel-104

8 years agoTreat uid_t, git_t as 64 bit in Pidl Python bindings
Douglas Bagnall [Thu, 18 Jun 2015 00:38:22 +0000 (12:38 +1200)]
Treat uid_t, git_t as 64 bit in Pidl Python bindings

This follows their treatment in librpc/ndr/ndr_basic.c.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Jul  7 07:19:49 CEST 2015 on sn-devel-104

8 years agoctdb: Accept the key in hex format for the pstore command
Christof Schmitt [Thu, 2 Jul 2015 20:06:32 +0000 (13:06 -0700)]
ctdb: Accept the key in hex format for the pstore command

This follows the same pattern as the tstore command, and it allows
specifying key strings with a trailing \0 character.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Jul  6 23:23:22 CEST 2015 on sn-devel-104

8 years agosharesec: Remove error message for unmarshall_sec_desc failure
Christof Schmitt [Tue, 30 Jun 2015 23:15:57 +0000 (01:15 +0200)]
sharesec: Remove error message for unmarshall_sec_desc failure

In a cluster setup, running sharesec -D results in an empty record that
triggers this message. The situation is correctly handled in the code
(unmarshall_sec_desc fails and sharesec uses the default), so simply
remove the message in this case.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
8 years agodocs: Document smbclient "notify" command
Volker Lendecke [Fri, 3 Jul 2015 13:10:17 +0000 (15:10 +0200)]
docs: Document smbclient "notify" command

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Fri Jul  3 18:30:21 CEST 2015 on sn-devel-104

8 years agolib/util:charset/tests: improve strlen_m[_term[_null]]() testing
Stefan Metzmacher [Mon, 29 Jun 2015 18:37:01 +0000 (20:37 +0200)]
lib/util:charset/tests: improve strlen_m[_term[_null]]() testing

They differ in their "" vs. NULL handling.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Jul  3 05:02:45 CEST 2015 on sn-devel-104

8 years agolib/util: let strlen_m_term[_null]() use strlen_m_ext_term[_null]()
Stefan Metzmacher [Sat, 27 Jun 2015 08:13:02 +0000 (10:13 +0200)]
lib/util: let strlen_m_term[_null]() use strlen_m_ext_term[_null]()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agolib/util: add strlen_m_ext_term_null() helper function
Stefan Metzmacher [Sat, 27 Jun 2015 08:12:29 +0000 (10:12 +0200)]
lib/util: add strlen_m_ext_term_null() helper function

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agos4:pyrpc: remove pointless alter_context() method
Stefan Metzmacher [Mon, 29 Jun 2015 08:07:17 +0000 (10:07 +0200)]
s4:pyrpc: remove pointless alter_context() method

This will always result in a rpc protocol error.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopython:samba/tests: don't use the x.alter_context() method in dcerpc/bare.py
Stefan Metzmacher [Mon, 29 Jun 2015 08:03:40 +0000 (10:03 +0200)]
python:samba/tests: don't use the x.alter_context() method in dcerpc/bare.py

Establishing a new context on a given connection using alter_context
is supposed to be done by using y = ClientConnection(..., basis_connection=x)

The current x.alter_context() can work as it's not allowed to
change the abstract or transfer syntax of an existing presentation
context.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agos4:torture/rpc: expect NT_STATUS_CONNECTION_DISCONNECTED in torture_rpc_alter_context()
Stefan Metzmacher [Mon, 29 Jun 2015 07:49:05 +0000 (09:49 +0200)]
s4:torture/rpc: expect NT_STATUS_CONNECTION_DISCONNECTED in torture_rpc_alter_context()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agos4:torture/rpc: expect NT_STATUS_CONNECTION_DISCONNECTED when a dcerpc connection...
Stefan Metzmacher [Mon, 29 Jun 2015 07:46:57 +0000 (09:46 +0200)]
s4:torture/rpc: expect NT_STATUS_CONNECTION_DISCONNECTED when a dcerpc connection is not connected

We still also allow NT_STATUS_INVALID_HANDLE and NT_STATUS_IO_DEVICE_ERROR for now.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agolibcli/smb: let tstream_smbXcli_np report connection errors as EPIPE instead of EIO
Stefan Metzmacher [Sat, 27 Jun 2015 20:55:22 +0000 (22:55 +0200)]
libcli/smb: let tstream_smbXcli_np report connection errors as EPIPE instead of EIO

This maps to NT_STATUS_CONNECTION_DISCONNECTED instead of
NT_STATUS_IO_DEVICE_ERROR.

EPIPE, NT_STATUS_CONNECTION_DISCONNECTED matches what other tstream backends
e.g. tcp and unix report.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agos3:winbindd: use check dcerpc_binding_handle_is_connected() instead of a specific...
Stefan Metzmacher [Mon, 29 Jun 2015 07:52:45 +0000 (09:52 +0200)]
s3:winbindd: use check dcerpc_binding_handle_is_connected() instead of a specific status

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopython/samba/tests: add fallbacks for assert{Less,Greater}[Equal]()
Stefan Metzmacher [Mon, 29 Jun 2015 06:41:22 +0000 (08:41 +0200)]
python/samba/tests: add fallbacks for assert{Less,Greater}[Equal]()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopython/samba/tests: let the output of hexdump() match our C code in dump_data_cb()
Stefan Metzmacher [Thu, 25 Jun 2015 12:06:40 +0000 (14:06 +0200)]
python/samba/tests: let the output of hexdump() match our C code in dump_data_cb()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agopython/samba/tests: move hexdump() from DNSTest to TestCase
Stefan Metzmacher [Thu, 25 Jun 2015 08:28:31 +0000 (10:28 +0200)]
python/samba/tests: move hexdump() from DNSTest to TestCase

This is useful in a lot of test cases.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agolibrpc/ndr: make use of dump_data_cb() in ndr_dump_data()
Stefan Metzmacher [Thu, 25 Jun 2015 12:05:37 +0000 (14:05 +0200)]
librpc/ndr: make use of dump_data_cb() in ndr_dump_data()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agolib/util: fix output format in dump_data*()
Stefan Metzmacher [Thu, 25 Jun 2015 11:53:41 +0000 (13:53 +0200)]
lib/util: fix output format in dump_data*()

This changes:

  [0000] 4E 54 4C 4D 53 53 50 00   01 00 00 00 05 82 08 60   NTLMSSP. .......`
  [0010] 09 00 09 00 20 00 00 00   00 00 00 00 29 00 00 00   .... ... ....)...
  [0020] 57 4F 52 4B 47 52 4F 55   50                       WORKGROU P

into:

  [0000] 4E 54 4C 4D 53 53 50 00   01 00 00 00 05 82 08 60   NTLMSSP. .......`
  [0010] 09 00 09 00 20 00 00 00   00 00 00 00 29 00 00 00   .... ... ....)...
  [0020] 57 4F 52 4B 47 52 4F 55   50                        WORKGROU P

Note the alignment of 'WORKGROU P'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agos4:pyrpc: add base.bind_time_features_syntax(features)
Stefan Metzmacher [Wed, 2 Apr 2014 17:53:18 +0000 (19:53 +0200)]
s4:pyrpc: add base.bind_time_features_syntax(features)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agolibrpc/rpc: add dcerpc_[extract|construct]_bind_time_features()
Stefan Metzmacher [Thu, 9 Jan 2014 11:35:58 +0000 (12:35 +0100)]
librpc/rpc: add dcerpc_[extract|construct]_bind_time_features()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agolibrpc/rpc: add dcerpc_fault_from_nt_status()
Stefan Metzmacher [Wed, 19 Mar 2014 21:22:58 +0000 (22:22 +0100)]
librpc/rpc: add dcerpc_fault_from_nt_status()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agolibrpc/rpc: add faultcode to nt_status mappings
Stefan Metzmacher [Wed, 19 Mar 2014 21:17:11 +0000 (22:17 +0100)]
librpc/rpc: add faultcode to nt_status mappings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agomidltests: add valid/midltests_DRS_EXTENSIONS.*
Stefan Metzmacher [Thu, 25 Sep 2014 19:53:46 +0000 (21:53 +0200)]
midltests: add valid/midltests_DRS_EXTENSIONS.*

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agoauth/credentials: anonymous should not try to use kerberos
Stefan Metzmacher [Thu, 25 Jun 2015 18:30:43 +0000 (20:30 +0200)]
auth/credentials: anonymous should not try to use kerberos

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
8 years agos4:ntvfs/ipc: fix ipc_close()
Stefan Metzmacher [Sat, 18 Oct 2014 08:42:00 +0000 (10:42 +0200)]
s4:ntvfs/ipc: fix ipc_close()

Until now this always returned NT_STATUS_INVALID_LEVEL
for everything but RAW_CLOSE_CLOSE.

Now it maps everything correctly to RAW_CLOSE_GENERIC.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos4-torture: pull, push and compare a witness Notify struct in ndr test.
Günther Deschner [Fri, 26 Jun 2015 14:46:36 +0000 (16:46 +0200)]
s4-torture: pull, push and compare a witness Notify struct in ndr test.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos4-torture: add new torture_suite_add_ndr_pullpush_fn_test_flags().
Günther Deschner [Fri, 26 Jun 2015 14:46:11 +0000 (16:46 +0200)]
s4-torture: add new torture_suite_add_ndr_pullpush_fn_test_flags().

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos4-torture: add torture_ndr_push_struct_blob_flags() in order to manipulate push...
Günther Deschner [Fri, 26 Jun 2015 14:45:21 +0000 (16:45 +0200)]
s4-torture: add torture_ndr_push_struct_blob_flags() in order to manipulate push flags.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agolibndr: reformat libndr torture_suite macros to make differences more visible.
Günther Deschner [Fri, 26 Jun 2015 14:16:42 +0000 (16:16 +0200)]
libndr: reformat libndr torture_suite macros to make differences more visible.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos4-torture: using async dcerpc for witness async notifications.
Günther Deschner [Thu, 26 Mar 2015 12:12:35 +0000 (13:12 +0100)]
s4-torture: using async dcerpc for witness async notifications.

This test toggles the online/offline resource state using the clusapi protocol
between the send and receive.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agolib/torture: be more verbose about ndr failures.
Günther Deschner [Thu, 25 Jun 2015 22:50:24 +0000 (00:50 +0200)]
lib/torture: be more verbose about ndr failures.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos4-torture: move torture_assert_sid_equal() out of ndr headers.
Günther Deschner [Thu, 25 Jun 2015 22:48:03 +0000 (00:48 +0200)]
s4-torture: move torture_assert_sid_equal() out of ndr headers.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos4-torture: finally enable witness_AsyncNotify ndr test.
Günther Deschner [Thu, 25 Jun 2015 22:14:07 +0000 (00:14 +0200)]
s4-torture: finally enable witness_AsyncNotify ndr test.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos3-rpcclient: remove old extra hand marshalling from witness cmds.
Günther Deschner [Thu, 25 Jun 2015 21:12:18 +0000 (23:12 +0200)]
s3-rpcclient: remove old extra hand marshalling from witness cmds.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
8 years agos4-torture: add clusapi resource online/offline toggle code to witness test.
Günther Deschner [Thu, 25 Jun 2015 19:59:20 +0000 (21:59 +0200)]
s4-torture: add clusapi resource online/offline toggle code to witness test.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>