Commit Graph

61 Commits

Author SHA1 Message Date
Kai Kang
3562b0f44a samba: 4.6.5 -> 4.6.7
Upgrade samba from 4.6.5 to 4.6.7 to fix CVE-2017-11103.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-09-12 10:55:06 -04:00
Johannes Pointner
88885fc01a samba: upgrade to 4.6.5
This includes a security fix that adresses the following defect:
CVE-2017-7494 (Remote code execution from a writable share)

* Detail release note:
  - https://www.samba.org/samba/history/samba-4.6.5.html

* Remove 00-fix-typos-in-man-pages.patch which has been fixed
  upstream a long time ago

Signed-off-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-06-28 10:28:27 -04:00
Khem Raj
91d77d978f samba: Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-06-28 10:27:52 -04:00
Khem Raj
d16352e9b4 samba: Upgrade to 4.6.2
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-04-25 16:10:55 -04:00
Szombathelyi György
81efffcc22 samba: fix conflict between samba and sudo packages
Use the same permissions for sudoers.d as in the sudo package.

Signed-off-by: Gyorgy Szombathelyi <gyurco@freemail.hu>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-04-25 15:55:38 -04:00
Szombathelyi György
de05464e96 samba: update tevent_internal.h
Update the tevent_internal.h file to the same version
as the current OpenEmbedded recipe version, otherwise
nmbd will segfault immediately at start, and strange
crashes occurs with smbd. Samba uses this internal
libtevent header file, and it is crucial to match
this file to the external libtevent.

Signed-off-by: Gyorgy Szombathelyi <gyurco@freemail.hu>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-03-24 14:10:17 -04:00
Peter Kjellerstedt
0c31f55bcf Make use of the new bb.utils.filter() function
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-03-07 13:30:26 +01:00
Joe MacDonald
a868418132 Revert "Samba: use built-in libtevent"
This reverts commit cd366899ed.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-02-24 21:01:03 -05:00
Szombathelyi György
cd366899ed Samba: use built-in libtevent
Since Samba uses libtevent-internal.h in some places, it is
incompatible with external libtevent versions if they're not
the same as the built-in, and just crashes.

Signed-off-by: Gyorgy Szombathelyi <gyurco@freemail.hu>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2017-02-22 08:31:59 -05:00
Andreas Oberritter
9beb04e98d waf-samba.bbclass: fix build error with PARALLEL_MAKE="-j X -l Y"
Waf doesn't handle -l. Use a function already provided by waf.bbclass
in OE-Core. Inheriting waf.bbclass also makes overriding DISABLE_STATIC
redundant, so drop it from recipes inheriting waf-samba.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-01-19 09:26:15 +01:00
Andreas Oberritter
cc32689a5b samba: conditionalize sed call for onnode
| sed: can't read .../4.4.5-r0/image/usr/bin/onnode: No such file or directory

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2017-01-19 09:26:15 +01:00
Andreas Oberritter
380f0cef36 samba: simplify LSB handling
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-17 10:57:42 -05:00
Andreas Oberritter
cb9e340867 samba: start on boot with systemd
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-17 10:57:41 -05:00
Andreas Oberritter
8b61539ea0 samba: move /etc/sysconfig to more common /etc/default, package tmpfiles.d in samba-common
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-17 10:57:41 -05:00
Andreas Oberritter
8f2c04b9a1 samba: add packages samba-dsdb-modules, samba-testsuite and registry-tools
Inspired by Debian.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-17 10:57:41 -05:00
Andreas Oberritter
264430e380 samba: split libraries into their own packages
It's quite hard to track library dependencies manually between
releases. Splitting libraries into their own packages creates
some overhead but effectively uses less storage in minimal
installations.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-17 10:57:36 -05:00
Andreas Oberritter
21c63e1b99 samba: simplify files list for samba-python
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-17 10:54:43 -05:00
Andreas Oberritter
07f20aebde samba: install manpages
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-17 10:54:43 -05:00
Andreas Oberritter
2245e52933 samba: add smbclient package
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-17 10:54:38 -05:00
Andreas Oberritter
505b35c89b samba: install systemd units and initscripts unconditionally
Fixes hybrid systemd/sysvinit setups.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-16 20:47:13 -05:00
Andreas Oberritter
d491c0bcf3 samba: rename initscript from 'samba.sh' to more common 'samba'
This gets masked automatically by samba.service if systemd is running.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-16 20:46:05 -05:00
Andreas Oberritter
28b8edc760 samba: install all systemd unit files
This includes samba.service, which other major distributions install, too.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-14 09:20:11 -05:00
Andreas Oberritter
38279b4a5a samba: remove superflous listing of pam_smbpass.so
EXTRA_OECONF includes --with-pammodulesdir=${base_libdir}/security
when pam is enabled.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-14 09:20:11 -05:00
Andreas Oberritter
f38245280b samba: use systemd_system_unitdir variable
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-14 09:20:11 -05:00
Andreas Oberritter
9ecd97eba1 samba: remove unneeded conditionals for sysvinit and systemd
systemd.bbclass takes care of deleting unused startup scripts.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-14 09:20:11 -05:00
Andreas Oberritter
78fa7f8d1c samba: use default packaging rules for -dbg and -dev packages
There's no need to create multiple packages.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-14 09:20:11 -05:00
Andreas Oberritter
bb2cbb965a samba: Avoid timeout for nmbd if started offline with systemd
If no network connection appears within DefaultTimeoutStartSec
(~ 90s) after startup, nmbd fails to notify systemd and will
therefore get killed.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-14 09:20:11 -05:00
Jackie Huang
1aedb972bc samba: fix the hardcoded path in init script
Replace the hardcoded path with base_bindir in init
script to fix the error:
/etc/init.d/samba.sh: line 15: /usr/bin/ps: No such file or directory
/etc/init.d/samba.sh: line 17: /usr/bin/sed: No such file or directory
/etc/init.d/samba.sh: line 16: /usr/bin/grep: No such file or directory

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-14 09:20:10 -05:00
Kai Kang
8f92aa970a samba: correct sub-package name for multilib
The name of sub-package lib${PN}-base is not right when extended by
multilib. Correct it by replace ${PN} with ${BPN}.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-14 09:20:09 -05:00
Kai Kang
42dd4ee1b3 samba: Fix qa issue and update ctdb-tests
Fix file-rdeps QA warning by replace shell interpreter of script
${bindir}/onnode with /bin/sh that it doesn't has any bashism.

File ${bindir}/ctdb_run_cluster_tests which is a link to
${bindir}/ctdb_run_tests is split into package samba. That causes wrong
runtime dependency that samba depends on samba-ctdb-tests. Split the
file to samba-ctdb-tests to fix the issue.

Script ctdb_run_tests calls command 'getopt', so add runtime dependency
util-linux-getopt. Install config file and test cases for
samba-ctdt-tests at same time.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-14 09:20:09 -05:00
Khem Raj
ef1c823a3f samba: Fix build with musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-12-14 09:20:09 -05:00
Andreas Müller
a95726df4b samba: replace pam packageconfig by hard dependency
samba links against libpam even if pam is not in packageconfig and libpam was
built before. This patch avoid this floating dependency - other solution could
not be found. For those who want packageconfig back, see discussion iat [1] for
further inspiration.

[1] http://lists.openembedded.org/pipermail/openembedded-devel/2016-September/109143.html

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-10-20 10:25:49 -04:00
Joe MacDonald
3fdfdd8ff4 samba: un-blacklist
Commit b60c60806e resolves the linking
issue, later commits (mainly 12a1189892)
resolve the packaging issue, so re-enable samba for everyone.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-10-20 09:32:05 -04:00
Andreas Müller
b60c60806e samba: fix build by linking with bfd instead of gold
Use this workaround as long as there is no better (upstream) fix

Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-12 10:43:37 -04:00
Mingli Yu
b4b6465fe3 samba: fix to package pidl in samba-pidl
* Use =+ to replace the previous += to let samba-pidl
  do package before samba to guarantee the file /usr/bin/pidl
  packaged in samba-pidl as both samba and samba-pidl have
  rules to package /usr/bin/pidl and the command pidl depends
  on perl modules such as Parse/Pidl.pm resides in samba-pidl

Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-12 10:43:37 -04:00
Martin Jansa
80b2d4de0e samba: blacklist, fails to build with new binutils-2.27
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-09-05 13:34:13 -04:00
Jackie Huang
35326fa74d samba: upgrade to 4.4.5
* This is a security release in order to address the following defect:
  - CVE-2016-2119 (Client side SMB2/3 required signing can be downgraded)

* Detail release note:
  - https://www.samba.org/samba/history/samba-4.4.5.html

* Removed part of the 10-use-only-libsystemd.patch
  which has been fixed in new version.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-08-16 21:26:12 -04:00
Robert Yang
74d994ed27 samba: remove ${localstatedir}/log
Fixed do_package error:
WARNING: samba-4.4.2-r0 do_package: FILES contains file '/var/log/samba' which resides under a directory symlink. Please fix the recipe and use the real path for the file.
ERROR: samba-4.4.2-r0 do_package: File './var/log/samba' cannot be packaged into 'samba-base' because its parent directory structure does not exist. One of its parent directories is a symlink whose target directory is not included in the package.
ERROR: samba-4.4.2-r0 do_package: Function failed: populate_packages

It has a file ${sysconfdir}/tmpfiles.d/samba.conf which will create
/var/log/samba when systemd, and volatiles.03_samba when sysvinit.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-08-16 21:26:11 -04:00
Jackie Huang
32a6fd48ab samba: inherit update-rc.d to manage init script
inherit update-rc.d to manage init script, so we
can avoid duplicating the update-rc.d commands,
and the default behavior can be easily overridden
by distro.

Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-08-05 09:13:17 -04:00
Szombathelyi György
b6e805c83e Samba: use only libsystemd
This patch was disappeared while moved to 4.4.2

Signed-off-by: Gyorgy Szombathelyi <gyurco@freemail.hu>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-07-07 09:51:27 -04:00
Ross Burton
275b6c30fb meta-networking: use bb.utils.contains() instead of base_contains()
base_contains() is a compatibility wrapper and may warn in the future, so
replace all instances with bb.utils.contains().

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-05-05 11:41:28 -04:00
Mark Asselstine
f59daf6caa samba: remove dependency on ctdb
During rootfs creation the following error is being hit

  Preparing...         ######################################## [  0%]
  warning: Removing ctdb-2.5.1-r0@core2_64 due to file /usr/bin/ctdb
  conflicting with samba-4.4.2-r0@core2_64
  error: ctdb-dev-2.5.1-r0 conflicts with ctdb = 2.5.1-r0

Looking at the relationship between samba and ctdb it appears that the
landscape has changed some starting in version 4.2. Samba now includes
and installs ctdb instead of relying on stand-alone ctdb. Referencing
https://wiki.samba.org/index.php/CTDB_Setup we see this activated by
'--with-cluster-support' which we do pass to configure based on the
bb.

Dropping the DEPENDS on ctdb resolves this issue.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-05-05 11:41:28 -04:00
Richard Leitner
aa8e156d56 samba: fix paths in sysv initscript
The sysv initscript provided by samba assumes smbd and nmbd are
installed in /opt/samba/bin/. In our case both binaries are installed to
/usr/sbin/ by default. Therefore fix these paths.

Furthermore fix the log and config directory as well as the name of the
initscript in its usage text.

Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-04-29 10:51:41 -04:00
Armin Kuster
ffeb84e9ac samba: fix QA warnings.
V2:
Fix
WARN: samba: samba rdepends on libarchive, but it isn't a build dependency?

V1:
WARNING: samba-4.4.2-r0 do_package_qa: QA Issue: samba rdepends on libaio, but it isn't a build dependency, missing libaio in DEPENDS or PACKAGECONFIG? [build-deps]
WARNING: samba-4.4.2-r0 do_package_qa: QA Issue: samba rdepends on lttng-ust, but it isn't a build dependency, missing lttng-ust in DEPENDS or PACKAGECONFIG? [build-deps]

Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-04-29 10:46:58 -04:00
Johannes Pointner
12e31ce9d6 samba: add volatile file to support readonly rootfs
This patch adds a volatile file for samba which was removed by the
update from 3.6.25 to 4.1.12. This file is necessary to build a image
that uses the read-only-rootfs feature.

Signed-off-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-04-20 15:10:44 -04:00
Joe MacDonald
70bde9acce samba: Update to latest stable
The previous version of Samba had many critical security updates that
would've required significant backporting effort.  Update to the latest
stable release instead.

Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
2016-04-20 08:55:27 -04:00
mike.looijmans@topic.nl
b1883d2cdc samba: Fix typo in PACKAGECONFIG for "acl" and "aio"
There's a "-" too many in PACKAGECONFIG[acl] and PACKAGECONFIG[aio]
resulting in errors like this if built without acl:
  waf: error: no such option: ---without-acl-support

Remove the extra "-" to fix the issue.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-02-29 16:23:35 -05:00
Kai Kang
038a0031a4 samba: update systemd service files
Update systemd service files of samba. There are no '@BASE_BINDIR@' and
'@SBINDIR@' in these service files, so drop the original replacement.
Command kill is installed to /bin/kill, then correct in the service files.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-02-29 16:23:34 -05:00
Joe MacDonald
cce08ed6f7 samba: Fix build when static libs disabled
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-02-22 19:49:46 -05:00
Stephano Cetola
3c2c8491ed fix missing packageconfig for samba with sysvinit
Building samba with sysvinit currently throws a QA warning about
"invalid PACKAGECONFIG: sysv". This fixes that issue.

Signed-off-by: Stephano Cetola <stephanoc@gmail.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
2016-02-22 15:49:40 -05:00