samba.git
13 years agoWHATSNEW: Update release date. samba-3.5.5
Karolin Seeger [Thu, 9 Sep 2010 14:22:50 +0000 (16:22 +0200)]
WHATSNEW: Update release date.

Karolin

13 years agoWHATSNEW: Prepare 3.5.5 release notes.
Karolin Seeger [Thu, 9 Sep 2010 13:57:36 +0000 (15:57 +0200)]
WHATSNEW: Prepare 3.5.5 release notes.

Karolin

13 years agoFix bug #7669.
Jeremy Allison [Thu, 9 Sep 2010 13:54:23 +0000 (15:54 +0200)]
Fix bug #7669.

Fix bug #7669 (buffer overflow in sid_parse() in Samba3 and dom_sid_parse in
Samba4).

CVE-2010-3069:

===========
Description
===========

All current released versions of Samba are vulnerable to
a buffer overrun vulnerability. The sid_parse() function
(and related dom_sid_parse() function in the source4 code)
do not correctly check their input lengths when reading a
binary representation of a Windows SID (Security ID). This
allows a malicious client to send a sid that can overflow
the stack variable that is being used to store the SID in the
Samba smbd server.

A connection to a file share is needed to exploit this
vulnerability, either authenticated or unauthenticated
(guest connection).

13 years agoWHATSNEW: Start release notes for 3.5.5.
Karolin Seeger [Thu, 24 Jun 2010 06:15:24 +0000 (08:15 +0200)]
WHATSNEW: Start release notes for 3.5.5.

Karolin
(cherry picked from commit 28f6e4144b092bd21f49ca989d36df19ce002231)

13 years agoVERSION: Bump version number up to 3.5.5.
Karolin Seeger [Thu, 24 Jun 2010 06:13:33 +0000 (08:13 +0200)]
VERSION: Bump version number up to 3.5.5.

Karolin
(cherry picked from commit 6e2b68fef3e0851e1564921d1c4285c8d4a9b550)

13 years agos3-docs: Add missing whitespace. samba-3.5.4
Karolin Seeger [Mon, 21 Jun 2010 08:30:25 +0000 (10:30 +0200)]
s3-docs: Add missing whitespace.

Karolin
(cherry picked from commit 2352538362977e456e8d05783f2732ff650cea41)
(cherry picked from commit 9d9a9a0f79ad6fa894f72a4678f59fb40c9fce94)

13 years agoWHATSNEW: Update changes since 3.5.3.
Karolin Seeger [Fri, 18 Jun 2010 11:59:30 +0000 (13:59 +0200)]
WHATSNEW: Update changes since 3.5.3.

Karolin
(cherry picked from commit 656160ef0643aeba28c7db499ddb1e840c78e4bb)

13 years agos3-docs: Fix some of ntlm_auth ntlm-server-1 protocol documentation.
Günther Deschner [Wed, 16 Jun 2010 15:08:36 +0000 (17:08 +0200)]
s3-docs: Fix some of ntlm_auth ntlm-server-1 protocol documentation.

Guenther
(cherry picked from commit cfb67b1a169350a8316532eb5d53de4a3f2bacb3)
(cherry picked from commit b3ccbcb83650cea627ad97e920d3f73659ffa6a0)

13 years agos3:configure: use cc for linking on IRIX and fix shlib usage
Björn Jacke [Wed, 16 Jun 2010 21:36:38 +0000 (23:36 +0200)]
s3:configure: use cc for linking on IRIX and fix shlib usage

The last two patches address bug #7504 (numerous build glitches to be fixed).
(cherry picked from commit fe9dde3a629db9ae98ff6d94be145aa7e7c2d9ce)

13 years agos3:vfs_scannedonly: fix a build issue on IRIX and HP-UX
Björn Jacke [Wed, 3 Feb 2010 22:28:38 +0000 (23:28 +0100)]
s3:vfs_scannedonly: fix a build issue on IRIX and HP-UX

this is a cherry-pick of ae95e8028c294ee1e2dc66a7a62d006572142629
(cherry picked from commit 4a7f1c92f7a1471f5edf06736835a5dc979af3f7)

13 years agocheck if LD_AS_NEEDED breaks linking with libreadline fixes #7209
Olaf Flebbe [Tue, 25 May 2010 11:22:56 +0000 (13:22 +0200)]
check if LD_AS_NEEDED breaks linking with libreadline fixes #7209

Signed-off-by: Simo Sorce <idra@samba.org>
(cherry picked from commit 7aa8af144efc6d57f33b90ac856096aa7089468d)
(cherry picked from commit f2330cc029243c70043b18554241363d890c96e7)

13 years agos3-auth: in make_user_info_for_reply_enc make sure to check length and data pointer...
Günther Deschner [Wed, 16 Jun 2010 12:18:45 +0000 (14:18 +0200)]
s3-auth: in make_user_info_for_reply_enc make sure to check length and data pointer of nt and lm hash.

This fixes kernel cifs client with sec=ntlmv2.

Guenther
(cherry picked from commit b4364add896d1657263a66c55d867d28bf5ceb1b)

Fix bug #7517 (session setup from linux kernel cifs client fails with
sec=ntlmv2).
(cherry picked from commit a95df865d474b0ba59ad95dcb8c20c923c66f4ba)

13 years agos3-spoolss: fix some crash bugs and missing error codes in AddDriver paths.
Günther Deschner [Fri, 23 Apr 2010 00:34:43 +0000 (02:34 +0200)]
s3-spoolss: fix some crash bugs and missing error codes in AddDriver paths.

Found by torture test.

Guenther
(cherry picked from commit 413ffe9adb8eea488133da0249dcb2eca08fd69d)

Addresses bug #7459 (after upgrade to samba 3.4 and 3.5 lose ability to control duplex
for normal domain user).
(cherry picked from commit 286f4b53993fab0ffc53e5619e2987dfb13b0ec2)

13 years agos3:Makefile: fix a typo in flag variable name
Björn Jacke [Wed, 16 Jun 2010 11:48:53 +0000 (13:48 +0200)]
s3:Makefile: fix a typo in flag variable name

This is the backport of 60cba59ff8ee75e3d476c1b293ca2f545b7f9e49 and fixes
another build error on AIX.

see also bug #7504 (numerous build glitches to be fixed)
(cherry picked from commit be585bb0cd81f5ddd3345f04990eaddfa1e13eda)

13 years agos3:build: remove CFLAGS from Solaris LDSHFLAGS, SHLD has them already
Björn Jacke [Wed, 12 May 2010 17:05:37 +0000 (19:05 +0200)]
s3:build: remove CFLAGS from Solaris LDSHFLAGS, SHLD has them already

The last 9 patches address bug #7504 (numerous build glitches to be fixed).
(cherry picked from commit 6c78aca691a9951a5a5c27e538df8c8376a74db1)

13 years agos3: final test for working shlib support requires PICFLAG
Björn Jacke [Sun, 30 May 2010 22:26:01 +0000 (00:26 +0200)]
s3: final test for working shlib support requires PICFLAG
(cherry picked from commit 85cbb1a6b371e2282f0115e87e803c6fdc03c07c)

13 years agos3: use autoconf macro to get some debug output in config.log
Björn Jacke [Sun, 30 May 2010 21:50:48 +0000 (23:50 +0200)]
s3: use autoconf macro to get some debug output in config.log
(cherry picked from commit 87a0f216eb6929e48b1c3c234426d29fdab38dc8)

13 years agos3: fix check for pie compiler flags
Björn Jacke [Fri, 28 May 2010 23:40:21 +0000 (01:40 +0200)]
s3: fix check for pie compiler flags

some compilers (HP and Sun e.g.) output warning messages on stderr for unknown
options and we ended up partly using some unwanted random compile flags we
did't intend to use.
(cherry picked from commit e8468ab02b201885b6a211c4b27913014ee9a5a2)

13 years agos3: add m4 macro to check if stderr is empty or not
Björn Jacke [Fri, 28 May 2010 23:39:16 +0000 (01:39 +0200)]
s3: add m4 macro to check if stderr is empty or not
(cherry picked from commit 6f2bf6cf9d2b5ed3ca2992e26f442035764e0762)

13 years agos3:configure: add Werror_FLAGS for IBM's xlc
Björn Jacke [Mon, 24 May 2010 21:28:44 +0000 (23:28 +0200)]
s3:configure: add Werror_FLAGS for IBM's xlc
(cherry picked from commit 8c4cdf30ae254b4c5ff9eff221529abc98855857)

13 years agos3:Makefile: add missing linker flags for smbfilter
Björn Jacke [Wed, 26 May 2010 15:22:24 +0000 (17:22 +0200)]
s3:Makefile: add missing linker flags for smbfilter

this should fix the AIX build
(cherry picked from commit 634577b29d8eea085c79e35d34d6e242a0a9f5a2)

13 years agos3:Makefile: position independency is also needed for shared libs
Björn Jacke [Mon, 24 May 2010 10:21:40 +0000 (12:21 +0200)]
s3:Makefile: position independency is also needed for shared libs
(cherry picked from commit 6a9aa4c2b3bebe06de97524a5c5ca577aaa3d14c)

13 years agos3:build: don't use pieflags twice - ldflags already have them
Björn Jacke [Sat, 22 May 2010 14:48:16 +0000 (16:48 +0200)]
s3:build: don't use pieflags twice - ldflags already have them
(cherry picked from commit 60ad93f074d83a65df080b85e43ea61722340a1c)

13 years agos3:configure: turn "error warnings" into errors
Björn Jacke [Mon, 24 May 2010 21:34:00 +0000 (23:34 +0200)]
s3:configure: turn "error warnings" into errors

By default "Missing argument(s)" is just an "error warning" for xlc :-)
The change to turn "error warnings" into errors should fix bug #7427.
(cherry picked from commit ff0872d59d78ad42212c88313ef924ea4eb7a8a1)

Fix bug #7427 (Using IBM xl_C compiler produces wrong results in configure).
(cherry picked from commit 08c1c5f87e249a6f42dc5d78d8429689e1ec7274)

13 years agos3: fix calculation of st_blocks in streams_xattr
Björn Jacke [Wed, 9 Jun 2010 13:24:26 +0000 (15:24 +0200)]
s3: fix calculation of st_blocks in streams_xattr

Thanks to Joachim Schmitz for finding that miscalculation.
(cherry picked from commit 6a6bb768c6542d738a8b2b6da282159a65ed611d)

Fix bug #7503 (vfs_stream_xattr calculates st_blocks wrong).
(cherry picked from commit 3f8a03cfdaa29e54b50738df4e7b782228e2d931)

13 years agos3: Fix EnumDomainAliases when no aliases are in LDAP
Volker Lendecke [Thu, 10 Jun 2010 13:40:14 +0000 (15:40 +0200)]
s3: Fix EnumDomainAliases when no aliases are in LDAP

We used to return NT_STATUS_ACCESS_DENIED, now we just return 0 entries, just
like W2k8 does.

usrmgr.exe was pretty unhappy with the NT_STATUS_ACCESS_DENIED
(cherry picked from commit f66cc827096c53d4d16b8c850c83a3b5664e9725)

Fix bug #7262 (Unable to maintain users' groups via UsrMgr).
(cherry picked from commit 1439a1d7ff406dd5dce885100349751151c14bf6)

13 years agos3:pdb_ldap: fix bug 7507 - init_sam_from_ldap stores group in sid2uid cache
Michael Adam [Thu, 10 Jun 2010 09:56:15 +0000 (11:56 +0200)]
s3:pdb_ldap: fix bug 7507 - init_sam_from_ldap stores group in sid2uid cache
(cherry picked from commit ba809ecb8ab217e4376bf75d2300e146b62b88eb)
(cherry picked from commit cc740fb5eb56a0875703753d4a116d2fe33ec186)

13 years agos3: Fix bug 7253
Volker Lendecke [Tue, 16 Mar 2010 20:03:34 +0000 (21:03 +0100)]
s3: Fix bug 7253

acct_ctrl is 32 bit in LOGIN_CACHE, but "w" as a format specifier for
tdb_unpack only writes 16 bits. Okay on x86, not okay on Solaris.

Thanks to Vladimir.Marek@Sun.COM!

Volker
(cherry picked from commit 556b6f83d66d7268651ac7ba153fa47ff6a5e776)

13 years agos3-netdomjoin-gui: Fix Bug #7500. Fix 'not a string literal' warning in netdomjoin...
Günther Deschner [Tue, 8 Jun 2010 09:25:00 +0000 (11:25 +0200)]
s3-netdomjoin-gui: Fix Bug #7500. Fix 'not a string literal' warning in netdomjoin-gui.

Patch from Buchan Milne <bgmilne@mandriva.org>.

Thanks!

Guenther
(cherry picked from commit 575b1018c65312e9eab562cf4851524cf2f8f24a)
(cherry picked from commit 1419c154d67b8ffaf0d6e2e3ba103121ab3736f5)

13 years agos3: Allow previous password to be stored and use it to check tickets
Matthieu Patou [Fri, 21 May 2010 07:57:29 +0000 (11:57 +0400)]
s3: Allow previous password to be stored and use it to check tickets

This patch is to fix bug 7099. It stores the current password in the
 previous password key when the password is changed. It also check the
 user ticket against previous password.

Signed-off-by: Günther Deschner <gd@samba.org>
Fix bug #7099 (Every Thursday at 11:08-11:15am Windows Client
Connections break with Kerberos errors).
(cherry picked from commit 89eea1fa9154c67ae4d3e729a8db7ad17ec9b9d7)

13 years agos3-samr: Fix crash bug in _samr_QueryUserInfo{2} level 18.
Günther Deschner [Fri, 28 May 2010 12:11:53 +0000 (14:11 +0200)]
s3-samr: Fix crash bug in _samr_QueryUserInfo{2} level 18.

Guenther

Fix bug #7479 (Crash bug in _samr_QueryUserInfo{2} level 18.)
(cherry picked from commit 386a4621b8c9e8f7956320a44679789b731d7b10)

13 years agos3-selftest: enable RPC-WINREG against s3.
Günther Deschner [Tue, 25 May 2010 12:13:20 +0000 (14:13 +0200)]
s3-selftest: enable RPC-WINREG against s3.

Guenther

The last 4 patches address bug #7453 (winreg: QueryValue crashes on NULL pointer
dereference).
(cherry picked from commit 73d413524e62796fdcfa4ac06a6499ecd6b9978f)

13 years agos3-winreg_nt: Fixed QueryValue with data=NULL to get the length. (cherry picked from...
Andreas Schneider [Fri, 16 Apr 2010 09:04:27 +0000 (11:04 +0200)]
s3-winreg_nt: Fixed QueryValue with data=NULL to get the length. (cherry picked from commit 4567bf9df53e62c0f30279235d56d13cb38de190)
(cherry picked from commit b541fb1500aad87aee46ef48036f3b4a05b119cd)

13 years agos3-winreg: change notify call has no meaning when called remotely.
Günther Deschner [Tue, 16 Mar 2010 14:29:14 +0000 (15:29 +0100)]
s3-winreg: change notify call has no meaning when called remotely.

Just return not supported to make smbtorture happy.

Guenther
(cherry picked from commit e46d3d9475c59af8ba6810aeb1403c1aa9e37d9d)
(cherry picked from commit 5d9f173d28fab6ea1afc36978c88f881bb7da52e)

13 years agos3-winreg: make QueryValue pass RPC-WINREG test again.
Günther Deschner [Thu, 11 Mar 2010 19:48:24 +0000 (20:48 +0100)]
s3-winreg: make QueryValue pass RPC-WINREG test again.

Guenther
(cherry picked from commit 24a7f8f2dbae73e862b9b3d4c6f0692054c354b3)
(cherry picked from commit 4f527cf96a2c208c32f97073b6453386b4a1825c)

13 years agoFix bug #7448 - smbd crash when sambaLMPassword and sambaNTPassword entries missing...
Roel van Meer [Fri, 21 May 2010 21:17:17 +0000 (14:17 -0700)]
Fix bug #7448 - smbd crash when sambaLMPassword and sambaNTPassword entries missing from ldap.

Protect SMBsesskeygen_ntv1() from a NULL pointer.
(cherry picked from commit 4c5a1b6b17b5575ea943eaf0472453222579365a)

13 years agos3-selftest: deal with changed samba3 test names.
Günther Deschner [Tue, 25 May 2010 11:09:46 +0000 (13:09 +0200)]
s3-selftest: deal with changed samba3 test names.

Guenther
(cherry picked from commit 144b973cc4d0afa4df6ada9243922206437b5fa1)

13 years agoFix what looks like a cut-and-paste error in our read_negTokenInit() function.
Jeremy Allison [Thu, 20 May 2010 21:30:44 +0000 (14:30 -0700)]
Fix what looks like a cut-and-paste error in our read_negTokenInit() function.

We should never be calling asn1_push_XXX functions inside an asn1
reading function. Change asn1_push_tag() -> asn1_start_tag() and
asn1_pop_tag() -> asn1_end_tag(). This allows us to connect to a
NetApp filer at the Microsoft plugfest.

Andrew PLEASE CHECK !

Jeremy.

Fix bug #7449 (spnego data mis-parsed - returns incorrect mechListMIC string).
(cherry picked from commit 70098b751c10e632738f687976e6ef5e5fb2fc7b)

13 years agoFix bug #7410 - samba sends "raw" inode number as uniqueid with unix extensions.
Jeremy Allison [Thu, 20 May 2010 18:36:47 +0000 (11:36 -0700)]
Fix bug #7410 - samba sends "raw" inode number as uniqueid with unix extensions.

Move to a consistent get_FileIndex() function for all inode returns,
that checks if st_dev on the file is identical to the top directory
dev_t of the exported share, and if so uses the raw 64-bit inode
number. If it isn't (we've traversed a mount point) - return what
we used to do for Windows which is the concatination of the bottom
32-bits of the inode with the 32-bit device number. We can get more
creative with this over time (hashing?) if we want as now all inode returns go
through this single function.

Jeremy.
(cherry picked from commit 920ffe49290cacd30d9bc582c1c3fee38308c260)

13 years agos3: Fix a typo found by ITPFS oota <t-oota@dh.jp.nec.com>
Volker Lendecke [Mon, 24 May 2010 09:23:42 +0000 (11:23 +0200)]
s3: Fix a typo found by ITPFS oota <t-oota@dh.jp.nec.com>

Thanks!
(cherry picked from commit d12768cc0ae52d95ffd83070948c83af4ce8704b)
(cherry picked from commit 167c082c1eb18f8360d094c96cbcef4ce48d935b)

13 years agoFix bug #7188 - Logic error in check of total_data for call_trans2mkdir()
Jeremy Allison [Mon, 15 Mar 2010 22:04:18 +0000 (15:04 -0700)]
Fix bug #7188 - Logic error in check of total_data for call_trans2mkdir()

Make ea data checks identical for trans2open and trans2mkdir.

Jeremy.
(cherry picked from commit 704a607e3c3a5c3e727b386fab9dbcdff56b5ac4)
(cherry picked from commit 0c20af069105befe8cf530050b5f948cde5391fe)

13 years agos3-kerberos: temporary fix for ipv6 in print_kdc_line().
Günther Deschner [Fri, 14 May 2010 22:34:35 +0000 (00:34 +0200)]
s3-kerberos: temporary fix for ipv6 in print_kdc_line().

Currently no krb5 lib supports "kdc = ipv6 address" at all, so for now just fill
in just the kdc_name if we have it and let the krb5 lib figure out the
appropriate ipv6 address

ipv6 gurus, please check.

Guenther
(cherry picked from commit dd5a4e23f8c24564d3fd21bb8d01172321087362)

The last 3 patches fix bug #7341 (winbind not working over IPv6).
(cherry picked from commit 5ab33bec40739c7c86b17536fd6cdc04fc0f91b2)

13 years agos3-kerberos: pass down kdc_name to create_local_private_krb5_conf_for_domain().
Günther Deschner [Fri, 14 May 2010 21:23:34 +0000 (23:23 +0200)]
s3-kerberos: pass down kdc_name to create_local_private_krb5_conf_for_domain().

Guenther
(cherry picked from commit e3bdff3d67b46277ee59685218bd90f3788b487d)
(cherry picked from commit 2ce299f16cb2ff292755186894284d6efb296d08)

13 years agos3-winbind: make the getpeername() checks in cm_prepare_connection IPv6 aware.
Günther Deschner [Fri, 14 May 2010 21:21:47 +0000 (23:21 +0200)]
s3-winbind: make the getpeername() checks in cm_prepare_connection IPv6 aware.

Note that this failure was hard to track, as winbind did only log a super helpful
"cm_prepare_connection: Success" debug message.

IPv6 gurus, please check

Successfully tested in two independent IPv6 networks now.

Guenther
(cherry picked from commit 14ac2bb36ee22be6133ca1d069dc5de6c1891f47)
(cherry picked from commit 72d635514d9c00a09b00ed0d9928cab6a3a2f6f7)

13 years agos3-spoolss: Added EN ISO 216, A0 and A1 to builtin forms.
Andreas Schneider [Wed, 12 May 2010 16:36:30 +0000 (18:36 +0200)]
s3-spoolss: Added EN ISO 216, A0 and A1 to builtin forms.

Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>
(cherry picked from commit 0953087f82ddbd580e9807e0e8d780e78686c03c)

Fix bug #7423 (Large Formats at printing not available).
(cherry picked from commit 73bec197a91a15aa9a69c9a3868ed51bdd3674ea)

14 years agoWHATSNEW: Prepare Samba 3.5.4 release notes.
Karolin Seeger [Wed, 19 May 2010 09:52:06 +0000 (11:52 +0200)]
WHATSNEW: Prepare Samba 3.5.4 release notes.

Karolin
(cherry picked from commit 61aacde86c09d6757165d4f8bf737ee1626e4631)

14 years agoVERSION: Bump version number up to 3.5.4.
Karolin Seeger [Wed, 19 May 2010 09:49:08 +0000 (11:49 +0200)]
VERSION: Bump version number up to 3.5.4.

Karolin
(cherry picked from commit b75441b74920724a359d635d0393841db8535c95)

14 years agoWHATSNEW: Add major enhancements in 3.5.3. samba-3.5.3
Karolin Seeger [Mon, 17 May 2010 11:49:42 +0000 (13:49 +0200)]
WHATSNEW: Add major enhancements in 3.5.3.

Karolin
(cherry picked from commit 813cfd7cb1f069ea622724e01d4b75b18bfcf482)

14 years agoWHATSNEW: Update changes since 3.5.2.
Karolin Seeger [Mon, 17 May 2010 08:21:08 +0000 (10:21 +0200)]
WHATSNEW: Update changes since 3.5.2.

Karolin
(cherry picked from commit ffd5a0f90fd43d1e3a995e60acade1a07d8ef1c8)

14 years agomount.cifs: check for NULL addr pointer before handling scopeid
Jeff Layton [Wed, 12 May 2010 11:05:10 +0000 (07:05 -0400)]
mount.cifs: check for NULL addr pointer before handling scopeid

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Fix bug #7315 (mount.cifs segfaults after upgrade to 2.6.33).
(cherry picked from commit 78a6eb582d28d92db5ffab6ded40785be54cf540)

14 years agos3-docs: Unify capitalization.
Karolin Seeger [Wed, 12 May 2010 14:21:56 +0000 (16:21 +0200)]
s3-docs: Unify capitalization.

Karolin
(cherry picked from commit da64913f55fa2c3d0b34cda3b8c4953894c4ed66)
(cherry picked from commit f4d87160444eaa4f5a0239ad58159f13e03a851e)

14 years agos3-docs: Add documentation of the net g_lock subcommand.
Karolin Seeger [Wed, 12 May 2010 14:17:33 +0000 (16:17 +0200)]
s3-docs: Add documentation of the net g_lock subcommand.

Karolin
(cherry picked from commit ad6f63822915463011074c9e5f3ed938b48579f4)
(cherry picked from commit 4b55c32a614f47849f8e6e12eccdd06fbbea5e96)

14 years agos3-docs: Move -D option to the right paragraph in man winbindd.
Karolin Seeger [Wed, 12 May 2010 09:24:57 +0000 (11:24 +0200)]
s3-docs: Move -D option to the right paragraph in man winbindd.

Fix bug #7260 (Command line option documentation in wrong place in winbindd man
page.). Thanks to Ged Haywood <samba@jubileegroup.co.uk> for reporting!

Karolin
(cherry picked from commit da5c49d727150eea7d2a4b83da1a02ac1f26e77c)
(cherry picked from commit b737434fbf60c250166f10cf196af8030b388bdb)

14 years agowork around AIX6.1 name space pollution rename mod_name to module_name
Olaf Flebbe [Tue, 11 May 2010 09:30:04 +0000 (11:30 +0200)]
work around AIX6.1 name space pollution rename mod_name to module_name

Fix bug #7421 (samba 3.4.7 does not compile on AIX 6.1).
(cherry picked from commit 9649538f81aec325be47b704a5a056b5ae16be22)

14 years agolib/replace: make sure IPV6_V6ONLY is available for IPv6 support
Stefan Metzmacher [Sat, 24 Apr 2010 11:07:50 +0000 (13:07 +0200)]
lib/replace: make sure IPV6_V6ONLY is available for IPv6 support

We rely on IPV6_V6ONLY being supported. See bug #7196.

metze
(cherry picked from commit 41cd6f992829c45c890f5daf78eb3019633f3620)

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

14 years agolib/replace: add replacement for IPV6_V6ONLY on linux systems with broken headers
Stefan Metzmacher [Sat, 24 Apr 2010 17:02:22 +0000 (19:02 +0200)]
lib/replace: add replacement for IPV6_V6ONLY on linux systems with broken headers

This is needed on SLES8. See bug 7196.

metze
(cherry picked from commit e06cf3950252a46486aa046a4552ed6ebff175b3)

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

14 years agotsocket_bsd: Always use a real length for the sa_socklen, and keep it around
Andrew Bartlett [Wed, 7 Apr 2010 00:42:37 +0000 (10:42 +1000)]
tsocket_bsd: Always use a real length for the sa_socklen, and keep it around

The previous code assumed the OS would happily accept sizeof(struct
sockaddr_storage).  It seems some versions of Solaris do not like
this.

Andrew Bartlett
(cherry picked from commit f1aa4c34bf0bd7d42627024af333963b741babea)

Fix for bug #7354.

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

14 years agotsocket: only copy the specific part of sockaddr*
Stefan Metzmacher [Wed, 23 Dec 2009 18:34:32 +0000 (19:34 +0100)]
tsocket: only copy the specific part of sockaddr*

This makes sure we fill the unspefic bytes with 0
and have zero termination for sockaddr_un.

metze
(cherry picked from commit 17c804a67593cdb4d8646b5be6b50fddf56b3e27)

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

14 years agotsocket: allow AF_UNIX sockaddrs smaller than sizeof(sockaddr_un)
Stefan Metzmacher [Wed, 23 Dec 2009 18:31:41 +0000 (19:31 +0100)]
tsocket: allow AF_UNIX sockaddrs smaller than sizeof(sockaddr_un)

This is needed as getpeername() truncates the length to 2 if the
peer socket has no name.

metze
(cherry picked from commit 4784c8c3bea98592486ca973d57c99671eb68cb2)

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

14 years agos3:configure: use correct SONAMEFLAG on Solaris depending on which linker is being...
Björn Jacke [Fri, 7 May 2010 09:56:38 +0000 (11:56 +0200)]
s3:configure: use correct SONAMEFLAG on Solaris depending on which linker is being used
(cherry picked from commit 358a3855c20153d7fe742ca2e6b9bd8a9c92e525)

Fix bug #7385 (Can't compile. Undefined symbol 'main').
(cherry picked from commit 47e2bd2e29dca9cb5b503ae07f8935e70c687c71)

14 years agos3:configure: not simply check for "ld" but for the linker used by $CC
Björn Jacke [Wed, 5 May 2010 18:17:39 +0000 (20:17 +0200)]
s3:configure: not simply check for "ld" but for the linker used by $CC

this hopefully fixes Solaris' gcc build which uses the system ld by default.
All in all we should clean up most of the compiler and linker flags depending
on the actual compilers and linkers we use. Only some tweaks are OS-specific.
A cleanup in this area should be done along with the move to a new build
system (whensoever that will be ...).
(cherry picked from commit 1969b4acc3fd7c124e288d0495b9b4665d4b42db)

Fix bug #7385 (Can't compile. Undefined symbol 'main').
(cherry picked from commit eff42fa66e561069959c401492c3b82a09b4742b)

14 years agos3-net: Fix Bug #7417. 'net rpc user password' can set the wrong password.
Günther Deschner [Sat, 8 May 2010 00:16:37 +0000 (02:16 +0200)]
s3-net: Fix Bug #7417. 'net rpc user password' can set the wrong password.

Guenther
(cherry picked from commit 7887d99a60387e93ce5ce4a3bfe9117939d1e4c8)
(cherry picked from commit b4b36e1a486296d049c96ea66e201d9c01e7165d)

14 years agos3-spoolss: Fix _spoolss_EnumPrinters servername handling.
Günther Deschner [Thu, 18 Feb 2010 11:40:00 +0000 (12:40 +0100)]
s3-spoolss: Fix _spoolss_EnumPrinters servername handling.

Guenther
(cherry picked from commit b3c2b2260a503079b9abf22f6b35b56c61c2b372)

The last two patches address bug #7418 ("net rpc printer list" command is
inoperative).
(cherry picked from commit df5f448fe371a1227a507cedc2642fa1a4b77e65)

14 years agos3-spoolss: in spoolss_EnumPrinters r->in.server is a *unique* pointer!
Günther Deschner [Thu, 18 Feb 2010 01:03:53 +0000 (02:03 +0100)]
s3-spoolss: in spoolss_EnumPrinters r->in.server is a *unique* pointer!

Guenther
(cherry picked from commit 8ce66fba03f782c0b9948a9835bb488cfa74acf9)
(cherry picked from commit cb6fcb9b16b36fcdc68bef382dbd7ecf89521d4e)

14 years agoFix bug #7263 - Unable to print using Samba 3.5.1 and cups-1.1.23-40.46 on SLES10.
Luca Olivetti [Tue, 4 May 2010 22:07:57 +0000 (15:07 -0700)]
Fix bug #7263 - Unable to print using Samba 3.5.1 and cups-1.1.23-40.46 on SLES10.

Fix cups encryption setting

I had the same problem and it's due to the fact that samba doesn't respect the
"cups encryption" setting since lp_cups_encrypt changes the value: if you set
"cups encryption=no", the first call will change it to HTTP_ENCRYPT_NEVER,
since that is 1 (i.e. true), the next call will change it to
HTTP_ENCRYPT_ALWAYS and after that it'll remain set as HTTP_ENCRYPT_ALWAYS.
This patch fixes this problem.

Don't mix up the HTTP_ENCRYPT_XXX constants up with the
enumeration constants (True, False, Auto) used in the
loadparm code.
(cherry picked from commit a9e008ee36c8fd9ca79b3bdfdc78111939c3e539)
(cherry picked from commit 7f57b627800baba4bc030d9c3748ead9ac53397d)

14 years agos3-rpcclient: Fix Bug #7277. rpcclient was sending invalid data, causing cupsaddsmb...
Günther Deschner [Mon, 3 May 2010 13:54:14 +0000 (15:54 +0200)]
s3-rpcclient: Fix Bug #7277. rpcclient was sending invalid data, causing cupsaddsmb to fail.

Guenther
(cherry picked from commit 9cc10e6a5742f09261f01a2c0b3a94b7b772e573)
(cherry picked from commit 0fc2424ee2f5082a74dad45a03226b457b6b00a8)

14 years agotsocket: Improve the tsocket_address_bsd_sockaddr documentation.
Andreas Schneider [Thu, 25 Feb 2010 13:32:39 +0000 (14:32 +0100)]
tsocket: Improve the tsocket_address_bsd_sockaddr documentation.

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

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

14 years agoSpelling fixes for tsocket API documentation.
Brad Hards [Sun, 21 Feb 2010 05:34:22 +0000 (16:34 +1100)]
Spelling fixes for tsocket API documentation.

Signed-off-by: Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
(cherry picked from commit 319d3bf9d93ddfc1afbfb0c759f6d91906f915c1)

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

14 years agotsocket: Fix the description of tstream_writev_queue_send/recv (cherry picked from...
Kai Blin [Thu, 28 Jan 2010 10:16:24 +0000 (11:16 +0100)]
tsocket: Fix the description of tstream_writev_queue_send/recv (cherry picked from commit 88099bcc93fabebe3d4548f8a5aa26b585886a1c)

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

14 years agotsocket: Fix description for tstream_readv_pdu_queue_send/recv (cherry picked from...
Kai Blin [Thu, 28 Jan 2010 10:11:33 +0000 (11:11 +0100)]
tsocket: Fix description for tstream_readv_pdu_queue_send/recv (cherry picked from commit 9184f524f0e5fe828b723200182969e0e3e8685d)

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

14 years agotsocket: Added complete doxygen documentation.
Andreas Schneider [Wed, 16 Dec 2009 12:26:48 +0000 (13:26 +0100)]
tsocket: Added complete doxygen documentation.

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

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

14 years agotsocket: Added doxygen config file.
Andreas Schneider [Mon, 21 Dec 2009 11:44:00 +0000 (12:44 +0100)]
tsocket: Added doxygen config file.

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

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

14 years agos3: Fix bug 7398 -- rename problems with full_audit
Volker Lendecke [Thu, 29 Apr 2010 18:07:35 +0000 (20:07 +0200)]
s3: Fix bug 7398 -- rename problems with full_audit
(cherry picked from commit a9be37010b465346d5008edc5f8311180ff9e4f4)

14 years agos3/packaging: make rpm build work by overriding strict linker flags
Björn Jacke [Tue, 27 Apr 2010 15:06:55 +0000 (17:06 +0200)]
s3/packaging: make rpm build work by overriding strict linker flags
(cherry picked from commit 8f74d38c3a4a853f608fed0bed1b55915d01555a)
(cherry picked from commit 1c39ce13c551b0fb5ca1569d7be82a34284f7f06)

14 years agos3: Fix a winbind crash when scanning trusts
Volker Lendecke [Wed, 21 Apr 2010 15:04:49 +0000 (17:04 +0200)]
s3: Fix a winbind crash when scanning trusts

add_trusted_domain() for a new domain always needs to be followed by a
setup_domain_child(). This was not always done, in particular not when walking
to the forest root for additional trusts.

This is a minimal patch, we need to fix add_trusted_domain().

Fix bug #7389 (Fix a winbind crash when scanning trusted domains).
(cherry picked from commit a356b04933e65aed9a6c38611bcbfce3b297d092)

14 years agoFix bug #7384 - dptr_Close has a bitmap leak.
Ira Cooper [Fri, 23 Apr 2010 17:55:46 +0000 (10:55 -0700)]
Fix bug #7384 - dptr_Close has a bitmap leak.

s3: Fix to dptr_Close

This fixes a bitmap "leak" in dptr_Close by making it use the same internal
routines the rest of the code does.
(cherry picked from commit dd2025947136f28b22b70de59309e149a1f45f3d)
(cherry picked from commit 3e6f961a7a6b4d0e41d0cf2c47ca2aebeea8f6af)

14 years agos3-net_conf: Display an error on net conf import failures.
Jim McDonough [Wed, 21 Apr 2010 18:51:54 +0000 (20:51 +0200)]
s3-net_conf: Display an error on net conf import failures.

When something goes wrong, such as a typo in a parameter
name, we'll now display the failure instead of just returning
with -1 and no message.

Fix bug #7378 ("net conf import" fails silently on parameter typo).
(cherry picked from commit c1ae6d36d09569732408fdd6c079a1db7a5a65a5)

14 years agos3 torture: Prevent smbcli segfault when running smbtorture3 against an smbd with...
Tim Prouty [Mon, 4 Jan 2010 20:57:34 +0000 (12:57 -0800)]
s3 torture: Prevent smbcli segfault when running smbtorture3 against an smbd with security=share

Fix bug #7370 (3.5.2 smbclient segfaults when used against old samba
"security = share").
(cherry picked from commit db511272f3393a35a1e596740b88487333ebeb24)

14 years agos3-docs: Improve "winbind nss info" section in man smb.conf.
Karolin Seeger [Fri, 16 Apr 2010 07:23:30 +0000 (09:23 +0200)]
s3-docs: Improve "winbind nss info" section in man smb.conf.

Karolin
(cherry picked from commit 20fc769179377bf037f4d5efe1afbaf77d4c9292)
(cherry picked from commit fb1b0901ec93afe998145bb7a7549bbdb13c712c)

14 years agoFix bug #7288 - SMB job IDs in CUPS job names wrong.
Jeremy Allison [Fri, 26 Mar 2010 01:22:16 +0000 (18:22 -0700)]
Fix bug #7288 - SMB job IDs in CUPS job names wrong.

Based on a patch from Michael Karcher <samba@mkarcher.dialup.fu-berlin.de>.

I think this is the correct fix. It causes cups_job_submit to use
print_parse_jobid(), which I've moved into printing/lpq_parse.c (to allow the
link to work).

It turns out the old print_parse_jobid() was *broken*, in that the pjob
filename was set as an absolute path - not relative to the sharename (due to it
not going through the VFS calls).

This meant that the original code doing a strncmp on the first part of the
filename would always fail - it starts with a "/", not the relative pathname of
PRINT_SPOOL_PREFIX ("smbprn.").

This fix could fix some other mysterious printing bugs - probably the ones
Guenther noticed where job control fails on non-cups backends.

Contains c79ca41baf15b4ef7eb287d343b17a53ba41e852 and
92332fb2368c641db1552d1f2a2f7b3deaa11519 from master.

Jeremy.
(cherry picked from commit 12936bfeb36ae867b52fe48d0f6d3d17d5c8b110)

14 years agos3-libsmbclient: Fix incomplete description of function return values in libsmbclient.h.
Derrell Lipman [Tue, 13 Apr 2010 18:32:14 +0000 (20:32 +0200)]
s3-libsmbclient: Fix incomplete description of function return values in libsmbclient.h.

Fix bug #7345.
(cherry picked from commit ce565b0498608714e2c4f7c9f9373dddcbfba568)

14 years agolibwbclient: Re-Fix a bug that was fixed with e5741e27c4c
Volker Lendecke [Tue, 13 Apr 2010 10:09:21 +0000 (12:09 +0200)]
libwbclient: Re-Fix a bug that was fixed with e5741e27c4c

> r21878: Fix a bug with smbd serving a windows terminal server: If winbind
> decides smbd to be idle it might happen that smbd needs to do a winbind
> operation (for example sid2name) as non-root. This then fails to get the
> privileged pipe. When later on on the same connection another authentication
> request comes in, we try to do the CRAP auth via the non-privileged pipe.
>
> This adds a winbindd_priv_request_response() request that kills the existing
> winbind pipe connection if it's not privileged.

The fix for this was lost during the conversion to libwbclient.

Thanks to Ira Cooper <samba@ira.wakeful.net> for pointing this out!

Volker

Fix bug #7357.
(cherry picked from commit 5c5e646ab3546aae4660b6598a6c89c66c3b4687)

14 years agos3:winbindd: make "smbcontrol winbindd validate-cache" reliable again
Stefan Metzmacher [Thu, 8 Apr 2010 10:45:54 +0000 (12:45 +0200)]
s3:winbindd: make "smbcontrol winbindd validate-cache" reliable again

commit 73577205cf81644e7fe853eaf3e6459f7f443096
(s3:winbindd: fix problems with SIGCHLD handling (bug #7317))
broke this.

metze
(cherry picked from commit eb9b7d0363669574de8ec380089407890f15eac2)
(cherry picked from commit bc30dc6983835ee376125861a5450975cc5af2ff)

14 years agos3:winbindd: remove unused variables
Stefan Metzmacher [Thu, 1 Apr 2010 16:10:47 +0000 (18:10 +0200)]
s3:winbindd: remove unused variables

metze
(cherry picked from commit e18ddb6036f5e0a2211e89a7c9b5514c30a653cf)
(cherry picked from commit 284f94b01d70db2e55dd8c1f3f8a353c1b4c1b8e)

14 years agos3:winbindd: fix problems with SIGCHLD handling (bug #7317)
Stefan Metzmacher [Thu, 1 Apr 2010 14:23:06 +0000 (16:23 +0200)]
s3:winbindd: fix problems with SIGCHLD handling (bug #7317)

The main problem is that we call CatchChild() within the
parent winbindd, which overwrites the signal handler
that was registered by winbindd_setup_sig_chld_handler().

That means winbindd_sig_chld_handler() and winbind_child_died()
are never triggered when a winbindd domain child dies.
As a result will get "broken pipe" for all requests to that domain.

To reduce the risk of similar bugs in future we call
CatchChild() in winbindd_reinit_after_fork() now.

We also use a full winbindd_reinit_after_fork() in the
cache validation child now instead instead of just resetting
the SIGCHLD handler by hand. This will also fix possible
tdb problems on systems without pread/pwrite and disabled mmap
as we now correctly reopen the tdb handle for the child.

metze
(cherry picked from commit 73577205cf81644e7fe853eaf3e6459f7f443096)
(cherry picked from commit e7b9c148d6fe155bd8afb8ff9b148eaf4092ff4e)

14 years agos3-docs: Fix typo in man idmap_ad.
Karolin Seeger [Tue, 13 Apr 2010 18:06:14 +0000 (20:06 +0200)]
s3-docs: Fix typo in man idmap_ad.

Karolin
(cherry picked from commit 6389fac6db2f54d148222009b5e209cef5c6bdd7)
(cherry picked from commit 39dbf73a6fb4ad45eac259124b70042994d4f215)

14 years agos3:lib/time: remove TIME_T_MIN/MAX defines
Björn Jacke [Wed, 6 Jan 2010 23:41:50 +0000 (00:41 +0100)]
s3:lib/time: remove TIME_T_MIN/MAX defines

we already get them from lib/util/time.h
(cherry picked from commit f5729dbb6e720cb6076ea053f1ad0680259e6b39)

The last two patches address bug #7352 (TIME_T_MAX defines inconsistent).
(cherry picked from commit 3668914ce12d0dc5a2f84159a8bd3e82a2ca32a1)

14 years agolib/util: move TIME_T_MIN/MAX defines into header file (cherry picked from commit...
Björn Jacke [Wed, 6 Jan 2010 23:40:09 +0000 (00:40 +0100)]
lib/util: move TIME_T_MIN/MAX defines into header file (cherry picked from commit 571ee54b791b93ad46e09ed563ef4a5582dcf0c8)
(cherry picked from commit 42d89dbd9407fcdef989387208dd8cae8472a6e8)

14 years agoFix bug #7339 - MSDFS is non-functional in 3.5.x
Jeremy Allison [Fri, 9 Apr 2010 03:32:36 +0000 (20:32 -0700)]
Fix bug #7339 - MSDFS is non-functional in 3.5.x

In the refactoring around filename_convert, the split between the functions
resolve_dfspath() and resolve_dfspath_wcard() was lost, leaving us only with
resolve_dfspath_wcard().

Internally resolve_dfspath_wcard() calls dfs_redirect() only with a
"allow_wcards" flag of true, wheras the old resolve_dfspath() would call with a
value of false. The loss of this case causes dfs_redirect to always masquerade
DFS links as directories, even when they are being queried directly by a trans2
QPATHINFO call. We should only masquerade DFS links as directories when called
from a SMBsearch or trans2 findfirst/findnext - which was the intent of the
"allow_wcards" flag.

This patch adds back an allow_wcards bool parameter to
resolve_dfspath_wcard(). This bool is set from the state of the ucf_flags when
filename_convert() is called.

I will follow this up with a new smbclient-based torture test that will prevent
us from ever regressing our DFS support again.

Jeremy.
(cherry picked from commit 358781559526f962c96c1af88cd104946c507d05)
(cherry picked from commit d614655f918fdbafe4520e9cc4d5de82e15b7d7d)

14 years agoWHATSNEW: Start release notes for Samba 3.5.3.
Karolin Seeger [Wed, 7 Apr 2010 08:41:07 +0000 (10:41 +0200)]
WHATSNEW: Start release notes for Samba 3.5.3.

Karolin
(cherry picked from commit 827084bc317c76335f76d76970a51e67222b1fc9)

14 years agoVERSION: Raise version number up to 3.5.3.
Karolin Seeger [Wed, 7 Apr 2010 08:39:08 +0000 (10:39 +0200)]
VERSION: Raise version number up to 3.5.3.

Karolin
(cherry picked from commit 21c25005c79fa957ac95514373c7aa8828f3fee1)

14 years agoWHATSNEW: Update changes since 3.5.1. samba-3.5.2
Karolin Seeger [Thu, 1 Apr 2010 13:25:13 +0000 (15:25 +0200)]
WHATSNEW: Update changes since 3.5.1.

Karolin
(cherry picked from commit 05bc07ccd7b7e6aa1a69c0142160fc99990fb0c1)

14 years agos3:winbindd: make sure we don't try rpc requests against unaccessable domains
Stefan Metzmacher [Thu, 1 Apr 2010 07:29:38 +0000 (09:29 +0200)]
s3:winbindd: make sure we don't try rpc requests against unaccessable domains

This makes sure we don't crash while trying to dereference domain->conn.cli->foo
while trying to establish a rpc connection to the server.

This fixes bug #7316.

metze
(cherry picked from commit d930904b997d310aeff781bde1e7e3ce47dde8a1)
(cherry picked from commit 01b60b113869f526dcf3bb478d70df21dbb207c8)

14 years agoWHATSNEW: Update changes since 3.5.1.
Karolin Seeger [Thu, 1 Apr 2010 09:32:46 +0000 (11:32 +0200)]
WHATSNEW: Update changes since 3.5.1.

Karolin
(cherry picked from commit 5567d48e1cca30b244cdc0e6302c4f941aeb1bf5)

14 years agoWHATSNEW: Prepare release notes for Samba 3.5.2.
Karolin Seeger [Thu, 1 Apr 2010 09:22:59 +0000 (11:22 +0200)]
WHATSNEW: Prepare release notes for Samba 3.5.2.

Karolin
(cherry picked from commit c5b5cf35361fe4ea811a6f48a80ec63d5d4389ed)

14 years agos3: signals are processed twice in child.
Bo Yang [Tue, 9 Feb 2010 09:02:20 +0000 (17:02 +0800)]
s3: signals are processed twice in child.

Signed-off-by: Bo Yang <boyang@samba.org>
(cherry picked from commit 8c8bb51de1ac2baa46ac0736fae12c034288e5d4)

Fix bug #7206 (duplicate signal handler, signals are processed twice in child
process).
(cherry picked from commit 3d10185c518608c332d41e2814e49cfce47d02e6)

14 years agoFix bug 7310 - DOS attribute inconsistency with MS Office
Jeremy Allison [Wed, 31 Mar 2010 05:16:37 +0000 (22:16 -0700)]
Fix bug 7310 - DOS attribute inconsistency with MS Office

On rename we need to set the archive bit on the renamed file.

Jeremy
(cherry picked from commit 779c2052b3b13c8f1a793e59e6152c3704eb75c6)

14 years agos3:registry: eliminate race condition in creating/scanning sorted subkeys
Michael Adam [Mon, 8 Feb 2010 10:01:47 +0000 (11:01 +0100)]
s3:registry: eliminate race condition in creating/scanning sorted subkeys

Called, from key_exists, scan_sorted_subkeys re-creates the sorted
subkeys record of the given key and then searches through it.
The race is that between creation and parsing of the sorted subkey
record, another process that stores some other subkey of the same
parent key will delete the sorted subkey record, resulting in an
WERR_BADFILE of an operation that should actually succeed.

This patch fixes the issue by wrapping the creation and parsing
into a transaction.

Michael
(cherry picked from commit a752bbd10d661ebc93b8d51bd583eb62eb00ad18)

Fix bug #7314 (registry: creation of sorted subkey record is racy (not atomic)).
(cherry picked from commit 06d1aeb7b686b8b929cf9bff48aedc9dbb88b7c3)

14 years agos3:make "net conf addshare" atomic by wrapping all writes in one transaction
Michael Adam [Fri, 29 Jan 2010 14:04:25 +0000 (15:04 +0100)]
s3:make "net conf addshare" atomic by wrapping all writes in one transaction

Michael
(cherry picked from commit 09f3ed102472304d6b4446a6fab9cf6f05c9176a)

Fix bug #7313 (Net conf addshare is not atomic).
(cherry picked from commit 3ab90b2897cd4e05b21ce46e91e93609e596c80e)

14 years agos3: Remove the unused parameter "persistent" from fetch_locked_internal (cherry picke...
Volker Lendecke [Fri, 5 Mar 2010 14:30:22 +0000 (15:30 +0100)]
s3: Remove the unused parameter "persistent" from fetch_locked_internal (cherry picked from commit a5db27936e9c6aad99300ea46808481803f57e08)

The last 32 patches address bug #7232 (CTDB persistent transactions are racy).
(cherry picked from commit f3ade095089d242484afd0f7fdbcc7826c311368)