samba.git
11 years agoWHATSNEW: Start release notes for Samba 3.5.21. v3-5-test
Karolin Seeger [Tue, 18 Dec 2012 09:51:35 +0000 (10:51 +0100)]
WHATSNEW: Start release notes for Samba 3.5.21.

Karolin

11 years agoVERSION: Bump version number up to 3.5.21.
Karolin Seeger [Tue, 18 Dec 2012 09:50:59 +0000 (10:50 +0100)]
VERSION: Bump version number up to 3.5.21.

Karolin

11 years agoWHATSNEW: Prepare release notes for Samba 3.5.20.
Karolin Seeger [Fri, 14 Dec 2012 09:12:34 +0000 (10:12 +0100)]
WHATSNEW: Prepare release notes for Samba 3.5.20.

Karolin

11 years agoFix bug #9455 munmap called for an address location not mapped by samba.
Jeremy Allison [Mon, 10 Dec 2012 18:40:12 +0000 (10:40 -0800)]
Fix bug #9455 munmap called for an address location not mapped by samba.

Signed-off-by: Jeremy Allison <jra@samba.org>
11 years agosource3/libaddns: don't depend on the order in resp->answers[]
Stefan Metzmacher [Fri, 9 Nov 2012 07:59:36 +0000 (08:59 +0100)]
source3/libaddns: don't depend on the order in resp->answers[]

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit eecc1d294256210ee8c2f6ab79d21b835258a6d4)

The last 2 patches address bug #9402 - lib/addns doesn't work samba4 with a
bind9 server.

11 years agosource3/libaddns: remove pointless check for resp->num_additionals != 1
Stefan Metzmacher [Fri, 9 Nov 2012 07:55:40 +0000 (08:55 +0100)]
source3/libaddns: remove pointless check for resp->num_additionals != 1

We never use resp->additionals, so there's no reason to check.

This fixes dns updates against BIND9 (used in a Samba4 domain).

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit b59c5db5f74f56c0536635a41ae51c389109ceb5)

11 years agolib/replace: replace all *printf function if we replace snprintf (bug #9390)
Stefan Metzmacher [Tue, 13 Nov 2012 13:07:11 +0000 (14:07 +0100)]
lib/replace: replace all *printf function if we replace snprintf (bug #9390)

This fixes segfaults in log level = 10 on Solaris.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Signed-off-by: Björn Jacke <bj@sernet.de>
Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Wed Nov 14 19:41:14 CET 2012 on sn-devel-104
(cherry picked from commit a15da3625850d97b3da1b02308c870f820007c52)

The last 5 patches address bug #9390 - Solaris printf doesn't allow %s, NULL.

11 years agolibreplace: Fix symbol names for snprintf/asprintf/vasprintf.
Jelmer Vernooij [Sun, 13 May 2012 01:21:34 +0000 (03:21 +0200)]
libreplace: Fix symbol names for snprintf/asprintf/vasprintf.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun May 13 05:16:28 CEST 2012 on sn-devel-104
(cherry picked from commit cf67da70c9a63c4dc63f287059321d6c36d1e19e)

11 years agolibreplace: fixed declaration of dprintf() on FreeBSD (cherry picked from commit...
Andrew Tridgell [Tue, 23 Mar 2010 18:06:25 +0000 (05:06 +1100)]
libreplace: fixed declaration of dprintf() on FreeBSD (cherry picked from commit a599319d0a389ff0c31dae8068cd7a78352aa9e7)

11 years agolibreplace: added replacements for dprintf() and vdprintf()
Andrew Tridgell [Thu, 11 Feb 2010 09:18:50 +0000 (20:18 +1100)]
libreplace: added replacements for dprintf() and vdprintf()

these are very useful for writing files with formatted writes

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit d6fb64c51244529388b1f79ba8220ff608e1e4de)

11 years agolibreplace: some systems don't have memmem()
Andrew Tridgell [Fri, 1 Jan 2010 23:01:11 +0000 (10:01 +1100)]
libreplace: some systems don't have memmem()

added rep_memmem() and a testsuite
(cherry picked from commit fef3c910da421e890925e5e61275fc457da87f6e)

11 years agoAnother fix needed for bug #9236 - ACL masks incorrectly applied when setting ACLs.
Jeremy Allison [Thu, 8 Nov 2012 21:45:19 +0000 (13:45 -0800)]
Another fix needed for bug #9236 - ACL masks incorrectly applied when setting ACLs.

Not caught by make test as it's an extreme edge case for strange
incoming ACLs. I only found this as I'm making raw.acls and smb2.acls
pass against 3.6.x with acl_xattr mapped onto a POSIX backend (which
isn't tested in make test).

An incoming inheritable ACE entry containing only one permission,
WRITE_DATA maps into a POSIX owner perm of "-w-", which violates
the principle that the owner of a file/directory can always read.

11 years agodocs-xml: fix use of <smbconfoption> tag (fix bug #9345)
Björn Baumbach [Fri, 2 Nov 2012 09:25:27 +0000 (10:25 +0100)]
docs-xml: fix use of <smbconfoption> tag (fix bug #9345)

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Karolin Seeger <ks@samba.org>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Fri Nov  2 12:37:42 CET 2012 on sn-devel-104
(cherry picked from commit 3ecbe8c83a003825fc58f6dcb9e02a35aad2d86e)

Autobuild-User(v4-0-test): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(v4-0-test): Mon Nov  5 13:09:12 CET 2012 on sn-devel-104
(cherry picked from commit 6195cb667b1c162436bfbf5d4f499bdc776f83b4)
(cherry picked from commit a6dea8e6556bd5e391cd709b86664fb7cc34433a)

11 years agoSecond part of fix for bug #7781 - Samba transforms ShareName to lowercase (sharename...
Jeremy Allison [Thu, 1 Nov 2012 18:56:22 +0000 (11:56 -0700)]
Second part of fix for bug #7781 - Samba transforms ShareName to lowercase (sharename) when adding new share via MMC

Ensure safe_strcpy is safe when src == dest. This probably needs porting
to master/3.6.x/4.0.x.

11 years agoFix bug #7781 (Samba transforms "ShareName" to lowercase when adding new share via...
Jeremy Allison [Wed, 23 May 2012 20:22:17 +0000 (22:22 +0200)]
Fix bug #7781 (Samba transforms "ShareName" to lowercase when adding new share via MMC)

Signed-off-by: Michael Adam <obnox@samba.org>
11 years agoWHATSNEW: Start release notes for Samba 3.5.20.
Karolin Seeger [Mon, 5 Nov 2012 08:50:55 +0000 (09:50 +0100)]
WHATSNEW: Start release notes for Samba 3.5.20.

And fix a typo.

Karolin

11 years agoVERSION: Bump version number up to 3.5.20.
Karolin Seeger [Mon, 5 Nov 2012 08:44:10 +0000 (09:44 +0100)]
VERSION: Bump version number up to 3.5.20.

Karolin

11 years agoWHATSNEW: Prepare release notes for Samba 3.5.19.
Karolin Seeger [Thu, 1 Nov 2012 08:30:00 +0000 (09:30 +0100)]
WHATSNEW: Prepare release notes for Samba 3.5.19.

Karolin

11 years agoRevert "Fix bug #7781 (Samba transforms "ShareName" to lowercase when adding new...
Karolin Seeger [Wed, 31 Oct 2012 10:40:26 +0000 (11:40 +0100)]
Revert "Fix bug #7781 (Samba transforms "ShareName" to lowercase when adding new share via MMC)"

This reverts commit 157b88da4db727eafa682c7fc7eab11d5955f57b.

This one seems to break make test on my system.

Karolin

11 years agoRevert "Revert "s3-smbd: Don't segfault if user specified ports out for range.""
Karolin Seeger [Wed, 31 Oct 2012 10:39:34 +0000 (11:39 +0100)]
Revert "Revert "s3-smbd: Don't segfault if user specified ports out for range.""

This reverts commit fce3a18d3d5ed46f8e0d1653f862e46b5dff0e03.

This patch does not seem to cause the issue. Sorry for the noise.

Karolin

11 years agoRevert "s3-smbd: Don't segfault if user specified ports out for range."
Karolin Seeger [Thu, 18 Oct 2012 09:48:16 +0000 (11:48 +0200)]
Revert "s3-smbd: Don't segfault if user specified ports out for range."

This reverts commit 60b15f3b646d10e027e8288132db5b942261de8f.

This commit seems to break 'make test' on my system, so reverting it for now.
(Bug report has been re-opened, see
https://bugzilla.samba.org/show_bug.cgi?id=9218
for details).

11 years agos3: fix compile of krb5 locator on Solaris
Björn Jacke [Tue, 29 May 2012 06:01:40 +0000 (08:01 +0200)]
s3: fix compile of krb5 locator on Solaris

the krb5 locator plugin on Solaris needs LIBREPLACE_LIBS (bug #8732)

Autobuild-User: Björn Jacke <bj@sernet.de>
Autobuild-Date: Tue May 29 09:58:42 CEST 2012 on sn-devel-104
(cherry picked from commit 3085225e72c75abf84d7740334459cd971ee4c56)
(cherry picked from commit 7ca265423a36c114ac9216a780e005956967eae7)

11 years agolib-addns: ensure that allocated buffer are pre set to 0 (bug #9259)
Matthieu Patou [Thu, 27 Sep 2012 08:22:57 +0000 (01:22 -0700)]
lib-addns: ensure that allocated buffer are pre set to 0 (bug #9259)

It avoid bugs when one of the buffer is supposed to contain a string
that is not null terminated (ie. label->label) and that we don't force
the last byte to 0.
(similar to commit 03c4dceaab82ca2c60c9ce0e09fddd071f98087b)

11 years agoFix bug #9117 - smbclient can't connect to a Windows 7 server using NTLMv2 (crypto...
Jeremy Allison [Fri, 24 Aug 2012 22:54:07 +0000 (15:54 -0700)]
Fix bug #9117 - smbclient can't connect to a Windows 7 server using NTLMv2 (crypto code changes domain case).

Simple fix for 3.5.x, tested and confirmed as working by original reporter
"Blohm, Guntram (I/FP-37, extern)" <extern.guntram.blohm@audi.de>.

11 years agos3-libsmb: Initialise ticket to ensure we do not invalid memory
Andrew Bartlett [Thu, 1 Mar 2012 05:55:04 +0000 (16:55 +1100)]
s3-libsmb: Initialise ticket to ensure we do not invalid memory

The free is however a talloc_free(), which has additional protection against
freeing the wrong thing.

Andrew Bartlett

Signed-off-by: Jeremy Allison <jra@samba.org>
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Mar  2 01:45:19 CET 2012 on sn-devel-104
(cherry picked from commit f1452a296429b79755235f4a480f0d5ea38ce178)

Fix bug #8788 - spnego_parse_krb5_wrap() frees invalid memory.
(cherry picked from commit e96f50c9bb145a6af2c023e8ff4c3e8888c5a4a6)

11 years agoautoconf: fix --with(out)-sendfile-support option handling
Björn Jacke [Thu, 13 Sep 2012 22:02:22 +0000 (00:02 +0200)]
autoconf: fix --with(out)-sendfile-support option handling

this fixes bug #8344
(cherry picked from commit a1db9aada46e2e7eefc989f888d22650320533de)

11 years agoWhen setting a non-default ACL, don't forget to apply masks to SMB_ACL_USER and SMB_A...
Jeremy Allison [Tue, 2 Oct 2012 17:15:54 +0000 (10:15 -0700)]
When setting a non-default ACL, don't forget to apply masks to SMB_ACL_USER and SMB_ACL_GROUP entries.

Fix bug #9236 - ACL masks incorrectly applied when setting ACLs.

11 years agoOnly apply masks on non-default ACL entries when setting the ACL.
Jeremy Allison [Tue, 2 Oct 2012 20:01:59 +0000 (13:01 -0700)]
Only apply masks on non-default ACL entries when setting the ACL.

11 years agoUse is_default_acl variable in canonicalise_acl().
Jeremy Allison [Tue, 2 Oct 2012 16:55:09 +0000 (09:55 -0700)]
Use is_default_acl variable in canonicalise_acl().

11 years agoReformat spacing to be even.
Jeremy Allison [Tue, 2 Oct 2012 19:38:16 +0000 (12:38 -0700)]
Reformat spacing to be even.

11 years agohtml docs: Remove link to Using Samba.
Karolin Seeger [Thu, 4 Oct 2012 09:43:20 +0000 (11:43 +0200)]
html docs: Remove link to Using Samba.

Thanks to Christian Perrier <bubulle@debian.org> for reporting!

Fix bug #7826 - HTML docs index file still points to Using Samba.

Karolin

Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Thu Oct  4 13:48:00 CEST 2012 on sn-devel-104
(cherry picked from commit 1bf209dd7e5a0f0001b3d1e3798093772bbd3fd3)

11 years agoFix bug #7781 (Samba transforms "ShareName" to lowercase when adding new share via...
Jeremy Allison [Wed, 23 May 2012 20:22:17 +0000 (22:22 +0200)]
Fix bug #7781 (Samba transforms "ShareName" to lowercase when adding new share via MMC)

Signed-off-by: Michael Adam <obnox@samba.org>
11 years agos3-smbd: Don't segfault if user specified ports out for range.
Andreas Schneider [Tue, 25 Sep 2012 12:28:22 +0000 (14:28 +0200)]
s3-smbd: Don't segfault if user specified ports out for range.

(cherry picked from commit 50d324b7e070de4672eff3fb6231923e6dca807a)

Signed-off-by: Andreas Schneider <asn@samba.org>
Fix bug #9218 - Samba panics if a user specifies an invalid port number.

11 years agoFix bug #9213 - Bad ASN.1 NegTokenInit packet can cause invalid free.
Jeremy Allison [Tue, 25 Sep 2012 23:35:09 +0000 (16:35 -0700)]
Fix bug #9213 - Bad ASN.1 NegTokenInit packet can cause invalid free.

Not the correct fix for the specific issue, but a general fix to
make sure this can never happen again.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Sep 26 04:07:57 CEST 2012 on sn-devel-104
(cherry picked from commit 83f60672e1b3069e6b1b90b376460da895e37df3)
(cherry picked from commit d0b872ea7ca112d047b9ee2d10d1a75a2ee4aed3)

11 years agoFix bug #9016 - Connection to outbound trusted domain goes offline.
Jeremy Allison [Fri, 13 Jul 2012 23:25:23 +0000 (16:25 -0700)]
Fix bug #9016 - Connection to outbound trusted domain goes offline.

By the time we've gotten to init_dc_connection_network() we shouldn't
be second guessing the caller by calling winbindd_can_contact_domain().

If for some reason we do need to restrict the contact list here we
can add a condition to only contact the primary domain or domains
listed in the tdc cache, but I don't think that's neccessary.

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Jul 14 03:17:57 CEST 2012 on sn-devel-104
(cherry picked from commit 726ecf6a915ff534af4076e9d0cdebf8b5435d61)
(cherry picked from commit d4faae3dbdfdd600bbf9bddb2589b8a6dc8434b6)

11 years agoquota: add supprt for gfs2
Björn Jacke [Tue, 18 Sep 2012 11:57:30 +0000 (13:57 +0200)]
quota: add supprt for gfs2

gfs2 uses the same generic quota interface as xfs and it has the same base
block/quota block size ratio and seems to work nice with the xfs quota module.

(People using gfs should be aware that quota reporting is lagging quite a bit
on gfs.  If you copy a file on a gfs volume the quota values are being updated
with a delay of 30s here with kernel 3.5. This reporting can lead to data
corruption if a client thinks he can write but actually he suddently can't.)
(cherry picked from commit 0b57d1c07520f4995412f224945324fef29f5989)

Fix bug #9172 - quota on gfs2 being reported wrong.
(cherry picked from commit 16a3b6e02d1bb8345984ab6a8c81e446d8de2f54)

11 years agoWHATSNEW: Start release notes for Samba 3.5.19.
Karolin Seeger [Mon, 24 Sep 2012 17:59:55 +0000 (19:59 +0200)]
WHATSNEW: Start release notes for Samba 3.5.19.

Karolin

11 years agoVERSION: Bump version up to 3.5.19.
Karolin Seeger [Mon, 24 Sep 2012 17:57:40 +0000 (19:57 +0200)]
VERSION: Bump version up to 3.5.19.

Karolin

11 years agoWHWATSNEW: Prepare release notes for Samba 3.5.18.
Karolin Seeger [Fri, 21 Sep 2012 08:19:07 +0000 (10:19 +0200)]
WHWATSNEW: Prepare release notes for Samba 3.5.18.

Karolin

11 years agodocs: clarify the idmap_rid manpage (bug #7788)
Michael Adam [Tue, 7 Dec 2010 16:30:27 +0000 (17:30 +0100)]
docs: clarify the idmap_rid manpage (bug #7788)

The idmap_rid module should not be used as a default backend.
Also mention that the old snytax "idmap backend = rid:domain=range ..."
is not supported any more.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Dec  7 19:07:57 CET 2010 on sn-devel-104

11 years agos3:winbindd: make sure we only call static_init_idmap once
Björn Jacke [Wed, 24 Aug 2011 08:57:49 +0000 (10:57 +0200)]
s3:winbindd: make sure we only call static_init_idmap once

this is a backport of 3f14d03adbda03b821210115af4fae044a9b4a3e

Fix bug #8402 - winbind log spammed with idmap messages.

11 years agoquota: fix build of sysquote_xfs on
Björn Jacke [Wed, 12 Sep 2012 23:23:12 +0000 (01:23 +0200)]
quota: fix build of sysquote_xfs on

linux header files renamed some XFS_* defines to FS_* around kernel v2.6.36

This fixes bug #7814

11 years agonsswitch: fix crash on null pam change pw response
Luca Lorenzetto [Tue, 11 Sep 2012 16:35:42 +0000 (18:35 +0200)]
nsswitch: fix crash on null pam change pw response

The function _pam_winbind_change_pwd crashes due to a null value passed
to the function strcasecmp and denies to login via graphical login
manager. Check for a null value before doing a strcasecmp.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1003296
Bug: https://bugzilla.samba.org/show_bug.cgi?id=9013
(Desktop Managers (xdm, gdm, lightdm...) crashes with SIGSEGV in
_pam_winbind_change_pwd() when password is expiring)
(cherry picked from commit 47f2211f137688a7c46c4a38571a9f94e59dbf6a)

11 years agoFix bug #9147 - winbind can't fetch user or group info from AD via LDAP
Jeremy Allison [Mon, 10 Sep 2012 23:07:37 +0000 (16:07 -0700)]
Fix bug #9147 - winbind can't fetch user or group info from AD via LDAP

Don't use "isprint" in ldb_binary_encode(). This is locale specific.
Restrict to ASCII only, hex encode everything else.

11 years agos3: delete requests are not special
Volker Lendecke [Mon, 10 Sep 2012 09:25:03 +0000 (11:25 +0200)]
s3: delete requests are not special

The only difference between batch and exclusive oplocks is the time of
the check: Batch is checked before the share mode check, exclusive after.

Signed-off-by: Jeremy Allison <jra@samba.org>
Fix bug #9150 - Valid open requests can cause smbd assert due to incorrect
oplock handling on delete requests.

11 years agos3: Fix bug #9085.
hargagan [Tue, 28 Aug 2012 07:29:52 +0000 (09:29 +0200)]
s3: Fix bug #9085.

NMB registration for a duplicate workstation fails with registration refuse.
(cherry picked from commit 71c4227fd0a741984fb273ad1973ad1724ecb04b)

11 years agoFix bug #9100 - winbind doesn't return "Domain Local" groups from own domain.
Goldberg, Neil R [Fri, 17 Aug 2012 20:52:07 +0000 (13:52 -0700)]
Fix bug #9100 - winbind doesn't return "Domain Local" groups from own domain.

Back-port of fix for 3.6.x from bug #9052.

11 years agoFix bug #9098 - winbind does not refresh kerberos tickets.
Jeremy Allison [Tue, 21 Aug 2012 21:08:24 +0000 (14:08 -0700)]
Fix bug #9098 - winbind does not refresh kerberos tickets.

Based on work from Ian Gordon <ian.gordon@strath.ac.uk>.

11 years agoFix bug #9104 - winbindd can mis-identify idle clients - can cause crashes and NDR...
Herb Lewis [Mon, 20 Aug 2012 23:03:28 +0000 (16:03 -0700)]
Fix bug #9104 - winbindd can mis-identify idle clients - can cause crashes and NDR parsing errors.

A connection is idle when both struct winbindd_cli_state->request AND
struct winbindd_cli_state->response are NULL. Otherwise we can flag
as idle a connection in the state of having sent the request to
the winbindd child (request != NULL) but not yet received a reply
(response == NULL).

11 years agoEnsure we keep last_access up to date when processing a request.
Jeremy Allison [Mon, 20 Aug 2012 22:21:26 +0000 (15:21 -0700)]
Ensure we keep last_access up to date when processing a request.

11 years agos3: Fix a crash in reply_lockingX_error
Volker Lendecke [Tue, 7 Aug 2012 23:49:52 +0000 (16:49 -0700)]
s3: Fix a crash in reply_lockingX_error

A timed brlock with 2 locks comes in and the second one blocks,
file is closed. smbd_cancel_pending_lock_requests_by_fid sets
blr->fsp to NULL. reply_lockingX_error (called via
MSG_SMB_BLOCKING_LOCK_CANCEL) deferences blr->fsp because
blr->lock_num==1 (the second one blocked).

This patch fixes the bug by only undoing the locks if fsp!=NULL.
fsp==NULL is the close case where everything is undone anyway.

Thanks to Peter Somogyi, somogyi@hu.ibm.com for this bug report.

Fix bug #9084 - Blocking lock followed by close can crash smbd.
(cherry picked from commit d80fbbea8ec77c0bda0e3fb9eaed2f170784ea7d)

11 years agoWHATSNEW: Start release notes for Samba 3.5.18.
Karolin Seeger [Mon, 13 Aug 2012 05:04:37 +0000 (07:04 +0200)]
WHATSNEW: Start release notes for Samba 3.5.18.

Karolin

11 years agoVERSION: Bump version up to 3.5.18.
Karolin Seeger [Mon, 13 Aug 2012 05:02:56 +0000 (07:02 +0200)]
VERSION: Bump version up to 3.5.18.

Karolin

11 years agoWHATSNEW: Remove "Major enhancements" section.
Karolin Seeger [Thu, 2 Aug 2012 17:26:06 +0000 (19:26 +0200)]
WHATSNEW: Remove "Major enhancements" section.

Karolin

11 years agoWHATSNEW: Add changes since 3.5.16.
Karolin Seeger [Thu, 26 Jul 2012 18:03:39 +0000 (20:03 +0200)]
WHATSNEW: Add changes since 3.5.16.

Karolin

11 years agoFix bug #9034 - Typo in set_re_uid() call when USE_SETRESUID selected in configure.
Jeremy Allison [Wed, 11 Jul 2012 04:13:03 +0000 (21:13 -0700)]
Fix bug #9034 - Typo in set_re_uid() call when USE_SETRESUID selected in configure.

Previous code only set the real euid, not the effective one. This is not a security issue
as this is *only* used in the quota code, and only between code that brackets
it with save_re_uid()/restore_re_uid(), Also this is not used on most platforms
(we use USE_SETREUID by preference) but it's better to have this right.
(cherry picked from commit ceed322622b46be3745b32a5f6a02e634bfe1789)

11 years agos3:vfs_gpfs: be less verbose in get/set_xattr functions
Stefan Metzmacher [Thu, 22 Dec 2011 13:20:32 +0000 (14:20 +0100)]
s3:vfs_gpfs: be less verbose in get/set_xattr functions

metze

Signed-off-by: Christian Ambach <ambi@samba.org>
(cherry picked from commit 2e95d8048b9e9c7025ddada7ede15494e6016ba9)

Fix bug #9022 - vfs_gpfs is very verbose in get/set_xattr functions.
(cherry picked from commit 3abaa9dd8a2af9497dfc6afd6f93a638956c1c3a)

11 years agos3: fix build without ads support
Björn Jacke [Sun, 1 Jul 2012 22:46:06 +0000 (00:46 +0200)]
s3: fix build without ads support

when we have no ads support we don't have the ads_get_sid_token symbol used in
this unused code :-)

this is the backport of 43c56dc4255a7a6cbd176e6ae66a7652c6d72d2c

Fix bug #8996 - build without ads support (e.g. plain solaris 8) broken.

11 years agos3: readd h_errno struct member but rename it
Björn Jacke [Thu, 10 Jun 2010 21:15:19 +0000 (23:15 +0200)]
s3: readd h_errno struct member but rename it

as pointed out by metze this is a structure of fixed size, which should not be
changed.
(cherry picked from commit a8c051b2f91852b5228d6a903d6a7fd50d22de28)

Second part of a fix for bug #9011 (Build on HP-UX broken).

11 years agoWHATSNEW: Start release notes for Samba 3.5.17.
Karolin Seeger [Fri, 6 Jul 2012 18:48:58 +0000 (20:48 +0200)]
WHATSNEW: Start release notes for Samba 3.5.17.

Karolin

11 years agoVERSION: Bump version up to 3.5.17.
Karolin Seeger [Fri, 6 Jul 2012 18:46:01 +0000 (20:46 +0200)]
VERSION: Bump version up to 3.5.17.

Karolin

11 years agoWHATSNEW: Prepare release notes for Samba 3.5.16.
Karolin Seeger [Sat, 30 Jun 2012 19:45:53 +0000 (21:45 +0200)]
WHATSNEW: Prepare release notes for Samba 3.5.16.

Karolin

11 years agos3: fix build on HP-UX
Björn Jacke [Thu, 10 Jun 2010 15:19:16 +0000 (17:19 +0200)]
s3: fix build on HP-UX

this struct member h_errno is not used in the HP-UX code paths, it was just
there because Solaris has it, too. As h_errno is a function call macro on HP-UX
when thread support is enabled we run into trouble here. Just commenting it out
should be okay as we don't use it anyway.
(cherry picked from commit ec94efb79d4516b09c7d1d93a4ff8ce0f7046f41)

Fix bug #9011 - Build on HP-UX broken.

11 years agos3-vfs_gpfs: Fix bug #9003, posix acl on gpfs
Volker Lendecke [Fri, 22 Jun 2012 13:46:13 +0000 (15:46 +0200)]
s3-vfs_gpfs: Fix bug #9003, posix acl on gpfs

gpfs2smb_acl can leave errno!=0 around even if it returned a correct
result!=NULL. We can only rely on errno being set if another error
condition (in this case result==NULL) indicates an error. If
result!=NULL, errno is undefined and can be anything. This leads to
SAFE_FREE(result) further down even in the success case.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jun 22 19:27:39 CEST 2012 on sn-devel-104
(cherry picked from commit e7b58146d8576ae8bf4eaf2ec1063fe7697e05b8)
(cherry picked from commit bea2d3d007cef5643e863d2d4a80f0ea72461ec3)

11 years agoFix bug #8974 - Kernel oplocks are broken when uid(file) != uid(process).
Jeremy Allison [Wed, 20 Jun 2012 22:50:00 +0000 (15:50 -0700)]
Fix bug #8974 - Kernel oplocks are broken when uid(file) != uid(process).

Based on a fix from "Etienne Dechamps " <e-t172@akegroup.org>
(cherry picked from commit 0e2fb6c69e971c7502fabe17fa71d1453dda18a6)

11 years agos3: Correct documentation of case sensitive
Olaf Flebbe [Fri, 28 Oct 2011 07:59:07 +0000 (09:59 +0200)]
s3: Correct documentation of case sensitive

this fixes bug #8552

Autobuild-User(master): Björn Jacke <bj@sernet.de>
Autobuild-Date(master): Fri Jun 22 21:59:59 CEST 2012 on sn-devel-104
(cherry picked from commit 8558e321c5fc7eab94f47b243024e0439dfe1378)
(cherry picked from commit 1f19c2de580b04fe9e3038c879c80d8a54ce828f)

11 years agoSame fix as bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does...
Jeremy Allison [Mon, 18 Jun 2012 23:24:12 +0000 (16:24 -0700)]
Same fix as bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does not send correct responses to NT Transact Secondary when no data and no params

for the Trans2 calls. See MS-CIFS 2.2.4.47.2 for details.
(cherry picked from commit d5c01dc502e02cde12abc939afd48519d38c09a9)

11 years agoFix Bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does not send...
Jeremy Allison [Mon, 18 Jun 2012 23:23:13 +0000 (16:23 -0700)]
Fix Bug 8989 - Samba 3.5.x (and probably all other versions of Samba) does not send correct responses to NT Transact Secondary when no data and no params

Found by Richard Sharpe <realrichardsharpe@gmail.com>. The correct
command code in a reply to NT Transact Secondary (0xa1) is
NT Transact (0xa0).
(cherry picked from commit 115f5af9a89a20929f02578c08a34ae2736951dd)

11 years agos3: Fix a winbind race leading to 100% CPU
Volker Lendecke [Fri, 26 Aug 2011 14:54:18 +0000 (16:54 +0200)]
s3: Fix a winbind race leading to 100% CPU

This fixes a race condition that leads to the winbindd_children list becoming
corrupted. It happens when on a busy winbind SIGCHLD is a bit late.

Imagine a winbind with multiple requests in the queue for a single child. Child
dies, and before the SIGCHLD handler is called we find the socket to be dead.
wb_child_request_done is called, receiving an error from wb_simple_trans_recv.
It closes the socket. Then immediately the wb_child_request_trigger will do
another fork_domain_child before the signal handler is called. This means that
we do another fork_domain_child, we have child->sock==-1 at this point.
fork_domain_child will do a DLIST_ADD(winbindd_children, child) a second time
where the child is already part of that list. This corrupts the list. Then the
signal handler kicks in, spinning in

for (child = winbindd_children; child != NULL; child = child->next) {

forever. Not good. This patch makes sure that both conditions (sock==-1 and not
part of the list) for a winbindd_child struct match up.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Fri Aug 26 18:51:24 CEST 2011 on sn-devel-104

Fix bug #9000 - winbindd hangs when disconnect domain connection.

11 years agoFix for bug #8998 - Notify code can miss a ChDir.
Volker Lendecke [Thu, 14 Jun 2012 19:07:33 +0000 (12:07 -0700)]
Fix for bug #8998 - Notify code can miss a ChDir.

11 years agoFix bug #8994 - winbind normalize names.
Jeremy Allison [Thu, 29 Jul 2010 20:47:27 +0000 (13:47 -0700)]
Fix bug #8994 - winbind normalize names.

We should be using the winbindd separator in this case, not hardcoding a \\ value.

Jeremy.
(cherry picked from commit b7f029016a6a3fb98652c65f27ae80ad78048396)

Signed-off-by: Andreas Schneider <asn@samba.org>
11 years agoFix bug #8972 - Directory group write permission bit is set if unix extensions are...
Jeremy Allison [Wed, 13 Jun 2012 17:48:32 +0000 (10:48 -0700)]
Fix bug #8972 - Directory group write permission bit is set if unix extensions are enabled

We can't manipulate file_attributes if it's a posix call.
(cherry picked from commit bb750d7232bd266c06a14ac3ea577aeecfb81b14)

11 years agos3-winbindd: call dump_core_setup after command line option has been parsed
Matthieu Patou [Fri, 1 Jun 2012 22:33:04 +0000 (15:33 -0700)]
s3-winbindd: call dump_core_setup after command line option has been parsed

Without this fix in some situations winbindd can't coredump.
Such cases append when samba is compiled in a custom prefix (ie.
/home/build/mat/prod/1/) in this case get_dyn_LOGFILEBASE or basename(lp_logfile)
before the configuration file and the command line is parsed will be something like /home/build/mat/prod/1/var
which might not exists on the host where you run it (where it's most
probably more "normal" directories).
Specifying --log-basename didn't help as dump_core_setup is called before the command line and
the config file is read so it didn't help getting a correct value in dump_core_setup.
We fix this issue by calling dump_core_setup() also after the command
line has been read and also after the configfile has been parsed so that
the final location for the coredump is coherent with the final logile
location.

Fix bug #8975 (winbindd can't coredump).
(cherry picked from commit 4cf3fb815610c6f0939f8b142296cd836faac7e6)

11 years agos3: Fix uninitialized memory read in talloc_free()
Volker Lendecke [Mon, 4 Jun 2012 19:22:21 +0000 (12:22 -0700)]
s3: Fix uninitialized memory read in talloc_free()

Thanks to laurent gaffie <laurent.gaffie@gmail.com> for reporting
this issue!

11 years agoFix bug #8970 - Possible memory leaks in the samba master process.
Richard Sharpe [Thu, 31 May 2012 22:43:14 +0000 (15:43 -0700)]
Fix bug #8970 - Possible memory leaks in the samba master process.

Signed-off-by: Jeremy Allison <jra@samba.org>
11 years agoFix bug #8882 - Broken processing of %U with vfs_full_audit when force user is set.
Jeremy Allison [Mon, 23 Apr 2012 23:19:50 +0000 (16:19 -0700)]
Fix bug #8882 - Broken processing of %U with vfs_full_audit when force user is set.

When doing a "force user" we need to remember what the "sanitized_username"
was from the original connect.

11 years agos3-utils: Use ads_do_search_retry in net ads search
Andrew Bartlett [Fri, 18 May 2012 12:02:57 +0000 (22:02 +1000)]
s3-utils: Use ads_do_search_retry in net ads search

This makes it possible to search against a slow server, as will
fallback from 1000 to (eventually) 125 users at a time.

Andrew Bartlett

The last 4 patches addres bug #8943 (Slow but responsive DC can lock up winbindd
for > 10 minutes at a time).

11 years agos3-libads: Use a reducing page size to try and cope with a slow LDAP server
Andrew Bartlett [Fri, 18 May 2012 12:01:14 +0000 (22:01 +1000)]
s3-libads: Use a reducing page size to try and cope with a slow LDAP server

If we cannot get 1000 users downloaded in 15seconds, try with 500, 250
and then 125 users at a time.

Andrew Bartlett

11 years agos3-winbindd: Always map the LDAP error code to an NTSTATUS
Andrew Bartlett [Fri, 18 May 2012 07:40:59 +0000 (17:40 +1000)]
s3-winbindd: Always map the LDAP error code to an NTSTATUS

We do this so that we catch LDAP_TIMELIMIT_EXCEEDED as NT_STATUS_IO_TIMEOUT, which
has special handling in winbindd_cache.c

Andrew Bartlett

11 years agos3-libads: Map LDAP_TIMELIMIT_EXCEEDED as NT_STATUS_IO_TIMEOUT
Andrew Bartlett [Fri, 18 May 2012 07:38:48 +0000 (17:38 +1000)]
s3-libads: Map LDAP_TIMELIMIT_EXCEEDED as NT_STATUS_IO_TIMEOUT

This allows Samba to then handle this error in the same way it would for RPC connections

Andrew Bartlett

11 years agoFix the loop unrolling inside resolve_ads().
Jeremy Allison [Mon, 30 Apr 2012 23:32:51 +0000 (16:32 -0700)]
Fix the loop unrolling inside resolve_ads().

If we don't get an IP list don't use interpret_string_addr(), as this only returns one address, use interpret_string_addr_internal() instead.

The last 4 patches address bug #8910 (resolve_ads() code can return zero
addresses and miss valid DC IP addresses).

11 years agoProtect all of the name resolution methods from returning null addrs. Ensure all...
Jeremy Allison [Mon, 30 Apr 2012 23:29:19 +0000 (16:29 -0700)]
Protect all of the name resolution methods from returning null addrs. Ensure all returns go through remove_duplicate_addrs2().

11 years agoFix convert_ss2service() to filter out zero addresses.
Jeremy Allison [Mon, 30 Apr 2012 23:24:27 +0000 (16:24 -0700)]
Fix convert_ss2service() to filter out zero addresses.

11 years agoFix remove_duplicate_addrs2 to do exactly what it says. Previously it could leave...
Jeremy Allison [Mon, 30 Apr 2012 23:16:39 +0000 (16:16 -0700)]
Fix remove_duplicate_addrs2 to do exactly what it says. Previously it could leave zero addresses in the list.

11 years agoFix bug #8957 - Typo in pam_winbindd code MUST fix.
Jeremy Allison [Sat, 26 May 2012 00:19:29 +0000 (17:19 -0700)]
Fix bug #8957 - Typo in pam_winbindd code MUST fix.
(cherry picked from commit ee4ef9a535a2d9db11bd94987fb96ae8f8771e79)

11 years agos3-pam_winbind: Fix the build.
Jeremy Allison [Thu, 10 May 2012 07:53:57 +0000 (09:53 +0200)]
s3-pam_winbind: Fix the build.

Jeremy

Part of a fix for bug #8915 (Samba fails to build with iniparser-3.0.0 and
iniparser-3.1.0).
(cherry picked from commit 00c901a5be83bfe4c70eccbe7fa2a35d3d2a368d)

11 years agoFix pam_winbind build against newer iniparser library.
Simo Sorce [Wed, 9 May 2012 11:55:41 +0000 (13:55 +0200)]
Fix pam_winbind build against newer iniparser library.

iniparser_getstr is deprecated and has been removed in newer libraries
available in Fedora. Use iniparse_getstring instead.

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Tue Apr 24 02:56:10 CEST 2012 on sn-devel-104

Based on commit adbace20a24b6ae4fbd6d17b7153833f4ac8c88d in master.
(cherry picked from commit e295905f2840b5e814f88cd483b7f5f0fb3b4150)

11 years agos3-docs: Fix bug #7930.
Karolin Seeger [Tue, 8 May 2012 14:33:07 +0000 (16:33 +0200)]
s3-docs: Fix bug #7930.

Add hint that setting "profile acls = yes" on normal shares can cause trouble.

Karolin

Autobuild-User: Karolin Seeger <kseeger@samba.org>
Autobuild-Date: Tue May  8 18:47:59 CEST 2012 on sn-devel-104
(cherry picked from commit 4cc04a29247a0c4b3de9884890364a5712534073)
(cherry picked from commit 5efc31595beae5ec661d0bf6d001bcfbf59bc446)

11 years agos3-VFS: Fix building out-of-tree modules.
Richard Sharpe [Tue, 8 May 2012 12:53:10 +0000 (14:53 +0200)]
s3-VFS: Fix building out-of-tree modules.

Fix bug #8822 (VFS module init function name has to be manually changed
depending on build environment).
(cherry picked from commit d2f4164e3db2c341ff3a1b35a68f691848c9a859)

11 years agos3-docs: overrided -> overridden
Karolin Seeger [Tue, 8 May 2012 09:05:37 +0000 (11:05 +0200)]
s3-docs: overrided -> overridden

Fix typo. Part of a fix for bug #7938. Based on a patch provided by John
Bradshaw <john@johnbradshaw.org>.
(cherry picked from commit 6b4890246ddbd606484e7247bea86c238cc0a057)

11 years agos3/ldap: remove outdated netscape ds 5 schema file
Björn Jacke [Tue, 8 May 2012 12:23:33 +0000 (14:23 +0200)]
s3/ldap: remove outdated netscape ds 5 schema file

remove outdated netscape ds 5 schema file and put a README there pointing to
the FDS schema file instead. This fixes bug #8869

(commit b31f773ae1640313dc1ba86b334e9bbb9cb31bd6 in master)
(commit 9fd8692a9d066f4e469eb0668ae1f0c8b2c8db6c in v3-6-test)

11 years agoFix bug #8831 - Inconsistent (with manpage) command-line switch for "help" in smbtree
Jeremy Allison [Fri, 30 Mar 2012 19:23:07 +0000 (12:23 -0700)]
Fix bug #8831 - Inconsistent (with manpage) command-line switch for "help" in smbtree

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri Mar 30 22:59:53 CEST 2012 on sn-devel-104
(cherry picked from commit efd94d159883cb0841d8ac83223a1e63098a8d72)
(cherry picked from commit 815ba9db6f9ae405c6e8a590ee96a31cf30ba481)

11 years agoFix bug #8897 - winbind_krb5_locator only returns one IP address.
Jeremy Allison [Wed, 25 Apr 2012 22:17:09 +0000 (15:17 -0700)]
Fix bug #8897 - winbind_krb5_locator only returns one IP address.

Reported by Dina_Fine@Dell.com.

Don't ask the DC for an IP list when locating kdc's. Ask for the
name and use getaddrinfo to get all possible addresses instead.
(cherry picked from commit 56b0ec0e91f9af0eb6c109fc1cc300ad5fee3fe6)

12 years agoWHATSNEW: Start release notes for 3.5.16.
Karolin Seeger [Mon, 30 Apr 2012 18:48:52 +0000 (20:48 +0200)]
WHATSNEW: Start release notes for 3.5.16.

Karolin
(cherry picked from commit f28fea98458e0b3c3510f02b98177e8c46c12d3c)

12 years agoVERSION: Bump version number up to 3.5.16.
Karolin Seeger [Mon, 30 Apr 2012 18:46:52 +0000 (20:46 +0200)]
VERSION: Bump version number up to 3.5.16.

Karolin
(cherry picked from commit 452e5d110fa64f0e10cbce19bac0efbd5f0931e0)

12 years agoFix self granting privileges in security=ads.
Jeremy Allison [Tue, 17 Apr 2012 18:49:55 +0000 (11:49 -0700)]
Fix self granting privileges in security=ads.

CVE-2012-2111
(cherry picked from commit b1061ab00f59fdf4ebab622ab7a9c29a3aa51eee)

12 years agoWHASNEW: Release notes for 3.5.15.
Karolin Seeger [Fri, 27 Apr 2012 19:09:56 +0000 (21:09 +0200)]
WHASNEW: Release notes for 3.5.15.

Karolin
(cherry picked from commit 0b278804b1aa020e03c89e9276408dd7097bb4d2)

12 years agodocs-xml: fix default name resolve order (fix bug #7564)
Björn Baumbach [Wed, 4 Apr 2012 14:58:24 +0000 (16:58 +0200)]
docs-xml: fix default name resolve order (fix bug #7564)

Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri Apr  6 09:54:37 CEST 2012 on sn-devel-104
(cherry picked from commit 189b3d9b24bf553ff7096397c389f20ba99e0dfa)
(cherry picked from commit ad6d51892597336aa162452f3944393fa5afa7c4)

12 years agoWHATSNEW: Start release notes for Samba 3.5.15.
Karolin Seeger [Tue, 10 Apr 2012 18:26:01 +0000 (20:26 +0200)]
WHATSNEW: Start release notes for Samba 3.5.15.

Karolin
(cherry picked from commit 1cc0306c14624784a4efb3d224415279b0e49d3e)

12 years agoVERSION: Bump version up to 3.5.15.
Karolin Seeger [Tue, 10 Apr 2012 18:24:15 +0000 (20:24 +0200)]
VERSION: Bump version up to 3.5.15.

Karolin
(cherry picked from commit f6f954a821ff57b186895b057b3def9aa40c6e39)