sfrench/samba-autobuild/.git
9 years agotalloc: inline talloc_get_name()
Stefan Metzmacher [Wed, 4 Dec 2013 22:22:04 +0000 (23:22 +0100)]
talloc: inline talloc_get_name()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agotalloc: inline more static functions
Stefan Metzmacher [Wed, 20 Nov 2013 08:57:58 +0000 (09:57 +0100)]
talloc: inline more static functions

We need the code to be as fast as possible.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib: Fix build --without-winbind by adding winbind_lookup_usersids dummy
Kai Blin [Fri, 9 May 2014 13:01:23 +0000 (15:01 +0200)]
lib: Fix build --without-winbind by adding winbind_lookup_usersids dummy

When building without winbind lib/winbind_util.c was missing a dummy function for winbind_lookup_usersids()

Signed-off-by: Kai Blin <kai@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Fri May 16 17:19:18 CEST 2014 on sn-devel-104

9 years agoselftest: Test auth_wbc, the auth4 winbind and winbind_wbclient modules using pdbtest
Andrew Bartlett [Fri, 16 May 2014 02:30:43 +0000 (14:30 +1200)]
selftest: Test auth_wbc, the auth4 winbind and winbind_wbclient modules using pdbtest

This ensures these authentication modules continue to operate correctly, and that the results are consistent.

Andrew Bartlett

Change-Id: I7f63cd93e55c6f73ceeafb14f1dc265291791803
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri May 16 12:50:44 CEST 2014 on sn-devel-104

9 years agoauth: Allow auth_samba4 to be forced to run a specific auth module
Andrew Bartlett [Fri, 16 May 2014 02:29:43 +0000 (14:29 +1200)]
auth: Allow auth_samba4 to be forced to run a specific auth module

This will allow new tests to be written to validate winbindd authentication results

Andrew Bartlett

Change-Id: I008eba1de349b17ee4eb9f11be08338557dffecc
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agoselftest: Run pdbtest under valgrind if specified
Andrew Bartlett [Wed, 14 May 2014 07:26:00 +0000 (19:26 +1200)]
selftest: Run pdbtest under valgrind if specified

Change-Id: I21e169ba563551e13c46f07f86205625ad166c64
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
9 years agonsswitch: Fix the check for the privileged pipe.
Andreas Schneider [Fri, 16 May 2014 07:50:42 +0000 (09:50 +0200)]
nsswitch: Fix the check for the privileged pipe.

Change-Id: I8f23ecc8444c3b25d5be2a7fdbf51ba7fe4a5ed9
Signed-off-by: Andreas Schneider <asn@samba.org>
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
9 years agoadd FSCTL_SET_ZERO_ON_DEALLOCATION define
Björn Jacke [Thu, 15 May 2014 09:38:25 +0000 (11:38 +0200)]
add FSCTL_SET_ZERO_ON_DEALLOCATION define

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Thu May 15 15:16:34 CEST 2014 on sn-devel-104

9 years agoadd FSCTL_SET_ZERO_DATA fsctl define
Björn Jacke [Tue, 13 May 2014 15:21:12 +0000 (17:21 +0200)]
add FSCTL_SET_ZERO_DATA fsctl define

fallocalte with the FALLOC_FL_ZERO_RANGE flag introduced
with Linux 3.15 should be able to do this soon

Signed-off-by: Bjoern Jacke <bj@sernet.de>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agotalloc: Tune talloc_vasprintf
Volker Lendecke [Fri, 10 Jan 2014 09:45:22 +0000 (10:45 +0100)]
talloc: Tune talloc_vasprintf

vsnprintf is significantly more expensive than memcpy. For the
common case where the string we print is less than a kilobyte, avoid
the second vsnprintf.

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): Thu May 15 12:49:14 CEST 2014 on sn-devel-104

9 years agos3:vfs_gpfs: increase log level for EPERM and EACCES errors in gpfs_get_xattr()
Ralph Wuerthner [Fri, 31 Jan 2014 09:31:21 +0000 (10:31 +0100)]
s3:vfs_gpfs: increase log level for EPERM and EACCES errors in gpfs_get_xattr()

Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May 15 02:19:41 CEST 2014 on sn-devel-104

9 years agoldbsamba: Move pyldb-utils dependency to python_samba__ldb
Kai Blin [Tue, 13 May 2014 22:22:01 +0000 (00:22 +0200)]
ldbsamba: Move pyldb-utils dependency to python_samba__ldb

This allows to build smbd statically again.

Pair-programmed-with: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Kai Blin <kai@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Kai Blin <kai@samba.org>
Autobuild-Date(master): Wed May 14 04:01:46 CEST 2014 on sn-devel-104

9 years agosmbd: Remove unused code for dos attributes in stat struct
Christof Schmitt [Thu, 17 Apr 2014 20:46:38 +0000 (13:46 -0700)]
smbd: Remove unused code for dos attributes in stat struct

This code is unused since the move to the waf build system.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Christian Ambach <ambi@samba.org>
Autobuild-Date(master): Wed May 14 01:35:41 CEST 2014 on sn-devel-104

9 years agoFix selfetet environment user gid
Simo Sorce [Tue, 13 May 2014 10:57:10 +0000 (12:57 +0200)]
Fix selfetet environment user gid

The real invoking user's gid should be in the /etc/group file or it may
cause spurious error messages.

Signed-off-by: Simo Sorce <idra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Simo Sorce <idra@samba.org>
Autobuild-Date(master): Tue May 13 15:33:21 CEST 2014 on sn-devel-104

9 years agos4:imessaging: Remove event context from irpc and imessaging structures
Andrew Bartlett [Mon, 5 May 2014 04:27:59 +0000 (16:27 +1200)]
s4:imessaging: Remove event context from irpc and imessaging structures

The only part of this code with a stored event context is now the
binding_handle created by irpc_binding_handle() when in the client
dcerpc_binding_handle_set_sync_ev() is called,
otherwise a new nested event context is created for sync calls.

Note that the FD event associated with the socket still implies
the long term event context passed to imessaging_[client]_init().

Andrew Bartlett

Change-Id: I9aeae94b26e3736370f449daa96808e6cdc2d55d
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue May 13 02:33:24 CEST 2014 on sn-devel-104

9 years agos4:imessaging: Remove dcerpc_binding_handle_set_sync_ev() call from irpc_binding_handle()
Andrew Bartlett [Mon, 5 May 2014 04:27:59 +0000 (16:27 +1200)]
s4:imessaging: Remove dcerpc_binding_handle_set_sync_ev() call from irpc_binding_handle()

The callers do this explicitly now if required.

Change-Id: I0e6f562aac4e3c0a75149c5850eb9f96269a3caf
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4:irpc/tests: explicitly use dcerpc_binding_handle_set_sync_ev()
Andrew Bartlett [Mon, 5 May 2014 04:27:59 +0000 (16:27 +1200)]
s4:irpc/tests: explicitly use dcerpc_binding_handle_set_sync_ev()

This indicates that we're using nested event loops...

Andrew Bartlett

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

Change-Id: I17d530a1f338cfdbd2e4e755b6f01a44a3e7ba7a
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
9 years agos4:pyrpc: explicitly use dcerpc_binding_handle_set_sync_ev() for irpc
Andrew Bartlett [Mon, 5 May 2014 04:27:59 +0000 (16:27 +1200)]
s4:pyrpc: explicitly use dcerpc_binding_handle_set_sync_ev() for irpc

This indicates that we may use nested event loops...

Andrew Bartlett

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

Change-Id: Id014dcc68699c86cb99015a91a6979e30795f727
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
9 years agos4:service_task: explicitly use dcerpc_binding_handle_set_sync_ev() for irpc
Andrew Bartlett [Mon, 5 May 2014 04:27:59 +0000 (16:27 +1200)]
s4:service_task: explicitly use dcerpc_binding_handle_set_sync_ev() for irpc

This indicates that we're using nested event loops...

Andrew Bartlett

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

Change-Id: I7e147850566301a5ef2354b8615a044d121968b5
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
9 years agos4:rpc_server/netlogon: explicitly use dcerpc_binding_handle_set_sync_ev() for irpc
Andrew Bartlett [Mon, 5 May 2014 04:27:59 +0000 (16:27 +1200)]
s4:rpc_server/netlogon: explicitly use dcerpc_binding_handle_set_sync_ev() for irpc

This indicates that we're using nested event loops...

Andrew Bartlett

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

Change-Id: I4dcc7bf3c624612980e53b6119a60989fc2ea3b6
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
9 years agos4:auth_winbind: explicitly use dcerpc_binding_handle_set_sync_ev() for irpc
Andrew Bartlett [Mon, 5 May 2014 04:27:59 +0000 (16:27 +1200)]
s4:auth_winbind: explicitly use dcerpc_binding_handle_set_sync_ev() for irpc

This indicates that we're using nested event loops...

Andrew Bartlett

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

Change-Id: I08f21876d42197f76fe3ae10b4f464626d70bf5a
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
9 years agos4:irpc/tests: make use explicit use of the top level event context
Andrew Bartlett [Mon, 5 May 2014 04:27:59 +0000 (16:27 +1200)]
s4:irpc/tests: make use explicit use of the top level event context

Andrew Bartlett

Change-Id: Ia193f97f62a1cb928aa814679578f90bde212013
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos4:nbt_server/wins: make use explicit use of the top level event context
Andrew Bartlett [Mon, 5 May 2014 04:27:59 +0000 (16:27 +1200)]
s4:nbt_server/wins: make use explicit use of the top level event context

Andrew Bartlett

Change-Id: I4b8e5c16bd03a038da6527cfb4c91fc874626b18
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agotdb: return ENOSYS if the tdb was created with spinlocks.
Stefan Metzmacher [Tue, 6 May 2014 09:52:49 +0000 (11:52 +0200)]
tdb: return ENOSYS if the tdb was created with spinlocks.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon May 12 21:07:04 CEST 2014 on sn-devel-104

9 years agopytdb: avoid const warnings by using discard_const_p()
Stefan Metzmacher [Mon, 3 Feb 2014 10:29:38 +0000 (11:29 +0100)]
pytdb: avoid const warnings by using discard_const_p()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agos3:lib: always use db_open(serverid.tdb)
Stefan Metzmacher [Mon, 12 May 2014 08:21:12 +0000 (10:21 +0200)]
s3:lib: always use db_open(serverid.tdb)

We should not create an empty local serverid.tdb in a cluster setup...

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoauth: avoid overwriting the auth_sam_reply.h header all the time.
Günther Deschner [Sat, 10 May 2014 01:03:13 +0000 (03:03 +0200)]
auth: avoid overwriting the auth_sam_reply.h header all the time.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon May 12 17:49:46 CEST 2014 on sn-devel-104

9 years agopidl/lib/wscript_build: make use of PERL_LIB_INSTALL_DIR
Stefan Metzmacher [Fri, 9 May 2014 09:49:10 +0000 (11:49 +0200)]
pidl/lib/wscript_build: make use of PERL_LIB_INSTALL_DIR

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Sat May 10 01:37:33 CEST 2014 on sn-devel-104

9 years agoscript/autobuild: make use of --with-perl-{arch,lib}-install-dir
Stefan Metzmacher [Fri, 9 May 2014 09:48:26 +0000 (11:48 +0200)]
script/autobuild: make use of --with-perl-{arch,lib}-install-dir

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agowafsamba: Fail with error message if perl doesn't provide valid dirs.
Stefan Metzmacher [Fri, 9 May 2014 07:42:23 +0000 (09:42 +0200)]
wafsamba: Fail with error message if perl doesn't provide valid dirs.

We try harder to get valid directories, we now fallback like this:

vendorarch => sitearch => archlib
and
vendorlib => sitelib => privlib

The new options are --with-perl-arch-install-dir and
--with-perl-lib-install-dir.

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

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
9 years agos3: libsmbclient: Work around bugs in SLES cifsd and Apple smbx SMB1 servers.
Jeremy Allison [Fri, 9 May 2014 04:31:49 +0000 (21:31 -0700)]
s3: libsmbclient: Work around bugs in SLES cifsd and Apple smbx SMB1 servers.

SLES's cifsd and Apple's smbx do not correctly handle FILE_NON_DIRECTORY_FILE
which prevents recursive copies in gvfs from working correctly [1] since GVFS
tries to open the directory, expecting ENOTDIR, but it suceeds and appears as a
zero byte file.

This fix adds code to the cli_open() open code that checks if
CreateOptions was requested with FILE_NON_DIRECTORY_FILE set,
and if the attributes returned include FILE_ATTRIBUTE_DIRECTORY
we synchronously close the file handle just opened, and return
NT_STATUS_FILE_IS_A_DIRECTORY to the caller.

Depends on the previous API update to cli_ntcreate()
to add returned attributes.

Fixes bug #10587 - Opening directories on SLES's cifsd and Apple's smbx succeeds.

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

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos3: client : correctly fill in the struct smb_create_returns from cli_ntcreate()...
Jeremy Allison [Fri, 9 May 2014 04:23:22 +0000 (21:23 -0700)]
s3: client : correctly fill in the struct smb_create_returns from cli_ntcreate(), cli_ntcreate_recv(), cli_nttrans_create() and cli_nttrans_create_recv().

This completes the update of the create API to return
all the data returned by the server on open.

We can now use this data to detect buggy servers
without an extra round trip.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos3: client : Add extra return parameter to all client open calls.
Jeremy Allison [Fri, 9 May 2014 03:55:57 +0000 (20:55 -0700)]
s3: client : Add extra return parameter to all client open calls.

Add a return parameter of struct smb_create_returns *cr to
cli_ntcreate()
cli_ntcreate_recv()
cli_nttrans_create()
cli_nttrans_create_recv()

Always pass in NULL for now. This fixes the create
API to always fully return the data the server has
given back to us on the open file to the caller.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agos3: client - rename 'struct smb2_create_returns' to 'struct smb_create_returns' so...
Jeremy Allison [Fri, 9 May 2014 03:08:41 +0000 (20:08 -0700)]
s3: client - rename 'struct smb2_create_returns' to 'struct smb_create_returns' so we can use this in SMB1 create returns as well.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoselftest: skip GETADDRINFO tests
Stefan Metzmacher [Fri, 9 May 2014 14:49:52 +0000 (16:49 +0200)]
selftest: skip GETADDRINFO tests

'smbtorture3 //host/share -U% GETADDRINFO' can get into a 100% cpu
loop, because it uses pthreads via fncall_context_init()
and socket_wrapper doesn't support threads yet.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri May  9 19:28:13 CEST 2014 on sn-devel-104

9 years agoswrap: Update version to 1.0.2.
Andreas Schneider [Thu, 8 May 2014 12:07:36 +0000 (14:07 +0200)]
swrap: Update version to 1.0.2.

This makes sure we require version 1.0.2 of the system library.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri May  9 11:36:55 CEST 2014 on sn-devel-104

9 years agoswrap: Fall back to RTLD_NEXT if we can't find libc.
Andreas Schneider [Thu, 8 May 2014 12:07:16 +0000 (14:07 +0200)]
swrap: Fall back to RTLD_NEXT if we can't find libc.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoFix some typos.
Jakub Wilk [Thu, 8 May 2014 13:30:09 +0000 (15:30 +0200)]
Fix some typos.

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

Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
9 years agoswrap: Use the loaded libc open() directly.
Andreas Schneider [Thu, 8 May 2014 12:05:30 +0000 (14:05 +0200)]
swrap: Use the loaded libc open() directly.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
9 years agoswrap: Do not leak memory in swrap_recvmsg_after().
Andreas Schneider [Thu, 8 May 2014 12:04:11 +0000 (14:04 +0200)]
swrap: Do not leak memory in swrap_recvmsg_after().

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
Reviewed-by: Simo Sorce <idra@samba.org>
9 years agowafsamba: If perl can't provide defaults, define them.
Andreas Schneider [Tue, 15 Apr 2014 08:24:24 +0000 (10:24 +0200)]
wafsamba: If perl can't provide defaults, define them.

This should fix the installation on FreeBSD.

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

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Thu May  8 13:55:50 CEST 2014 on sn-devel-104

9 years agotorture3: local-messaging-read3
Volker Lendecke [Wed, 7 May 2014 09:21:04 +0000 (11:21 +0200)]
torture3: local-messaging-read3

This is a testcase for the rpc-style messaging nested event context. We have to
fork here: The nested event context does not reply to the PING message, it only
listens for the PONG response. But that's the point of the patches: Correctly
pick just one message in a nested event context. I think this is the best we
can do with nested event contexts.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu May  8 11:32:44 CEST 2014 on sn-devel-104

9 years agomessaging3: Relax the self-send check a bit
Volker Lendecke [Wed, 7 May 2014 07:51:59 +0000 (09:51 +0200)]
messaging3: Relax the self-send check a bit

In the future we will have multiple task id's per process. They should all be
able to benefit from the self-send local optimization.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Factor out the self-send check
Volker Lendecke [Wed, 7 May 2014 07:50:27 +0000 (09:50 +0200)]
messaging3: Factor out the self-send check

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Push down the self-send callback
Volker Lendecke [Wed, 7 May 2014 07:44:57 +0000 (09:44 +0200)]
messaging3: Push down the self-send callback

In the messaging_read receivers we already defer the callback: We need to
reply on potentially different tevent contexts, thus the defer_callback.

The callback case in messaging_dispatch_rec was direct before this
patch. This changes messaging_dispatch_rec to also defer the callback
in the self-send case.

Now we need only two roundtrips in local-messaging-read1 :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agotorture3: Fix local-messaging-read1
Volker Lendecke [Wed, 7 May 2014 06:49:04 +0000 (08:49 +0200)]
torture3: Fix local-messaging-read1

Now that we defer requests in dispatch_rec, we need 3 rounds to finish
the requests

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Fix messaging_filtered_read_send
Volker Lendecke [Tue, 6 May 2014 07:39:01 +0000 (09:39 +0200)]
messaging3: Fix messaging_filtered_read_send

If we register an additional tevent context, we can now properly do
nested event contexts, listening for just one message type inside a
tevent_req_poll.

At this point this only enhances things without ctdb, but I'm working fixing
that soon.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Add messaging_dgm_register_tevent_context
Volker Lendecke [Tue, 6 May 2014 07:11:17 +0000 (09:11 +0200)]
messaging3: Add messaging_dgm_register_tevent_context

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib: Enhance poll_funcs_tevent for multiple tevent_contexts
Volker Lendecke [Mon, 5 May 2014 06:45:52 +0000 (08:45 +0200)]
lib: Enhance poll_funcs_tevent for multiple tevent_contexts

With this patch it will be possible to use nested event contexts with
messaging_filtered_read_send/recv. Before this patchset only the one and only
event context a messaging_context is initialized with is able to receive
datagrams from the unix domain socket. So if you want to code a synchronous
RPC-like operation using a nested event context, you will not see the reply,
because the nested event context does not have the required tevent_fd's.
Unfortunately, this patchset has to add some advanced array voodoo. The idea
is that state->watches[] contains what we hand out with watch_new, and
state->contexts contains references to the tevent_contexts. For every watch we
need a tevent_fd in every event context, and the routines make sure that the
arrays are properly maintained.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Add comments about not touching "waiters"
Volker Lendecke [Fri, 2 May 2014 09:20:40 +0000 (09:20 +0000)]
messaging3: Add comments about not touching "waiters"

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Fix 80-char line limit
Volker Lendecke [Fri, 2 May 2014 09:12:52 +0000 (09:12 +0000)]
messaging3: Fix 80-char line limit

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agodbwrap: Use messaging_filtered_read
Volker Lendecke [Thu, 24 Apr 2014 09:23:48 +0000 (09:23 +0000)]
dbwrap: Use messaging_filtered_read

This does not really save any code lines, but IMHO the code is simpler
this way. Also, in case we have lots of watchers this will be slightly
cheaper, because we don't have to re-establish a tevent_req.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomessaging3: Add messaging_filtered_read
Volker Lendecke [Thu, 24 Apr 2014 09:05:53 +0000 (09:05 +0000)]
messaging3: Add messaging_filtered_read

This delegates the decision whether to read a message to a callback

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agowbclient: ensure response struct is initialized
Alexander Bokovoy [Wed, 7 May 2014 08:00:46 +0000 (11:00 +0300)]
wbclient: ensure response struct is initialized

Prior to asking for a winbindd private pipe we need to initialize
response structure to deal with a possible response failure.

winbind_open_pipe_sock() issues two winbindd requests:
 - asks for interface version
 - asks for a private pipe

The first call returns interface version in a response structure (which
is a union). The second call might fail -- in this case response
structure will not be initialized or filled in with any information.

As result, if the second call failed, response structure will have data
from an interface string interpreted as a pointer to a string during
SAFE_FREE() at the end of the winbind_open_pipe_sock().

To avoid that, ensure response struct is initialized before asking for
a private pipe.

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

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu May  8 04:24:53 CEST 2014 on sn-devel-104

9 years agos3-krb5: Limit search for old kvno to 8bits
Christof Schmitt [Tue, 6 May 2014 23:48:07 +0000 (16:48 -0700)]
s3-krb5: Limit search for old kvno to 8bits

Some keytab files store the kvno only in 8bits. Limit the compare to
8bits, so that we don't miss old keys and delete them. This fixes the
problem that updates to the keytab file removed all previous keys.

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Simo Sorce <idra@samba.org>
Autobuild-User(master): Christof Schmitt <cs@samba.org>
Autobuild-Date(master): Thu May  8 00:54:15 CEST 2014 on sn-devel-104

9 years agoparam: Use an explicit talloc_stackframe() in lp_load_ex for clarity and certainty
Andrew Bartlett [Tue, 1 Apr 2014 03:27:58 +0000 (16:27 +1300)]
param: Use an explicit talloc_stackframe() in lp_load_ex for clarity and certainty

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed May  7 22:14:21 CEST 2014 on sn-devel-104

9 years agoparam: Use an explicit talloc_stackframe() in lp_do_parameter for clarity and certainty.
Andrew Bartlett [Sun, 30 Mar 2014 21:28:29 +0000 (10:28 +1300)]
param: Use an explicit talloc_stackframe() in lp_do_parameter for clarity and certainty.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: replace P_OCTAL variable setting with s3 version which uses sscanf
Garming Sam [Tue, 25 Feb 2014 23:31:03 +0000 (12:31 +1300)]
param: replace P_OCTAL variable setting with s3 version which uses sscanf

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/param: change set_variable to be more consistent with s3 loadparm
Garming Sam [Tue, 25 Feb 2014 23:06:03 +0000 (12:06 +1300)]
lib/param: change set_variable to be more consistent with s3 loadparm

Correctly frees CMDLIST memory and uses lp_int instead of atoi.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: correctly return false when parsing invalid octal in lp_do_parameter
Garming Sam [Tue, 25 Feb 2014 22:21:35 +0000 (11:21 +1300)]
param: correctly return false when parsing invalid octal in lp_do_parameter

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/param: change a comment regarding helper parametric functions
Garming Sam [Tue, 25 Feb 2014 04:12:14 +0000 (17:12 +1300)]
lib/param: change a comment regarding helper parametric functions

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/param: remove unnecessary get_parametric s3 helper function
Garming Sam [Tue, 25 Feb 2014 04:07:31 +0000 (17:07 +1300)]
lib/param: remove unnecessary get_parametric s3 helper function

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/param: use get_parametric_helper in lpcfg_get_parametric
Garming Sam [Tue, 25 Feb 2014 04:02:52 +0000 (17:02 +1300)]
lib/param: use get_parametric_helper in lpcfg_get_parametric

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: remove unused get_parametrics_by_service
Garming Sam [Tue, 25 Feb 2014 03:58:52 +0000 (16:58 +1300)]
param: remove unused get_parametrics_by_service

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: copy parametric option helper to lib/param
Garming Sam [Tue, 25 Feb 2014 03:58:21 +0000 (16:58 +1300)]
param: copy parametric option helper to lib/param

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: tidy up get_parametrics_by_service
Garming Sam [Tue, 25 Feb 2014 03:45:43 +0000 (16:45 +1300)]
param: tidy up get_parametrics_by_service

Reorders the search to check the service first, then check the globals
if it fails, or if none is specified, for better clarity.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/param: clean up lpcfg_get_parametric
Garming Sam [Tue, 25 Feb 2014 03:36:57 +0000 (16:36 +1300)]
lib/param: clean up lpcfg_get_parametric

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: Provide a talloc_stackframe() to external users of lp_set_cmdline()
Andrew Bartlett [Sun, 30 Mar 2014 21:20:23 +0000 (10:20 +1300)]
param: Provide a talloc_stackframe() to external users of lp_set_cmdline()

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: refactor lp_set_cmdline_helper to not call store_lp_set_cmdline
Garming Sam [Tue, 25 Feb 2014 00:53:58 +0000 (13:53 +1300)]
param: refactor lp_set_cmdline_helper to not call store_lp_set_cmdline

Currently worthless without a shared do_parameter.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: fix incorrect return on lp_set_cmdline_helper
Garming Sam [Tue, 25 Feb 2014 00:50:03 +0000 (13:50 +1300)]
param: fix incorrect return on lp_set_cmdline_helper

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/param: Remove unused static variable defaults_saved
Andrew Bartlett [Mon, 27 Jan 2014 02:41:48 +0000 (15:41 +1300)]
lib/param: Remove unused static variable defaults_saved

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/param: Make lpcfg_equal_parameter static (again)
Andrew Bartlett [Mon, 27 Jan 2014 02:34:06 +0000 (15:34 +1300)]
lib/param: Make lpcfg_equal_parameter static (again)

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/param: Make and use lpcfg_dump_a_service() in common
Andrew Bartlett [Mon, 27 Jan 2014 02:32:39 +0000 (15:32 +1300)]
lib/param: Make and use lpcfg_dump_a_service() in common

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoAdd a comment regarding strwicmp only being an ASCII string compare
Garming Sam [Wed, 19 Mar 2014 19:56:42 +0000 (08:56 +1300)]
Add a comment regarding strwicmp only being an ASCII string compare

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: remove NUMPARAMETERS macro from lib/param
Garming Sam [Thu, 13 Mar 2014 22:17:27 +0000 (11:17 +1300)]
param: remove NUMPARAMETERS macro from lib/param

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: remove NUMPARAMETERS macro in s3
Garming Sam [Thu, 13 Mar 2014 22:15:17 +0000 (11:15 +1300)]
param: remove NUMPARAMETERS macro in s3

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agodocs: enable checking of parametric options assignment
Garming Sam [Wed, 12 Mar 2014 23:24:36 +0000 (12:24 +1300)]
docs: enable checking of parametric options assignment

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/param: use strwicmp instead of strlower_talloc
Garming Sam [Tue, 25 Feb 2014 02:47:02 +0000 (15:47 +1300)]
lib/param: use strwicmp instead of strlower_talloc

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/param: fix an error in the is_default method in lib/param
Garming Sam [Thu, 27 Feb 2014 02:26:10 +0000 (15:26 +1300)]
lib/param: fix an error in the is_default method in lib/param

This means that list values stored by s3 loadparm can still be detected as
default or not.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: move parametric parameter dumping to lpcfg_dump_a_parameter
Garming Sam [Wed, 26 Feb 2014 00:22:33 +0000 (13:22 +1300)]
param: move parametric parameter dumping to lpcfg_dump_a_parameter

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: remove fstring from dump_a_parameter
Garming Sam [Wed, 26 Feb 2014 00:12:35 +0000 (13:12 +1300)]
param: remove fstring from dump_a_parameter

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agos3:loadparm: Fix dump a parameter to use the file indicated
Garming Sam [Tue, 25 Feb 2014 23:56:20 +0000 (12:56 +1300)]
s3:loadparm: Fix dump a parameter to use the file indicated

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: fix copy service to copy over cmdlist
Garming Sam [Mon, 24 Feb 2014 00:08:52 +0000 (13:08 +1300)]
param: fix copy service to copy over cmdlist

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <abartlet@samba.org>
9 years agoparam: correctly use param_table.c as a regular C file
Garming Sam [Sun, 23 Feb 2014 23:31:43 +0000 (12:31 +1300)]
param: correctly use param_table.c as a regular C file

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: use a single special handler for idmap parameters
Garming Sam [Sun, 23 Feb 2014 21:38:37 +0000 (10:38 +1300)]
param: use a single special handler for idmap parameters

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: add lp_do_parameter to s3 helpers
Garming Sam [Sun, 23 Feb 2014 21:30:03 +0000 (10:30 +1300)]
param: add lp_do_parameter to s3 helpers

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: use a single handle_netbios_aliases function
Garming Sam [Sun, 23 Feb 2014 21:12:48 +0000 (10:12 +1300)]
param: use a single handle_netbios_aliases function

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: include set_netbios_aliases in s3 helpers
Garming Sam [Sun, 23 Feb 2014 20:58:05 +0000 (09:58 +1300)]
param: include set_netbios_aliases in s3 helpers

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: setup ctx variable in loadparm globals
Garming Sam [Wed, 19 Mar 2014 20:09:58 +0000 (09:09 +1300)]
param: setup ctx variable in loadparm globals

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agomove str_list_make_v3 out of s3 code
Garming Sam [Mon, 24 Feb 2014 04:33:57 +0000 (17:33 +1300)]
move str_list_make_v3 out of s3 code

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: have a single handle_ldap_debug_level function
Garming Sam [Sun, 23 Feb 2014 20:53:44 +0000 (09:53 +1300)]
param: have a single handle_ldap_debug_level function

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: include init_ldap_debugging in the s3 helpers
Garming Sam [Sun, 23 Feb 2014 20:47:17 +0000 (09:47 +1300)]
param: include init_ldap_debugging in the s3 helpers

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: make lp_do_parameter_parametric use set_param_opt
Garming Sam [Sun, 23 Feb 2014 20:34:45 +0000 (09:34 +1300)]
param: make lp_do_parameter_parametric use set_param_opt

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: move handle printing into lib/param
Garming Sam [Fri, 21 Feb 2014 04:59:41 +0000 (17:59 +1300)]
param: move handle printing into lib/param

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: setup more variables in for the temporary loadparm context for the special...
Garming Sam [Fri, 21 Feb 2014 04:59:19 +0000 (17:59 +1300)]
param: setup more variables in for the temporary loadparm context for the special functions

In doing so, the loadparm context definition is now also moved to the loadparm.h header.

This means that the loadparm context is no longer private to the
lib/param code and that the source3 code can now override the values
within it.

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: add extra default parameter to get_parametrics_by_service
Garming Sam [Fri, 21 Feb 2014 04:16:15 +0000 (17:16 +1300)]
param: add extra default parameter to get_parametrics_by_service

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: make init_printer_values use lpcfg functions
Garming Sam [Fri, 21 Feb 2014 03:09:01 +0000 (16:09 +1300)]
param: make init_printer_values use lpcfg functions

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agolib/param: use lp_set_enum_parm
Garming Sam [Fri, 21 Feb 2014 02:47:27 +0000 (15:47 +1300)]
lib/param: use lp_set_enum_parm

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: move lp_set_enum_parm to lib/param
Garming Sam [Fri, 21 Feb 2014 02:40:43 +0000 (15:40 +1300)]
param: move lp_set_enum_parm to lib/param

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
9 years agoparam: change lp_set_enum_parm to indicate whether or not it fails
Garming Sam [Fri, 21 Feb 2014 02:31:10 +0000 (15:31 +1300)]
param: change lp_set_enum_parm to indicate whether or not it fails

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>