samba.git
15 years agos3-libnet-samsync: use smb_create_user().
Günther Deschner [Wed, 1 Apr 2009 16:52:28 +0000 (18:52 +0200)]
s3-libnet-samsync: use smb_create_user().

Guenther
(cherry picked from commit e18f57fd36102212a3662823c58408da01d067ed)
(cherry picked from commit 2a0f4fd1b4fa58f5cf89595e93053abc6101817d)

15 years agos3-passdb: add smb_create_user().
Günther Deschner [Wed, 1 Apr 2009 16:52:13 +0000 (18:52 +0200)]
s3-passdb: add smb_create_user().

Guenther
(cherry picked from commit d0e1ff4aff24ef2f3b3f535ad25ad0573382e1a3)
(cherry picked from commit 44d72cfa74c103c41beea2f5651155506667811b)

15 years agos3-libnet-samsync: some pure cosmetics.
Günther Deschner [Wed, 1 Apr 2009 15:56:45 +0000 (17:56 +0200)]
s3-libnet-samsync: some pure cosmetics.

Guenther
(cherry picked from commit e4802bfcad0402fce1e942e22d5533b3c14ada80)
(cherry picked from commit 32c7e6c9e5a2a02b6972293c9d5233f4797899c8)

15 years agos3-libnet-samsync: use parent talloc context for libnet_samsync_passdb.
Günther Deschner [Wed, 1 Apr 2009 15:54:52 +0000 (17:54 +0200)]
s3-libnet-samsync: use parent talloc context for libnet_samsync_passdb.

Guenther
(cherry picked from commit af78240cbe68282190980cd6c367a8fc2a4438a6)
(cherry picked from commit c9bee2d4f982f677ced90ba18dc6326560139ed0)

15 years agos3-libnet: only call libnet_dssync_process() startup and shutdown callbacks when...
Günther Deschner [Wed, 1 Apr 2009 14:55:53 +0000 (16:55 +0200)]
s3-libnet: only call libnet_dssync_process() startup and shutdown callbacks when filled in.

Guenther
(cherry picked from commit 264b28ec0962c355ee90f9ac67fcf07cd84c5c7b)
(cherry picked from commit 7c553eb319de84a3510d348d3f927d11253aaacf)

15 years agos3:build: add targets to show how libraries will be built / linked
Michael Adam [Wed, 1 Apr 2009 00:02:10 +0000 (02:02 +0200)]
s3:build: add targets to show how libraries will be built / linked

showlibtalloc, showlibtdb, ... and one overall showlibs target.

Michael
(cherry picked from commit 1e92ddd40523f053513f9d12611e5a70c8a425f0)
(cherry picked from commit aeedc9e0ce1843aee9c3f4fa83f5132557de3049)

15 years agos3:build: don't build the static libs unconditionally
Michael Adam [Tue, 31 Mar 2009 23:58:22 +0000 (01:58 +0200)]
s3:build: don't build the static libs unconditionally

Michael
(cherry picked from commit 99b486a056222d69a4865d4ee828163902de8eba)
(cherry picked from commit d68e62f1a83e71a7dec6ce9b10b8963bc3c514b5)

15 years agos3:build: add LIBSMBCLIENT_LIBS and LIBSMBSHAREMODES_LIBS to Makefile
Michael Adam [Tue, 31 Mar 2009 23:56:02 +0000 (01:56 +0200)]
s3:build: add LIBSMBCLIENT_LIBS and LIBSMBSHAREMODES_LIBS to Makefile

for completeness

Michael
(cherry picked from commit b79157f602163c671a413202424652e35c973b12)
(cherry picked from commit 917d1d78980a6490f92e41f356ee5fa3a3bcdfcf)

15 years agos3:build: no need to set LIBFOO_STATIC to the object collection any more
Michael Adam [Tue, 31 Mar 2009 23:46:57 +0000 (01:46 +0200)]
s3:build: no need to set LIBFOO_STATIC to the object collection any more

now that the @LIBFOO_STATIC@ entries have vanished from the object lists.
Just use the static library.

Michael
(cherry picked from commit 15ef346f9f7c69a2012a9b41a56a6ae9ffdd7cf6)
(cherry picked from commit d2cbec7838e73da60a43219b8192fac3cdfbb2af)

15 years agos3:build: rename WINBIND_LIBS -> LIBWBCLIENT_LIBS for unification
Michael Adam [Tue, 31 Mar 2009 23:37:07 +0000 (01:37 +0200)]
s3:build: rename WINBIND_LIBS -> LIBWBCLIENT_LIBS for unification

Michael
(cherry picked from commit 993c87495b80caff8ce288a29cd1ce8935224ca2)
(cherry picked from commit 2c158434576bc3921f6de737cf3332c1baf1f4da)

15 years agos3:build: unify linking of libwbclient with a @LIBWBCLIENT_TARGET@
Michael Adam [Tue, 31 Mar 2009 23:34:01 +0000 (01:34 +0200)]
s3:build: unify linking of libwbclient with a @LIBWBCLIENT_TARGET@

just like for the libs configured with SMB_LIBRARY().
This makes @LIBWBCLIENT_STATIC@ vanish from the object collections.

Michael
(cherry picked from commit baf39de623d39dba6fe0bfed899f9b232f9c1266)
(cherry picked from commit f2bdfbfe7d43ec993806f4783ff089c0972e20dc)

15 years agos3:build: first cut at fixing linking of shared/static libs internally
Michael Adam [Tue, 31 Mar 2009 22:37:47 +0000 (00:37 +0200)]
s3:build: first cut at fixing linking of shared/static libs internally

This is based on a patch from the debian packages
by Steve Langasek <vorlon@debian.org>.

It removes the static libs from the object collections.
For those libs that are set up with SMB_LIBRARY().

Michael
(cherry picked from commit f9eb77477b82740814e6143837d8a70f8090b9a5)
(cherry picked from commit 874b6dc483f681842d076f597979feeb4b288bb4)

15 years agos3:build: add a SHOWCFLAGS target for debugging how CFLAGS are assebled
Michael Adam [Tue, 31 Mar 2009 06:50:57 +0000 (08:50 +0200)]
s3:build: add a SHOWCFLAGS target for debugging how CFLAGS are assebled

Michael
(cherry picked from commit 9aab2631c6294ebc3e4a7ab2367e22e3d552d41b)
(cherry picked from commit d2a09b6b1c1aa4a3a42a8a305ca6f824465d2d53)

15 years agos3:build: line-wrap assignment of FLAGS for readability
Michael Adam [Tue, 31 Mar 2009 06:50:16 +0000 (08:50 +0200)]
s3:build: line-wrap assignment of FLAGS for readability

Michael
(cherry picked from commit b2e8bc28a5f589b86269907ff384a9e4c1f3aaca)
(cherry picked from commit 38a7ba0d7fd17f76037117b0808c73e03f7fe02b)

15 years agoremove needless rpath stuff for default paths as early as possible
Björn Jacke [Wed, 11 Mar 2009 14:44:45 +0000 (15:44 +0100)]
remove needless rpath stuff for default paths as early as possible

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit c7dba467f268d0007c58e7de4985dc5386a44c6f)
(cherry picked from commit 6a59971f5286e588c87f6d2635e7d36a2ec3aa26)

15 years agoclean up lib64 linking paths the same way as lib
Björn Jacke [Wed, 11 Mar 2009 14:32:49 +0000 (15:32 +0100)]
clean up lib64 linking paths the same way as lib

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 066cbb5835feae90e2ce4172e3c58bf50a2b004b)
(cherry picked from commit 4cb1d0eef7155f9beaabd92d5e93d3b7974bc372)

15 years agoto be portable, use options first, arguments last
Björn Jacke [Sun, 8 Mar 2009 11:54:04 +0000 (12:54 +0100)]
to be portable, use options first, arguments last

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit da06a345cc290ca29234bc231fc9174d2780cf4f)
(cherry picked from commit dcff24b20290bd07f962d21b5a9b8bc7172b68d0)

15 years agolibreplace: use libreplace_SAVE_CPPFLAGS instead of SAVE_CPPFLAGS
Michael Adam [Mon, 23 Mar 2009 16:36:46 +0000 (17:36 +0100)]
libreplace: use libreplace_SAVE_CPPFLAGS instead of SAVE_CPPFLAGS

This fixes Samba3's double listing of -I options in CFLAGS,
since samba3's configure wraps the call to AC_LIBREPLACE_NETWORK_CHECKS
into a SAVE_CPPFLAGS="${CPPFLAGS}" .. CPPFLAGS="${SAVE_CPPFLAGS}"
sequence... :-)

Michael
(cherry picked from commit 33d9f46674a270a0715213c17581deef192826e1)
(cherry picked from commit cf43aadee5cd70597d5dc6750bff4486ed768204)

15 years agoProperly strip /usr/lib and /usr/include for the merged build.
Jelmer Vernooij [Sat, 14 Mar 2009 22:01:57 +0000 (23:01 +0100)]
Properly strip /usr/lib and /usr/include for the merged build.
(cherry picked from commit a3d2b77ddd9808b35300446cebca1b403ca56f78)
(cherry picked from commit d9403162871e5d9fa8e1823139fda1a039d842c2)

15 years agos3:build: prevent from setting "-O -g", check for $debug first.
Michael Adam [Mon, 23 Mar 2009 13:22:37 +0000 (14:22 +0100)]
s3:build: prevent from setting "-O -g", check for $debug first.

This makes configure actually behave as the comments describe.
The reversal of order was introduced by mistake in
90ea8ae9b1ed3b7ed1c93076517e026e629ea1aa

Michael
(cherry picked from commit a4cc3e253852794f477ef5d836537b50111d0e42)
(cherry picked from commit 8c98c32b9184b7d67a7fef2526fe73a5afb8a34c)

15 years agodon't set -O twice
Björn Jacke [Wed, 18 Mar 2009 21:19:06 +0000 (22:19 +0100)]
don't set -O twice

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 2dc8ce59b28d3a028551ac5087f31cf83d04e064)
(cherry picked from commit 34074d6baa9f667a67aae56e2294b8dabff2b07d)

15 years agoPrint an error if trying a merged build without a system kerberos lib
Volker Lendecke [Wed, 1 Apr 2009 13:29:25 +0000 (15:29 +0200)]
Print an error if trying a merged build without a system kerberos lib

Signed-off-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit ffdc2a3fe8437582ded1c4a3b09a54201519889b)
(cherry picked from commit e45edef8261f6c77de181cb896aa36987e5a36b4)

15 years agos3: fix the fix for bug #6195 - dont let smbd child processes panic
Michael Adam [Wed, 1 Apr 2009 10:23:07 +0000 (12:23 +0200)]
s3: fix the fix for bug #6195 - dont let smbd child processes panic

This patch makes sure the original and temporary TDBs are closed
_before_ the rename. Originally, the open TDB was renamed, and so
the name passdb.tdb.tmp stayed around in the db context. Hence
upon client connect, the smbd children died because reinit_after_fork()
calling tdb_reopen_all() would try to reopen passdb.tdb.tmp which
existed no longer...

Michael
(cherry picked from commit a7bbe8d10835d813a8d528e6e70f5d944ac0f804)

15 years agoTidy up some convert_string_internal error cases, found by Andrew Bartlett.
Jeremy Allison [Wed, 1 Apr 2009 01:28:49 +0000 (18:28 -0700)]
Tidy up some convert_string_internal error cases, found by Andrew Bartlett.
Jeremy.
(cherry picked from commit ee729830b872f1cb760ad91b808bf200bc34773d)

15 years agos3 onefs: Add missing newlines to debug statements in the onefs module
Tim Prouty [Wed, 1 Apr 2009 00:25:57 +0000 (00:25 +0000)]
s3 onefs: Add missing newlines to debug statements in the onefs module
(cherry picked from commit 74246650613cca9ec57c9a0eff75c53a5c15b110)
(cherry picked from commit 23876eba5f22b5953339b23bf25262d53acce994)

15 years agos3 onefs: Async failures are resulting in SMB_ASSERT->smb_panic while running many...
Zack Kirsch [Wed, 1 Apr 2009 00:00:40 +0000 (00:00 +0000)]
s3 onefs: Async failures are resulting in SMB_ASSERT->smb_panic while running many of the LOCK torture tests.

Return true from the onefs cancel function if we've errored, which can happen
when the CBRL domain is configured to only give out 1 lock. :)
(cherry picked from commit bfc7bb49ff0b842a1a372cee7d2affb49c2a0e54)
(cherry picked from commit 1197d4538c716fc0fbf3625f6b8b1a2b566cffaa)

15 years agoAdd missing newlines to debug statements
Steven Danneman [Wed, 25 Mar 2009 19:53:06 +0000 (12:53 -0700)]
Add missing newlines to debug statements
(cherry picked from commit 365b5cfcbeb041ce84718717f30ac02183c9af7f)
(cherry picked from commit 2ab9a15f4ae08155474222a857afd70bfdfc4a44)

15 years agos3:build: fix build of pam_winbind.so with static linking
Michael Adam [Tue, 31 Mar 2009 14:40:18 +0000 (16:40 +0200)]
s3:build: fix build of pam_winbind.so with static linking

Static talloc libs were missing since conversion to talloc.

Michael
(cherry picked from commit 848919e86ee8040aa81b8be2559283ada22cc723)

15 years agos3/ldbtools: don't neddlessly link against wbinbind libs
Björn Jacke [Mon, 23 Mar 2009 17:22:45 +0000 (18:22 +0100)]
s3/ldbtools: don't neddlessly link against wbinbind libs

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 9f68847576c4c5e77f042e97810be4f53574baba)

15 years agos3/cifs: don't link cifs mount helpers agains popt
Björn Jacke [Mon, 23 Mar 2009 18:14:45 +0000 (19:14 +0100)]
s3/cifs: don't link cifs mount helpers agains popt

the mount helpers don't use any popt symbols

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 682ce450c072ad4fd8c23b9f8990f1294254f2aa)

15 years agos3/pam_smbpass: don't link agains KRB5LIBS
Björn Jacke [Mon, 23 Mar 2009 18:35:53 +0000 (19:35 +0100)]
s3/pam_smbpass: don't link agains KRB5LIBS

pam_smbpass doesn't use the krb5 stuff

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 863c61de4c0a29a0cdad59fa3bebf17963ef6db2)

15 years agos3:build: make SHOWFLAGS target phony and add alias showflags
Michael Adam [Mon, 23 Mar 2009 16:47:26 +0000 (17:47 +0100)]
s3:build: make SHOWFLAGS target phony and add alias showflags

Michael

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 3c7f26b5e1e7f2bfd08de27e6e7772b614ef9121)

15 years agoremove non standard way to point to ctdb path
Björn Jacke [Thu, 19 Mar 2009 00:16:46 +0000 (01:16 +0100)]
remove non standard way to point to ctdb path

we can provide the path to ctdb via the --with-ctdb=... configure flag like we
do it with other packageѕ, too. There is no need for another redundnant
Makefile hack to point the ctdb header location

Signed-off-by: Michael Adam <obnox@samba.org>
(cherry picked from commit 12aba91bacc9c064fa57325d1b1f50afb2eddfaa)

15 years agoEnsure files starting with multiple dots are hidden
Jeremy Allison [Mon, 30 Mar 2009 22:05:39 +0000 (15:05 -0700)]
Ensure files starting with multiple dots are hidden
if "hide dot files" is set. Thanks to Barry Kelly <bkelly.ie@gmail.com>
for pointing this one out.
Jeremy.
(cherry picked from commit 286d6a404cca02a0d3662f6aa2ddd69d3dcbc17a)

15 years agoFix a debug msg typo
Volker Lendecke [Sat, 28 Mar 2009 23:52:22 +0000 (00:52 +0100)]
Fix a debug msg typo
(cherry picked from commit 2d12e14ad277d28b7b8181525b16992f4cad1370)

15 years agoFix the problem of 3.0.x passdb databases being version
Jeremy Allison [Sat, 28 Mar 2009 04:29:37 +0000 (21:29 -0700)]
Fix the problem of 3.0.x passdb databases being version
3 but using a different hash calculation than 3.2.x passwd
databases (also version 3). Introduces a minor version
number.
Jeremy.
(cherry picked from commit 7d3b85999c6d2521ef2f9a5aace52c9a19bf2f42)

15 years agos3: ifdef sendfile code that's only used in other ifdef'ed sendfile code
Björn Jacke [Fri, 27 Mar 2009 09:24:18 +0000 (10:24 +0100)]
s3: ifdef sendfile code that's only used in other ifdef'ed sendfile code

This fixes a "defined but not used" compile warning.
(cherry picked from commit 1aa65f485b60a80766581e7d3f31565f340aa528)

15 years agoEnsure parameter types match format string
Derrell Lipman [Fri, 27 Mar 2009 22:01:39 +0000 (18:01 -0400)]
Ensure parameter types match format string
(cherry picked from commit 63d9694d7a0198375fba3a713d6e5d3bbed7a458)

15 years ago[Bug 6228] SMBC_open_ctx failure due to path resolve failure doesn't set errno
Derrell Lipman [Fri, 27 Mar 2009 21:59:09 +0000 (17:59 -0400)]
[Bug 6228] SMBC_open_ctx failure due to path resolve failure doesn't set errno

Fixed.

It turns out there were a number of places where cli_resolve_path() was called
and the error path upon that function failing did not set errno. There were a
couple of places the failure handling code did set errno to ENOENT, so I made
them all consistent, although I think better errno choices for this condition
exist, e.g.  EHOSTUNREACH.

Derrell
(cherry picked from commit ebc4c0b50db16cdb11222c3d536a211bb86bcdfd)

15 years agoFix external np read after conversion to tevent_req
Volker Lendecke [Fri, 27 Mar 2009 20:11:10 +0000 (21:11 +0100)]
Fix external np read after conversion to tevent_req
(cherry picked from commit 0d7a37be40d7748cb8d685af5412624678b27208)

15 years agoFix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb correctly...
Jeremy Allison [Fri, 27 Mar 2009 19:12:30 +0000 (12:12 -0700)]
Fix bug #6195 - Migrating from 3.0.x to 3.3.x can fail to update passdb.tdb correctly. For the clustering case.
Clustered setups should have only ever used
the unsigned version of TDB_DATA in the
first place so they can't be in this mess :-).
Just do the normal upgrade in the clustered case.
Jeremy.
(cherry picked from commit ede0f69a97abd4f1cb7870b2da65d9198d20c7ad)

15 years agoFix the build of nfsv4_acls.c
Volker Lendecke [Fri, 20 Mar 2009 15:09:17 +0000 (16:09 +0100)]
Fix the build of nfsv4_acls.c

.. after adding smb_iconv_convenience to ndr_size_security_descriptor()
(cherry picked from commit 9e70a960b78b8c2ca7c308a4ff9af9011804585c)
(cherry picked from commit d3289c3e7df5951c1634642f026fc7873579b235)

15 years agoTry and fix the build farm RAW-STREAMS errors. Ordering of
Jeremy Allison [Thu, 26 Mar 2009 22:30:42 +0000 (15:30 -0700)]
Try and fix the build farm RAW-STREAMS errors. Ordering of
modules shouldn't matter, so as vfs_streams_depot doesn't
implement get/setxattrs then call into the full VFS stack
at the top.
Jeremy
(cherry picked from commit 5e77abe108bab07c04f5c7186b63a4c0fef59721)

15 years agoFix bug #6224 - nmbd waits 5 minutes at startup before checking if it needs to run...
Jeremy Allison [Thu, 26 Mar 2009 19:21:55 +0000 (12:21 -0700)]
Fix bug #6224 - nmbd waits 5 minutes at startup before checking if it needs to run elections
Fix logic bug that causes nmbd to wait 5 minutes before
looking for a master browser. This one is *old* :-). Thanks
for Simo for bugging me on this.
Jeremy.
(cherry picked from commit 21c76accc3cde979844eb622d7a9bafe1d02d9be)

15 years agos3:smbd: if we allow trans2 on the IPC$ share, then we have to allow transs2 too.
Stefan Metzmacher [Mon, 23 Mar 2009 10:44:00 +0000 (11:44 +0100)]
s3:smbd: if we allow trans2 on the IPC$ share, then we have to allow transs2 too.

Otherwise we'll confuse the client signing engine, when we reply an error to each transs2.

metze
(cherry picked from commit 7716ad68a8d859ac3651c4eb559b6e45d98566db)
(cherry picked from commit 1d11417c71ebcb80851c8b77e9f3102ee9b592f8)

15 years agoFix a talloc/malloc screwup in file_lines_pload
Volker Lendecke [Thu, 26 Mar 2009 13:54:18 +0000 (14:54 +0100)]
Fix a talloc/malloc screwup in file_lines_pload

Another bug due to careless merge to /lib :-(((

Volker
(cherry picked from commit c253e80ad21a24395a973b23993dd211b8e0d482)

15 years agoerror-codes: add WERR_DS_DRA_SOURCE_DISABLED.
Günther Deschner [Thu, 26 Mar 2009 13:51:04 +0000 (14:51 +0100)]
error-codes: add WERR_DS_DRA_SOURCE_DISABLED.

Guenther
(cherry picked from commit 5603c0f2ba9d5b90e5f8b71e779ec037053f04f8)
(cherry picked from commit a7c80bb70e0153568bc26c0dac044458d47dae0a)

15 years agoFix a scary "fill_share_mode_lock failed" message
Volker Lendecke [Thu, 26 Mar 2009 11:24:50 +0000 (12:24 +0100)]
Fix a scary "fill_share_mode_lock failed" message

To me "fill_share_mode_lock failed" is a "can't happen" alert. There is
however a perfectly valid case in get_file_infos() when the file is not open.

Change the corresponding debug message to level 10 and explain more.
(cherry picked from commit 66ea221009d9d72868a989c33d48177accc9d924)

15 years agos3-libnetapi: fix creds in libnetapi_open_ipc_connection().
Günther Deschner [Thu, 26 Mar 2009 09:26:59 +0000 (10:26 +0100)]
s3-libnetapi: fix creds in libnetapi_open_ipc_connection().

Jeremy, this broke with 8dd1faaa2992851f6852ba7ea4498445af5faadd. Not sure if
other users broke as well with that change.

Guenther
(cherry picked from commit 56d74b62126083dd7e2a60d1b48b03e1b1798c90)
(cherry picked from commit 97c30f557aab49f199df07f2a48ba94ad9cc81c5)

15 years agos3:rpc_parse: remove unused init_unistr().
Günther Deschner [Wed, 25 Mar 2009 22:23:06 +0000 (23:23 +0100)]
s3:rpc_parse: remove unused init_unistr().

Guenther
(cherry picked from commit fe340eb92fd2e5dfef977dc391d2a43ce970e0ea)
(cherry picked from commit 0e845cd6009c8a01eb3d53f558e9872ec4a3ab9f)

15 years agos3-net: Fix Bug #6102. NetQueryDisplayInformation could return wrong information.
Günther Deschner [Thu, 26 Mar 2009 09:11:59 +0000 (10:11 +0100)]
s3-net: Fix Bug #6102. NetQueryDisplayInformation could return wrong information.

Guenther
(cherry picked from commit 24d5229a81e1067662930d42f8c59b3a0adac1e0)
(cherry picked from commit 1de41bb8d6b9cbf287bad4152e38402201f966d3)

15 years agoAvahi disables a timer by tv=NULL in avahi_timeout_update(), do not crash
Volker Lendecke [Thu, 26 Mar 2009 09:03:59 +0000 (10:03 +0100)]
Avahi disables a timer by tv=NULL in avahi_timeout_update(), do not crash
(cherry picked from commit 45726ee52f766350023d85bc38cd803fdd8235a4)

15 years agoEnsure we never enter VFS_CREATE without having initialized
Jeremy Allison [Thu, 26 Mar 2009 04:47:13 +0000 (21:47 -0700)]
Ensure we never enter VFS_CREATE without having initialized
sbuf as invalid (if not already read via stat()). Still trying
to find the build farm RAW-STREAM errors and it's happening
in a openX call....
Jeremy.
(cherry picked from commit 940c84fcc75085ee4f1180d4d2a8e718142e4eb6)

15 years agos3-rpc_parse: remove unused smb_io_domsid().
Günther Deschner [Wed, 25 Mar 2009 22:09:52 +0000 (23:09 +0100)]
s3-rpc_parse: remove unused smb_io_domsid().

Guenther
(cherry picked from commit c86df62b4a51b2813104aece8b3813b1806aeb22)
(cherry picked from commit 62923f9be593d8c7cdcb79c56b9f2c0c36e5dbdd)

15 years agos3: remove unused rpc_parse/parse_sec.c file.
Günther Deschner [Wed, 25 Mar 2009 21:38:58 +0000 (22:38 +0100)]
s3: remove unused rpc_parse/parse_sec.c file.

Guenther
(cherry picked from commit 72636db8e5f06e887db6c34b6f88bef567c093dd)
(cherry picked from commit 8ab087da9038f7b80b4488727be49092a7e562cf)

15 years agos3-registry: remove last sec_io_desc() caller.
Günther Deschner [Wed, 25 Mar 2009 21:37:21 +0000 (22:37 +0100)]
s3-registry: remove last sec_io_desc() caller.

This is a temporary solution while waiting for the regf merge from s4.

Guenther
(cherry picked from commit 8000479d181347bd6f248309168721fe3a20ad2a)
(cherry picked from commit a0aea317fad27085377da9c3832f88a178579c3c)

15 years agos3-libnet: Fix Bug #6193: avoid messing with sync_context in libnet_samsync_delta().
Günther Deschner [Wed, 25 Mar 2009 14:58:20 +0000 (15:58 +0100)]
s3-libnet: Fix Bug #6193: avoid messing with sync_context in libnet_samsync_delta().

We absolutely need to avoid messing with the sync_context as that breaks the
stream of replication data coming from the DC (only replicates ~350 instead of
~4000 groups).

Guenther
(cherry picked from commit e3f7057b0942793543c215ab45176c4280bd7d51)
(cherry picked from commit 16cba3ec22ca424db0f98185e179c718794bc563)

15 years agos3-spoolss: implement enumprinters_level0.
Günther Deschner [Fri, 20 Mar 2009 15:02:48 +0000 (16:02 +0100)]
s3-spoolss: implement enumprinters_level0.

Guenther
(cherry picked from commit 283e135298767f128c413e0e6df75d21ec8e8e6b)
(cherry picked from commit 54d48c3749981621dd5286ae5c8227f28f5fdc35)

15 years agos3 onefs: Change error status to NT_ACCESS_DENIED for errors in SET_SECURITY_DESC
David Kwan [Fri, 20 Mar 2009 16:03:08 +0000 (16:03 +0000)]
s3 onefs: Change error status to NT_ACCESS_DENIED for errors in SET_SECURITY_DESC
(cherry picked from commit ad98eae02e623a8ca8aa6a1c46d5aedea50e2e4b)
(cherry picked from commit 7d5996e1d5eca454f651ca49a357d28077446309)

15 years agos3: parse_packet can return NULL which is then dereferenced in match_mailslot_name
Tim Prouty [Wed, 25 Mar 2009 00:05:16 +0000 (17:05 -0700)]
s3: parse_packet can return NULL which is then dereferenced in match_mailslot_name
(cherry picked from commit db5677d071fc58f38cab4ab800111455a8637edb)
(cherry picked from commit 0f01296bbb08d75ce693a65ea6cb0df80c1b4927)

15 years agoFix two memleaks in the encryption code
Volker Lendecke [Tue, 24 Mar 2009 20:57:01 +0000 (21:57 +0100)]
Fix two memleaks in the encryption code

ntlmssp_seal_packet creates its own signature data blob, which we then
have to free.

Jeremy, please check and merge appropriately (Yes, I'm asking you to do the
janitor work, I want you to *look* at this :-))

Volker
(cherry picked from commit 17616dddfaa26688387f671c870873056896f6b7)

15 years agoFix bug 6097
Volker Lendecke [Tue, 24 Mar 2009 10:07:16 +0000 (11:07 +0100)]
Fix bug 6097

A client sent a SID with authority 0 and 0 sub-authorities. W2k3 replies with
NT_STATUS_INVALID_SID, even if other SIDs in the list are valid.

Thanks to Pavel <wylda@volny.cz> for the bug report!
(cherry picked from commit e4f3d75432dbe372e164962a993b6e882fe44e83)

15 years agos3: add missing prototype for auth_wbc_init().
Günther Deschner [Tue, 24 Mar 2009 10:02:40 +0000 (11:02 +0100)]
s3: add missing prototype for auth_wbc_init().

Guenther
(cherry picked from commit c388efdbcb9ef1ecd5a81f7731ce56c7f79b2579)
(cherry picked from commit 87cf381dc3bd020dc043419f4ca18a3ff118458d)

15 years agos3:dsgetdcname: use parentheses in if condition to make negation clear
Björn Jacke [Mon, 23 Mar 2009 11:26:03 +0000 (12:26 +0100)]
s3:dsgetdcname: use parentheses in if condition to make negation clear

Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 87b428e424e2e3cca975ecd0efed327e72950a1d)
(cherry picked from commit a2e138419138a2f675f6370426a6caeda0a314b4)

15 years agoUse avahi to register _smb._tcp in smbd
Volker Lendecke [Sun, 22 Mar 2009 14:59:33 +0000 (15:59 +0100)]
Use avahi to register _smb._tcp in smbd
(cherry picked from commit 55b7bf7338c13701944169df02ab8e9def6d43a1)

15 years agoAdd tevent avahi binding
Volker Lendecke [Fri, 20 Mar 2009 13:55:05 +0000 (14:55 +0100)]
Add tevent avahi binding
(cherry picked from commit 49fc1138b5e4dcf66b84a14ba47cc1da40c764f2)

15 years agoAdd avahi detection to configure
Volker Lendecke [Fri, 20 Mar 2009 13:53:10 +0000 (14:53 +0100)]
Add avahi detection to configure
(cherry picked from commit b943e0083f6b0daa226f395158fcf7f467cdacd0)

15 years agoDisable dns_sd by default
Volker Lendecke [Fri, 20 Mar 2009 13:39:19 +0000 (14:39 +0100)]
Disable dns_sd by default
(cherry picked from commit 8cf21c9c7121049329f4d3e86d3021cdd2dec86a)

15 years agoѕ3/winbind_pam: fix gcc 4.4 compile warning
Björn Jacke [Mon, 23 Mar 2009 12:02:57 +0000 (13:02 +0100)]
ѕ3/winbind_pam: fix gcc 4.4 compile warning
(cherry picked from commit f4aec7b5907065a2f48d1b19065c6673aff6a190)
(cherry picked from commit 11b3f0d8deb629489de4de29cedf518adc86d196)

15 years agoFix connect to port 139 only -- thanks gd for bugging me :-)
Volker Lendecke [Mon, 23 Mar 2009 11:05:02 +0000 (12:05 +0100)]
Fix connect to port 139 only -- thanks gd for bugging me :-)
(cherry picked from commit 298bff5019be5a40dc0023b5af1e980fba91abd9)
(cherry picked from commit c96d0ffd944f536a1228812c761ba4fb4313ee05)

15 years agotalloc_array_length: talloc_get_size deals fine with NULL
Volker Lendecke [Sun, 22 Mar 2009 21:07:58 +0000 (22:07 +0100)]
talloc_array_length: talloc_get_size deals fine with NULL
(cherry picked from commit 89cb10430c30c9e59a5305210b7f09346b360c42)

15 years agoOnly build the dirsort module if we have the dirfd function
Volker Lendecke [Sun, 22 Mar 2009 12:14:15 +0000 (13:14 +0100)]
Only build the dirsort module if we have the dirfd function

Fix the build on HP/UX
(cherry picked from commit 4a4c69d26526294aa6e9b98d34d8495fc3fc65e8)

15 years agoDocument the dirsort module
Volker Lendecke [Sun, 22 Mar 2009 10:39:32 +0000 (11:39 +0100)]
Document the dirsort module
(cherry picked from commit 211a04568aa97d8c327a02eb28c80b952446d5df)

15 years agoUse StrCaseCmp in the dirsort module
Volker Lendecke [Sun, 22 Mar 2009 10:39:10 +0000 (11:39 +0100)]
Use StrCaseCmp in the dirsort module
(cherry picked from commit fcd02076d7562d2bc222dd15d2cd0a8fff58d5cf)

15 years agoAdd dirsort module
Andy Kelk [Sun, 22 Mar 2009 10:06:52 +0000 (11:06 +0100)]
Add dirsort module
(cherry picked from commit 2364bc8dcd46ca66e06e1dd8d4ed224611d65330)

15 years agos3-spoolss: _spoolss_EnumPrinters level 3 always returns WERR_UNKNOWN_LEVEL.
Günther Deschner [Fri, 20 Mar 2009 15:03:54 +0000 (16:03 +0100)]
s3-spoolss: _spoolss_EnumPrinters level 3 always returns WERR_UNKNOWN_LEVEL.

Guenther
(cherry picked from commit 19de802c171f70ec4de102452afac52e2c0e548f)
(cherry picked from commit 8630f2cbdfaaf8260615f16ba360b1281b666df5)

15 years agos3-spoolss: implement enumprinters_level4.
Günther Deschner [Fri, 20 Mar 2009 14:53:17 +0000 (15:53 +0100)]
s3-spoolss: implement enumprinters_level4.

Guenther
(cherry picked from commit d2de9b068c19a8eaac64f9cf4ea4aae153cffcd4)
(cherry picked from commit 53965d391c08cc3b935f5bd86d2d95bb6fe89262)

15 years agos3-spoolss: implement enumprinters_level5.
Günther Deschner [Fri, 20 Mar 2009 14:49:57 +0000 (15:49 +0100)]
s3-spoolss: implement enumprinters_level5.

Guenther
(cherry picked from commit aa6dbcfc11b74c1e80728bc295d9612ba4eb1e64)
(cherry picked from commit 48df86ca7f6d59b530597621862a619813a0568f)

15 years agos3-spoolss: use enum_all_printers_info_level for level 1 and 2.
Günther Deschner [Fri, 20 Mar 2009 14:48:10 +0000 (15:48 +0100)]
s3-spoolss: use enum_all_printers_info_level for level 1 and 2.

Guenther
(cherry picked from commit 6713244d465b0cf69f1bba15744e05795ec2fda9)
(cherry picked from commit ebf6d6d956a60c4f95baa4e148573bde933bdb2d)

15 years agos3-spoolss: add enum_all_printers_info_level().
Günther Deschner [Fri, 20 Mar 2009 14:44:31 +0000 (15:44 +0100)]
s3-spoolss: add enum_all_printers_info_level().

Guenther
(cherry picked from commit 95f2913c7de2ac69421911ec2cb0fcbb8c4e8e93)
(cherry picked from commit ce1b736da021858273a1daff0246e0740bc67620)

15 years agos3-spoolss: apply some const in spoolss server.
Günther Deschner [Fri, 20 Mar 2009 14:14:09 +0000 (15:14 +0100)]
s3-spoolss: apply some const in spoolss server.

Guenther
(cherry picked from commit 5a388115a944a425a774d7ec98260b7595998ee1)
(cherry picked from commit e0cdb435d38c643d5a75aa16e793c6f09a349978)

15 years agos3-rpcclient: allow to set flags in enumprinters command.
Günther Deschner [Fri, 20 Mar 2009 13:47:13 +0000 (14:47 +0100)]
s3-rpcclient: allow to set flags in enumprinters command.

Guenther
(cherry picked from commit c9a388348a2d4b276448b6a7bfc8c575b99f8eb7)
(cherry picked from commit f9eb007d64e155d561cd257d3d6e09b267299a0b)

15 years agos3-netapi: Fix Coverity #774 (REVERSE_INULL).
Günther Deschner [Fri, 20 Mar 2009 10:21:36 +0000 (11:21 +0100)]
s3-netapi: Fix Coverity #774 (REVERSE_INULL).

Guenther
(cherry picked from commit 3a6133d70202ef80ead4203740c000be5e93b288)
(cherry picked from commit 0ec1350d3d9272a6070950ba1d460523f53a628d)

15 years agos3-netapi: Fix Coverity #775 (REVERSE_INULL).
Günther Deschner [Fri, 20 Mar 2009 10:19:59 +0000 (11:19 +0100)]
s3-netapi: Fix Coverity #775 (REVERSE_INULL).

Guenther
(cherry picked from commit f2243e8197aa064adea3da2a4d1c08250668943f)
(cherry picked from commit 8a6f09cededf4167aea5f08e573bab51afcc0074)

15 years agos3-netapi: Fix Coverity #776 (REVERSE_INULL).
Günther Deschner [Fri, 20 Mar 2009 10:17:50 +0000 (11:17 +0100)]
s3-netapi: Fix Coverity #776 (REVERSE_INULL).

Guenther
(cherry picked from commit d2e348b191ada5492538b7bdae1bb7cd3f639aba)
(cherry picked from commit e858d192e1d7d6ab45ec247fbb776f5825e7fca5)

15 years agos3-krb5: Fix Coverity #762 (REVERSE_INULL).
Günther Deschner [Fri, 20 Mar 2009 10:11:04 +0000 (11:11 +0100)]
s3-krb5: Fix Coverity #762 (REVERSE_INULL).

Guenther
(cherry picked from commit 97190ae184dff6450b1390c854f7426e2ee3f980)
(cherry picked from commit 1a591aadb66d589171d236fc2f8bf2eb6d9ce499)

15 years agos3-net: Fix Coverity #861 (UNINIT).
Günther Deschner [Fri, 20 Mar 2009 10:07:21 +0000 (11:07 +0100)]
s3-net: Fix Coverity #861 (UNINIT).

Guenther
(cherry picked from commit 73030b107d5722a2c42cd18240d45bcb256335ac)
(cherry picked from commit 81a6aee736f805d1bf8d7d2a1ff19851cd11d763)

15 years agos3-net: Fix Coverity #898 (UNINIT).
Günther Deschner [Fri, 20 Mar 2009 10:04:59 +0000 (11:04 +0100)]
s3-net: Fix Coverity #898 (UNINIT).

Guenther
(cherry picked from commit d2fb6d348248cdca7e55360c77aa31b91250f885)
(cherry picked from commit 874caf9a1fb45f36ec8c506d29264735d1647dae)

15 years agos3-spoolss: pure comsetics.
Günther Deschner [Thu, 19 Mar 2009 11:53:01 +0000 (12:53 +0100)]
s3-spoolss: pure comsetics.

sorry, I just need to do that.

Guenther
(cherry picked from commit 045151b767c62ac1343e86cb3886107226e73fda)
(cherry picked from commit 59811de7a80d5ecdf090c116087c7a03ae288887)

15 years agos3-krb5: Fix Coverity #722 (RESOURCE_LEAK).
Günther Deschner [Thu, 19 Mar 2009 15:42:54 +0000 (16:42 +0100)]
s3-krb5: Fix Coverity #722 (RESOURCE_LEAK).

Guenther
(cherry picked from commit 1524abd8bf12d82e1fb0063585fc9a465fc7bf9c)
(cherry picked from commit 42a692da477d7986767ad90a15087aa8a2ebcb40)

15 years agos3-net: Fix Coverity #886 (FORWARD_NULL).
Günther Deschner [Thu, 19 Mar 2009 15:18:29 +0000 (16:18 +0100)]
s3-net: Fix Coverity #886 (FORWARD_NULL).

Guenther
(cherry picked from commit 2c186be0df33664eea980c17720be41f25f91288)
(cherry picked from commit 990917cbe3f8cd00e2d13dd67ee752fffae94401)

15 years agos3-samr: try to to fix password_expired flag handling.
Günther Deschner [Thu, 27 Nov 2008 16:49:25 +0000 (17:49 +0100)]
s3-samr: try to to fix password_expired flag handling.

Guenther
(cherry picked from commit 842edcd2b08763a35dbdea3518fcc039aa70aad4)
(cherry picked from commit 98dd60a0e85d37945deaa997d87f5cb173eaaea9)

15 years agoFix crash in async_smb.c
Bo Yang [Wed, 4 Mar 2009 10:10:20 +0000 (18:10 +0800)]
Fix crash in async_smb.c
(cherry picked from commit b20cace3a7c312f44f39390954bc087b888d9b27)

15 years agoadd a versiontest program to print samba_version_string().
Michael Adam [Thu, 19 Mar 2009 22:56:12 +0000 (23:56 +0100)]
add a versiontest program to print samba_version_string().

This is to allow for testing samba_version_string() without
the need to compile any of the larger binaries like smbd or net...

Michael
(cherry picked from commit a75c184cafbb80adb0a3b056e55608d2d263a0c6)

15 years agoversion: fix handling of SAMBA_VERSION_VENDOR_PATCH.
Michael Adam [Thu, 19 Mar 2009 22:55:21 +0000 (23:55 +0100)]
version: fix handling of SAMBA_VERSION_VENDOR_PATCH.

We need a string version of this, or else version.c does not compile.

Michael
(cherry picked from commit 21bf5cac5f352f51432ad717b2e5051a3a63cac9)

15 years agos3: Fix a free of an uninitialized variable in winbind_get_sid_aliases
Dan Sledz [Thu, 19 Mar 2009 21:53:34 +0000 (21:53 +0000)]
s3: Fix a free of an uninitialized variable in winbind_get_sid_aliases
(cherry picked from commit c50490e4af2f4270cf8b59f868b45630efb55efd)

15 years agofix build on old Heimdal based systems
Björn Jacke [Mon, 16 Mar 2009 00:51:09 +0000 (01:51 +0100)]
fix build on old Heimdal based systems

Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 011ad7245d53a716c4c766f5ef8d317bb3a53d0f)
(cherry picked from commit 3b74ba990e5b96e17ef76845551ab03fdddc59f8)

15 years agos3:libsmb: always create bytes array in cli_trans code
Stefan Metzmacher [Wed, 18 Mar 2009 07:46:38 +0000 (08:46 +0100)]
s3:libsmb: always create bytes array in cli_trans code

Otherwise we return NO_MEMORY without a reason for fragmented trans
requests, as talloc_append_blob() returns buf if we append a 0 length
blob. When we pass buf = NULL we'll get back NULL and then assume
NO_MEMORY...

metze
(cherry picked from commit 88dd6af605dc5754b7e146a068272d37651da710)
(cherry picked from commit 5bbf96dd63227a19fe1f95ff8d8f2b3c75a5a497)

15 years agos3:libsmb: fix smb signing for fragmented trans/trans2/nttrans requests
Stefan Metzmacher [Wed, 18 Mar 2009 06:56:51 +0000 (07:56 +0100)]
s3:libsmb: fix smb signing for fragmented trans/trans2/nttrans requests

Before we send the secondary requests we need to remove the
old mid=>seqnum mapping and reset cli->mid and make the new
mid=>seqnum mapping "persistent".

The bug we had in cli_send_trans was this:
The first cli_send_smb() incremented cli->mid
and the secondary requests used the incremented mid,
but as cli->outbuf still had the correct mid,
we send the correct mid to the server. The real problem
was that the cli_send_smb() function stored the seqnum
under the wrong mid.

cli_send_nttrans() was totally broken and now follows the
same logic as cli_send_trans().

The good thing is that in practice the problem is unlikely to happen,
because max_xmit is large enough to avoid secondary requests.

metze
(cherry picked from commit 880fbc4e8cd67de73c4bcda94489eb1e1422a04b)
(cherry picked from commit 70466990b4b7c68ae95dbbcf741cd3f41f2dd0b3)

15 years agos3:lib/util_sock: use sys_recv() instead of sys_read() on sockets
Stefan Metzmacher [Thu, 19 Mar 2009 08:06:38 +0000 (09:06 +0100)]
s3:lib/util_sock: use sys_recv() instead of sys_read() on sockets

This ways the pcap support in socket wrapper sees the received data.

metze
(cherry picked from commit 0dfdb7b911ed4fe013fc4a22a8c3a28620277a67)
(cherry picked from commit 6ec3d902e16edd6d911b6883f565ddf1938b47bf)