samba.git
7 years agosupport volfile fetch from multiple glusterd nodes
Raghavendra Talur [Thu, 25 Aug 2016 10:33:55 +0000 (16:03 +0530)]
support volfile fetch from multiple glusterd nodes

glusterfs:volfile_server option can be used in smb.conf to define where
to fetch the volfile from. Currently it supports only a single IP or a
hostname. The default is 'localhost'.

glfs_set_volfile_server() has been enhanced in gfapi to support
multiple invocations. A list is maintained in libgfapi which gets
appended on every invocation. When glfs_init is performed, libgfapi
would first try to fetch the volfile from glusterd on that node.
However, on failure to fetch the volfile, it would proceed to contact
glusterd on every node in the list until it gets the volfile or
exhausts the list. This enhacement was done in Gluster commit [2].
This commit is available in 3.6, 3.7, 3.8 versions of Gluster.

As we cannot have multiple lines having the same key of
glusterfs:volfile_server in a share definition in smb.conf, we propose
a scheme like this:

where value of glusterfs:volfile_server could be list of white space seperated
elements where each element could be unix+/path/to/socket/file or
[tcp+]IP|hostname|\[IPv6\][:port].

Note the restriction on naming a IPv6 host, it follows the same
restriction that is based on IPv6 naming in URL as per RFC 2732[1].

[1] http://www.ietf.org/rfc/rfc2732.txt
[2] 0c1d78f5c52c69268ec3a1d8d5fcb1a1bf15f243

Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-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): Fri Oct 14 17:09:24 CEST 2016 on sn-devel-144

7 years agoctdb-scripts: Strengthen check to see if ctdbd is running
Martin Schwenke [Mon, 10 Oct 2016 03:56:18 +0000 (14:56 +1100)]
ctdb-scripts: Strengthen check to see if ctdbd is running

Don't just rely on the process existing.  It must be called "ctdbd".

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Oct 14 11:54:40 CEST 2016 on sn-devel-144

7 years agoctdb-packaging: Move CTDB tests to /usr/local/share/ctdb/tests/
Martin Schwenke [Tue, 11 Oct 2016 00:30:37 +0000 (11:30 +1100)]
ctdb-packaging: Move CTDB tests to /usr/local/share/ctdb/tests/

In time, other things will end up in /use/local/share/ctdb/.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
7 years agosmbd: Fix a comment
Volker Lendecke [Thu, 13 Oct 2016 14:07:22 +0000 (16:07 +0200)]
smbd: Fix a comment

This is described in

https://msdn.microsoft.com/en-us/library/cc232053.aspx

which is section 2.3.67 in the FSCC version available 2016-10-13.

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): Fri Oct 14 05:31:07 CEST 2016 on sn-devel-144

7 years agodebug: Fix a few signed/unsigned hickups
Volker Lendecke [Thu, 13 Oct 2016 09:18:50 +0000 (11:18 +0200)]
debug: Fix a few signed/unsigned hickups

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agostrv.c: add strv_to_env for use with execle, etc.
Trever L. Adams [Thu, 13 Oct 2016 09:25:08 +0000 (03:25 -0600)]
strv.c: add strv_to_env for use with execle, etc.

Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Signed-off-by: Trever L. Adams <trever.adams@gmail.com>
Autobuild-User(master): David Disseldorp <ddiss@samba.org>
Autobuild-Date(master): Fri Oct 14 01:44:02 CEST 2016 on sn-devel-144

7 years agontlmssp.idl: don't generate python bindings for ntlmssp_NTLM_RESPONSE and ntlmssp_LM_...
Stefan Metzmacher [Tue, 13 Sep 2016 05:25:38 +0000 (07:25 +0200)]
ntlmssp.idl: don't generate python bindings for ntlmssp_NTLM_RESPONSE and ntlmssp_LM_RESPONSE

ntlmssp_NTLM_RESPONSE and NTLM_RESPONSE will both result in
"ntlmssp.NTLM_RESPONSE".

The same applies to ntlmssp_LM_RESPONSE and LM_RESPONSE.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Thu Oct 13 21:56:27 CEST 2016 on sn-devel-144

7 years agospoolss.idl: use access mask defines from security.idl
Stefan Metzmacher [Tue, 13 Sep 2016 04:30:34 +0000 (06:30 +0200)]
spoolss.idl: use access mask defines from security.idl

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
7 years agonfs4acl.idl: rename interface to nfs4acl.idl to avoid naming clash in the python...
Stefan Metzmacher [Tue, 13 Sep 2016 06:07:21 +0000 (08:07 +0200)]
nfs4acl.idl: rename interface to nfs4acl.idl to avoid naming clash in the python bindings

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
7 years agolibcli: Remove code clone
Moritz Beller [Tue, 11 Oct 2016 13:39:55 +0000 (15:39 +0200)]
libcli: Remove code clone

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12373
Signed-off-by: Moritz Beller <moritzbeller@gmx.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Simo <simo@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Oct 13 18:13:45 CEST 2016 on sn-devel-144

7 years agoctdb-tests: Add a missing assert()
Martin Schwenke [Wed, 12 Oct 2016 07:36:51 +0000 (18:36 +1100)]
ctdb-tests: Add a missing assert()

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agoctdb-tests: Use bash locals for readability
Martin Schwenke [Tue, 11 Oct 2016 02:32:31 +0000 (13:32 +1100)]
ctdb-tests: Use bash locals for readability

This is a bash script so use bash feature instead of using the leading
underscore convention for locals.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agoctdb-scripts: Drop backward compatibility from ctdbd_is_running()
Martin Schwenke [Mon, 10 Oct 2016 03:48:28 +0000 (14:48 +1100)]
ctdb-scripts: Drop backward compatibility from ctdbd_is_running()

The PID file has been used since CTDB 2.3.  Assume that anyone
upgrading from an older version does a clean shutdown, upgrades CTDB
and then does a clean start (as opposed to upgrade CTDB and then
restart).

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agoctdb-scripts: ctdbd_wrapper should never remove the PID file
Martin Schwenke [Mon, 10 Oct 2016 02:16:01 +0000 (13:16 +1100)]
ctdb-scripts: ctdbd_wrapper should never remove the PID file

kill_ctdbd() kills the daemon and then removes the PID file.  This is
racy because a new daemon could write a new PID file in between the
kill and the removal.  Reversing these steps would be an improvement.

However, none of the places where kill_ctdbd() is called is a safe
place to remove the PID file.  There is always a chance that a new
daemon could start, write a new PID file and then kill_ctdbd() could
remove the new PID file.

ctdbd is able to overwrite a stale PID file by checking to see if it
is locked.

Therefore, entirely drop removal of the PID file from ctdbd_wrapper.

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

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agospoolss: Fix caching of printername->sharename
Volker Lendecke [Wed, 12 Oct 2016 09:06:51 +0000 (11:06 +0200)]
spoolss: Fix caching of printername->sharename

time_mono() gives seconds since boot, gencache expects seconds since epoch.
With time_mono(), the values are always expired immediately.

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

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Thu Oct 13 13:48:52 CEST 2016 on sn-devel-144

7 years agoUpdate smbrun to allow for settings environment variables.
Trever L. Adams [Wed, 12 Oct 2016 15:55:15 +0000 (09:55 -0600)]
Update smbrun to allow for settings environment variables.

Signed-off-by: Trever L. Adams <trever.adams@gmail.com>
Reviewed-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct 13 04:26:26 CEST 2016 on sn-devel-144

7 years agomessaging: add an overflow check
Volker Lendecke [Mon, 3 Oct 2016 20:28:32 +0000 (22:28 +0200)]
messaging: add an overflow check

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3:libads: don't use MEMORY:ads_sasl_spnego_bind nor set "KRB5CCNAME"
Stefan Metzmacher [Mon, 10 Oct 2016 15:07:12 +0000 (17:07 +0200)]
s3:libads: don't use MEMORY:ads_sasl_spnego_bind nor set "KRB5CCNAME"

Most callers just set "KRB5CCNAME", but leave ads->auth.ccache_name = NULL.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct 13 00:35:21 CEST 2016 on sn-devel-144

7 years agos3:libads: don't use MEMORY:ads_sasl_gssapi_do_bind nor set "KRB5CCNAME"
Stefan Metzmacher [Mon, 10 Oct 2016 15:07:12 +0000 (17:07 +0200)]
s3:libads: don't use MEMORY:ads_sasl_gssapi_do_bind nor set "KRB5CCNAME"

Most callers just set "KRB5CCNAME", but leave ads->auth.ccache_name = NULL.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 years agoHEIMDAL:lib/krb5: destroy a memory ccache on reinit
Stefan Metzmacher [Mon, 10 Oct 2016 13:53:26 +0000 (15:53 +0200)]
HEIMDAL:lib/krb5: destroy a memory ccache on reinit

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Reviewed-by: Uri Simchoni <uri@samba.org>
7 years agolib: Fix CID 1373623 Dereference after null check
Volker Lendecke [Wed, 12 Oct 2016 10:35:12 +0000 (12:35 +0200)]
lib: Fix CID 1373623 Dereference after null check

We should not overload "p", this is used in the outer loop

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12276
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agowinbindd: Remove now unused cache_methods
Christof Schmitt [Fri, 7 Oct 2016 23:44:11 +0000 (16:44 -0700)]
winbindd: Remove now unused cache_methods

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): Tue Oct 11 23:59:18 CEST 2016 on sn-devel-144

7 years agowinbindd: Remove now unused domain->methods
Christof Schmitt [Fri, 7 Oct 2016 23:40:22 +0000 (16:40 -0700)]
winbindd: Remove now unused domain->methods

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agowinbindd: Replace calls to domain->methods
Christof Schmitt [Fri, 7 Oct 2016 23:31:40 +0000 (16:31 -0700)]
winbindd: Replace calls to domain->methods

domain->methods is always set to cache_methods; call those functions
directly instead of going through the indirection.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agowinbindd: Make functions in cache_methods non-static
Christof Schmitt [Fri, 7 Oct 2016 23:19:07 +0000 (16:19 -0700)]
winbindd: Make functions in cache_methods non-static

This is in preparation for calling these directly instead of the
domain->methods indirection.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3/vfs: remove now unused is_offline/set_offline VFS functions
Ralph Boehme [Mon, 10 Oct 2016 15:10:43 +0000 (17:10 +0200)]
s3/vfs: remove now unused is_offline/set_offline VFS functions

The previous commit removed all callers of this, so lets remove it.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Oct 11 14:44:03 CEST 2016 on sn-devel-144

7 years agos3/vfs: merge offline functionality into DOS attributes handling
Ralph Boehme [Sun, 11 Sep 2016 10:39:13 +0000 (12:39 +0200)]
s3/vfs: merge offline functionality into DOS attributes handling

The offline VFS functions predate the SMB_VFS_{GET|SET}_DOS_ATTRIBUTES()
functions, now that we have these, we can use them for the offline
attribute as well.

The primary reason for this is: performance. Merging both functions has
the benefit that in VFS modules that use same backing store bits for
both offline attribute and DOS attributes (like gpfs), we avoid calling
the backing store twice in dos_mode() and file_set_dosmode().

This commit modifies all existing users of the offline attribute to
adapt to the change, the next commit will then remove the obsolete
offline functions.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
7 years agonfs4acls: Fix SMB_ACE4_MAX_TYPE define
Volker Lendecke [Mon, 10 Oct 2016 12:24:31 +0000 (14:24 +0200)]
nfs4acls: Fix SMB_ACE4_MAX_TYPE define

ACE4_SYSTEM_ALARM_ACE_TYPE does not exist

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 Oct 11 02:17:10 CEST 2016 on sn-devel-144

7 years agoctdb-conn: add missing variable initialization
Ralph Wuerthner [Mon, 10 Oct 2016 14:26:05 +0000 (16:26 +0200)]
ctdb-conn: add missing variable initialization

Avoid potential crash in TALLOC_FREE(hdr).

Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agoReplaced string "Samba 4" with "Samba AD"
Marc Muehlfeld [Mon, 10 Oct 2016 15:52:09 +0000 (17:52 +0200)]
Replaced string "Samba 4" with "Samba AD"

When provisioning a new DC, a message is displayed that a Kerberos
configuration file has been created. The message now uses the term
"Samba AD" instead of "Samba 4".

Signed-off-by: Marc Muehlfeld <mmuehlfeld@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Mon Oct 10 22:34:03 CEST 2016 on sn-devel-144

7 years agoctdb-scripts: Dump stack traces of smbd processes after shutdown
Martin Schwenke [Thu, 6 Oct 2016 00:14:09 +0000 (11:14 +1100)]
ctdb-scripts: Dump stack traces of smbd processes after shutdown

If any processes remain then they may be stuck in D state and this
might tell us why.

Update tests: tweak pidof stub, add support for smbd stack traces and
add some new tests for the shutdown event.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Oct 10 12:54:24 CEST 2016 on sn-devel-144

7 years agos3-sysquotas: correctly restore path when finding mount point
Uri Simchoni [Fri, 7 Oct 2016 08:05:07 +0000 (11:05 +0300)]
s3-sysquotas: correctly restore path when finding mount point

When traversing the path backwards to find the mount point, if the
root '/' is reached, then the character to be restored is not a '/'.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Oct  8 05:22:25 CEST 2016 on sn-devel-144

7 years agovfs_glusterfs: Fix a memory leak in connect path
Anoop C S [Fri, 7 Oct 2016 10:35:29 +0000 (16:05 +0530)]
vfs_glusterfs: Fix a memory leak in connect path

Early return in case of failure to set snapdir-entry-path xlator option
leaks talloced tmp_ctx.

Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Oct  7 19:39:11 CEST 2016 on sn-devel-144

7 years agos3-selftest: Add a substituions testcase
Andreas Schneider [Sun, 25 Sep 2016 17:35:12 +0000 (19:35 +0200)]
s3-selftest: Add a substituions testcase

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Oct  7 15:52:36 CEST 2016 on sn-devel-144

7 years agoselftest: Create a share with %D %U and %G substituion
Andreas Schneider [Sun, 25 Sep 2016 16:42:17 +0000 (18:42 +0200)]
selftest: Create a share with %D %U and %G substituion

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agos3-lib: Fix %G substitution in AD member environment
Andreas Schneider [Mon, 19 Sep 2016 11:59:54 +0000 (13:59 +0200)]
s3-lib: Fix %G substitution in AD member environment

If we are a domain member we should look up the user with the domain
name specified else it will only work if we have
'winbind use default domain' set.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agoselftest: Create AD users alice and bob
Andreas Schneider [Sun, 25 Sep 2016 16:41:50 +0000 (18:41 +0200)]
selftest: Create AD users alice and bob

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
7 years agotorture/ioctl: test compression responses when unsupported
David Disseldorp [Mon, 3 Oct 2016 23:15:20 +0000 (01:15 +0200)]
torture/ioctl: test compression responses when unsupported

Confirm that Samba matches Windows Server 2016 ReFS behaviour here.

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

Reported-by: Nick Barrett
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct  6 06:14:34 CEST 2016 on sn-devel-144

7 years agosmbd/ioctl: match WS2016 ReFS get compression behaviour
David Disseldorp [Mon, 3 Oct 2016 23:09:37 +0000 (01:09 +0200)]
smbd/ioctl: match WS2016 ReFS get compression behaviour

ReFS doesn't support compression, but responds to get-compression FSCTLs
with a successful COMPRESSION_FORMAT_NONE response. set-compression
results in NT_STATUS_NOT_SUPPORTED.

This commit modifies Samba to match the ReFS behaviour, when run atop
a VFS that doesn't expose compression support.

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

Reported-by: Nick Barrett
Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-rpcclient: Fix initializing rpcclient
Andreas Schneider [Wed, 5 Oct 2016 06:39:20 +0000 (08:39 +0200)]
s3-rpcclient: Fix initializing rpcclient

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-param: Add comment to call lp_load_global() after popt processing
Andreas Schneider [Wed, 5 Oct 2016 06:33:03 +0000 (08:33 +0200)]
s3-param: Add comment to call lp_load_global() after popt processing

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-utils: Fix loading smb.conf in smbcquotas
Andreas Schneider [Wed, 5 Oct 2016 06:22:54 +0000 (08:22 +0200)]
s3-utils: Fix loading smb.conf in smbcquotas

Pair-Programmed-With: Uri Simchoni <uri@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-libnet: Pass enum value names to dcerpc_samr_SetUserInfo2()
Andreas Schneider [Tue, 4 Oct 2016 16:14:50 +0000 (18:14 +0200)]
s3-libnet: Pass enum value names to dcerpc_samr_SetUserInfo2()

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos4-libnet: Use SetUserInfo2 to set the account flags
Andreas Schneider [Tue, 4 Oct 2016 16:09:54 +0000 (18:09 +0200)]
s4-libnet: Use SetUserInfo2 to set the account flags

[MS-WKST] states that SetUserInfo2 should be used to set the account
flags. We already call this a few lines down to set the password.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3: lib: messaging. Add function comments I needed to understand this code.
Jeremy Allison [Wed, 5 Oct 2016 17:46:13 +0000 (10:46 -0700)]
s3: lib: messaging. Add function comments I needed to understand this code.

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): Thu Oct  6 02:29:41 CEST 2016 on sn-devel-144

7 years agos3-printing: fix migrate printer code (bug 8618)
Björn Baumbach [Fri, 18 Nov 2011 17:54:56 +0000 (18:54 +0100)]
s3-printing: fix migrate printer code (bug 8618)

Removed path from driver files.
We only need the basenames.
(cherry picked from commit d61993043fcb7676a58658476421f5f4ff1a3fea)
(cherry picked from commit 9f07ef2249dc21eab37cd5888623e6edc84b2b59)

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

Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Oct  5 19:19:39 CEST 2016 on sn-devel-144

7 years agotevent: version 0.9.31 tevent-0.9.31
Stefan Metzmacher [Wed, 5 Oct 2016 06:59:19 +0000 (08:59 +0200)]
tevent: version 0.9.31

* tevent_update_timer() and tevent_req_reset_endtime() have been added
* documentation updates
* it is now safe to talloc_free() a tevent_threaded_context,
  all running threads keep running until they're finished,
  but we no longer abort().

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): Wed Oct  5 15:32:35 CEST 2016 on sn-devel-144

7 years agomessaging: Add an indirection for messaging_dgm_register_tevent_context
Volker Lendecke [Sat, 1 Oct 2016 04:53:44 +0000 (21:53 -0700)]
messaging: Add an indirection for messaging_dgm_register_tevent_context

Only one tevent_fd is possible for every file descriptor.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agomessages_dgm: Avoid an unnecessary declaration
Volker Lendecke [Sat, 1 Oct 2016 05:17:44 +0000 (22:17 -0700)]
messages_dgm: Avoid an unnecessary declaration

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
7 years agomessaging: Avoid crashes
Volker Lendecke [Fri, 30 Sep 2016 13:42:40 +0000 (06:42 -0700)]
messaging: Avoid crashes

With the latest patches we defer messages to a messaging_context's default
context, the one that it was created with. This is another incarnation of
085542fc93b3 (I believe): messaging contexts can outlive their tevent contexts.

In this case, the tevent_schedule_immediate(msg_ctx->event_ctx) has nothing to
schedule on and will crash. This patch uses the fact that tevent_fd's can
outlive their event_contexts. When the tevent_context dies, all tevent_fd's
will get their flags set to 0. The tevent_handles in messages_dgm_ref always
have TEVENT_FD_READ set, so a 0 flags field indicates the tevent_context has
died.

Signed-off-by: Volker Lendecke <vl@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Oct  5 03:51:43 CEST 2016 on sn-devel-144

7 years agomessaging: Avoid a default tevent_fd
Volker Lendecke [Fri, 30 Sep 2016 13:42:40 +0000 (06:42 -0700)]
messaging: Avoid a default tevent_fd

Instead, rely on messaging_dgm_ref to always request a tevent_handle.

Signed-off-by: Volker Lendecke <vl@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agomessaging: Disable the correct fde on error
Volker Lendecke [Fri, 30 Sep 2016 13:42:40 +0000 (06:42 -0700)]
messaging: Disable the correct fde on error

We might be called from different event contexts and thus
via different fde's

Signed-off-by: Volker Lendecke <vl@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agomessaging: Make messaging_dgm_register_tevent_context return a tevent_fd
Volker Lendecke [Fri, 30 Sep 2016 13:42:40 +0000 (06:42 -0700)]
messaging: Make messaging_dgm_register_tevent_context return a tevent_fd

Signed-off-by: Volker Lendecke <vl@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agomessaging4: Postpone messages to the right tevent context
Volker Lendecke [Wed, 28 Sep 2016 23:05:25 +0000 (16:05 -0700)]
messaging4: Postpone messages to the right tevent context

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agomessaging: Act on messages within the right context
Volker Lendecke [Sat, 24 Sep 2016 02:35:10 +0000 (19:35 -0700)]
messaging: Act on messages within the right context

Only look at "classic" messaging_register handlers in the main event
context loop

If we're sitting in a nested event context, only act upon the
messaging_filtered_read ones that are registered in the nested context.

Postpone everything else via an immediate to the main tevent context

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agomessaging: Pass "ev" to messaging_dispatch_rec
Volker Lendecke [Sat, 24 Sep 2016 02:28:10 +0000 (19:28 -0700)]
messaging: Pass "ev" to messaging_dispatch_rec

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agomessages_dgm_ref: Pass receiving "ev" to recv_cb
Volker Lendecke [Sat, 24 Sep 2016 01:36:15 +0000 (18:36 -0700)]
messages_dgm_ref: Pass receiving "ev" to recv_cb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agomessages_dgm: Pass receiving "ev" to recv_cb
Volker Lendecke [Sat, 24 Sep 2016 01:36:15 +0000 (18:36 -0700)]
messages_dgm: Pass receiving "ev" to recv_cb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agomessages_dgm: Pass down event_ctx one level
Volker Lendecke [Sat, 24 Sep 2016 00:07:20 +0000 (17:07 -0700)]
messages_dgm: Pass down event_ctx one level

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agomessages_dgm: Drop a segment if we can't ship it for 60 seconds
Volker Lendecke [Mon, 12 Sep 2016 12:12:10 +0000 (14:12 +0200)]
messages_dgm: Drop a segment if we can't ship it for 60 seconds

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agotevent: Add tevent_req_reset_endtime
Volker Lendecke [Mon, 12 Sep 2016 11:02:26 +0000 (13:02 +0200)]
tevent: Add tevent_req_reset_endtime

We might decide at some point that we don't want a request to
time out

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agomessaging: Optimize self-sends
Volker Lendecke [Mon, 25 Jul 2016 14:31:18 +0000 (16:31 +0200)]
messaging: Optimize self-sends

We need to go through the event loop, which messaging_dgm_send does. We can
also use a tevent_immediate for the same purpose. Right now the main user is
messaging_ctdb: Here strace looks a bit weird when we receive a message.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agolib: Add messaging_rec_create
Volker Lendecke [Sat, 24 Sep 2016 02:06:56 +0000 (19:06 -0700)]
lib: Add messaging_rec_create

Essentially a wrapper around messaging_rec_dup

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agomessaging: add an overflow test
Volker Lendecke [Fri, 9 Sep 2016 14:51:25 +0000 (16:51 +0200)]
messaging: add an overflow test

Send 1000 messages without picking them up. Then destroy the sending messaging
context.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agolib: Remove poll_funcs
Volker Lendecke [Wed, 28 Sep 2016 21:44:03 +0000 (14:44 -0700)]
lib: Remove poll_funcs

unix_msg was the only user

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agolib: Remove unix_msg
Volker Lendecke [Wed, 28 Sep 2016 21:35:21 +0000 (14:35 -0700)]
lib: Remove unix_msg

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agomessages_dgm: Convert to pthreadpool_tevent
Volker Lendecke [Fri, 9 Sep 2016 14:51:00 +0000 (16:51 +0200)]
messages_dgm: Convert to pthreadpool_tevent

This itself adds a lot of code, however it removes the unix_msg library.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agopthreadpool: Add a small test for pthreadpool_tevent
Volker Lendecke [Fri, 9 Sep 2016 14:42:05 +0000 (16:42 +0200)]
pthreadpool: Add a small test for pthreadpool_tevent

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agopthreadpool_tevent: Drop running jobs on talloc_free
Volker Lendecke [Fri, 9 Sep 2016 11:28:51 +0000 (13:28 +0200)]
pthreadpool_tevent: Drop running jobs on talloc_free

Enable us to destroy a pthreadpool_tevent structure with active jobs

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agopthreadpool_tevent: Move the pthreadpool_tevent_job_state declaration
Volker Lendecke [Fri, 9 Sep 2016 11:27:13 +0000 (13:27 +0200)]
pthreadpool_tevent: Move the pthreadpool_tevent_job_state declaration

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agopthreadpool_pipe: Implement EBUSY for _destroy
Volker Lendecke [Fri, 9 Sep 2016 13:18:41 +0000 (15:18 +0200)]
pthreadpool_pipe: Implement EBUSY for _destroy

Restore EBUSY on pthreadpool_pipe_destroy.

We need to count jobs in pthreadpool_pipe so that pthreadpool can exit with
active jobs. Unfortunately this makes pthreadpool_pipe_add_job non-threadsafe.
We could add mutexes around "num_jobs", but this would mean another set of
pthread_atfork functions. As we don't use threaded pthreadpool_pipe_add_job
except in the tests, just remove the tests...

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agopthreadpool: Use detached threads
Volker Lendecke [Fri, 9 Sep 2016 11:07:57 +0000 (13:07 +0200)]
pthreadpool: Use detached threads

So far we used joinable threads. This prevented pthreadpool_destroy with
blocked threads. This patch converts pthreadpool to detached threads. Now
pthreadpool_destroy does not have to wait for the idle threads to finish, it
can immediately return. pthreadpool_destroy will tell all threads to exit, and
the last active thread will actually free(pthreadpool).

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agopthreadpool: Make "shutdown" a bool
Volker Lendecke [Wed, 7 Sep 2016 18:37:21 +0000 (20:37 +0200)]
pthreadpool: Make "shutdown" a bool

Just a small cleanup

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agotevent: Make talloc_free safe when threaded_contexts exist
Volker Lendecke [Wed, 7 Sep 2016 18:25:36 +0000 (20:25 +0200)]
tevent: Make talloc_free safe when threaded_contexts exist

I did not find a way to do this safely without a mutex per threaded_context.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agotevent: Add tevent_common_wakeup_fd()
Volker Lendecke [Wed, 7 Sep 2016 17:47:55 +0000 (19:47 +0200)]
tevent: Add tevent_common_wakeup_fd()

This prepares tevent run-down with active threads.

It has the advantage to not depend on talloc'ed structs. It is needed to make
talloc_free(tevent_context) safe when tevent_threaded_contexts are still
around.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agotevent: Rename wakeup fds
Volker Lendecke [Wed, 7 Sep 2016 17:17:21 +0000 (19:17 +0200)]
tevent: Rename wakeup fds

This makes the reading end of the signalling pipe special: If we have eventfd,
this is the same as the write fd. Without eventfd, it will have to be a
separate fd. This moves the requirement to #ifdef from the writing end to the
reading end. Why? We'll use the writing end somewhere else too soon, and this
patch avoids an #ifdef in that new place.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agotevent: Add tevent_update_timer()
Volker Lendecke [Wed, 31 Aug 2016 13:39:59 +0000 (15:39 +0200)]
tevent: Add tevent_update_timer()

This will be a quicker way to time out sending sockets in messaging_dgm. Right
now cleanup of out-sockets is a bit coarse. The ideal would be to kill a socket
after being idle n seconds. This would mean to free and re-install a timer on
every packet. tevent_update_timer will be quite a bit cheaper.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agotevent: Factor out tevent_common_insert_timer
Volker Lendecke [Wed, 31 Aug 2016 13:03:16 +0000 (15:03 +0200)]
tevent: Factor out tevent_common_insert_timer

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agomessaging4: Fix signed/unsigned hickups
Volker Lendecke [Sat, 24 Sep 2016 01:43:04 +0000 (18:43 -0700)]
messaging4: Fix signed/unsigned hickups

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agoREADME.Coding: Add clang-format style file
Uri Simchoni [Sun, 2 Oct 2016 17:41:45 +0000 (20:41 +0300)]
README.Coding: Add clang-format style file

Add how the coding style is represented in clang-format directives.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Oct  4 05:43:18 CEST 2016 on sn-devel-144

7 years agoREADME.Coding: Add rule about function declaration indentation
Uri Simchoni [Sun, 2 Oct 2016 17:40:06 +0000 (20:40 +0300)]
README.Coding: Add rule about function declaration indentation

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agoREADME.Coding: Remove an extra space
Uri Simchoni [Sun, 2 Oct 2016 17:37:37 +0000 (20:37 +0300)]
README.Coding: Remove an extra space

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agosmbcquotas: add -m option
Uri Simchoni [Tue, 20 Sep 2016 15:51:00 +0000 (18:51 +0300)]
smbcquotas: add -m option

Add the "standard" -m command line option that controls max
client protocol.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agocliquota: support setting file system quota via SMB2
Uri Simchoni [Wed, 21 Sep 2016 22:03:41 +0000 (01:03 +0300)]
cliquota: support setting file system quota via SMB2

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agocliquota: factor out building of FILE_FS_CONTROL_INFORMATION
Uri Simchoni [Wed, 21 Sep 2016 20:58:33 +0000 (23:58 +0300)]
cliquota: factor out building of FILE_FS_CONTROL_INFORMATION

add a service routine that builds FILE_FS_CONTROL_INFORMATION
with default quota and flags. This will be reused by SMB2 and
by server code.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agocliquota: support setting user quota via SMB2
Uri Simchoni [Wed, 21 Sep 2016 16:35:39 +0000 (19:35 +0300)]
cliquota: support setting user quota via SMB2

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agocliquota: factor out building of FILE_QUOTA_INFORMATION
Uri Simchoni [Wed, 21 Sep 2016 15:37:40 +0000 (18:37 +0300)]
cliquota: factor out building of FILE_QUOTA_INFORMATION

Add a function to build a FILE_QUOTA_INFORMATION buffer
out of a quota list, and a function that adds a record
to a quota list.

Some parameters of the new functions are unused by
client code, but will be used by server code.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agocliquota: support getting fs quota by SMB2
Uri Simchoni [Tue, 20 Sep 2016 03:46:28 +0000 (06:46 +0300)]
cliquota: support getting fs quota by SMB2

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agocliquota: factor out fs quota parsing
Uri Simchoni [Tue, 20 Sep 2016 03:45:03 +0000 (06:45 +0300)]
cliquota: factor out fs quota parsing

This code will be reused by SMB2 code.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agocliquota: implement quota listing in SMB2
Uri Simchoni [Mon, 19 Sep 2016 19:17:10 +0000 (22:17 +0300)]
cliquota: implement quota listing in SMB2

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agocliquota: factor out parsing of a quota record buffer
Uri Simchoni [Mon, 19 Sep 2016 18:14:01 +0000 (21:14 +0300)]
cliquota: factor out parsing of a quota record buffer

In preparation for SMB2 support, take parsing of the return
buffer into a separate function.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agocliquota: some security hardening
Uri Simchoni [Mon, 19 Sep 2016 15:24:58 +0000 (18:24 +0300)]
cliquota: some security hardening

Add some checks for validity of the offset in
the return buffer.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agocliquota: refactor and cleanup listing of user quotas
Uri Simchoni [Sun, 18 Sep 2016 08:13:16 +0000 (11:13 +0300)]
cliquota: refactor and cleanup listing of user quotas

Split cli_list_user_quota into an outer loop function and
an inner loop function.

This simplifies the code somewhat, paves the way for SMB2
support, and fixes a couple of memory leaks in error
conditions. No functional changes.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-libsmb: support getting user's quota in SMB2
Uri Simchoni [Mon, 12 Sep 2016 19:38:15 +0000 (22:38 +0300)]
s3-libsmb: support getting user's quota in SMB2

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-libsmb: make parse_user_quota_record() public
Uri Simchoni [Mon, 12 Sep 2016 19:33:12 +0000 (22:33 +0300)]
s3-libsmb: make parse_user_quota_record() public

For reuse by SMB2 client code.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agos3-libsmb: Support getting fs attributes via SMB2
Uri Simchoni [Tue, 20 Sep 2016 11:32:06 +0000 (14:32 +0300)]
s3-libsmb: Support getting fs attributes via SMB2

Add a wrapper function arounf GET_INFO to obtain
file system attributes, and plumb it in.

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agosmbd: free talloc context if no quota records are available
Uri Simchoni [Sun, 18 Sep 2016 08:05:23 +0000 (11:05 +0300)]
smbd: free talloc context if no quota records are available

When generating a list of user quota records, free the memory
context that controls this list if the list is empty. Otherwise,
the context remains unreferenced and memory is leaked.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agocliquota: fix param count when setting fs quota
Uri Simchoni [Thu, 22 Sep 2016 13:06:12 +0000 (16:06 +0300)]
cliquota: fix param count when setting fs quota

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agontquotas: support "freeing" an empty quota list
Uri Simchoni [Sun, 18 Sep 2016 08:09:54 +0000 (11:09 +0300)]
ntquotas: support "freeing" an empty quota list

This avoids dereferencing a null pointer if there's
an attempt to free an empty list.

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
7 years agosmbcquotas: fix error message listing quotas
Uri Simchoni [Fri, 16 Sep 2016 19:01:46 +0000 (22:01 +0300)]
smbcquotas: fix error message listing quotas

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

Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>