Commit Graph

83 Commits

Author SHA1 Message Date
Phil Blundell 02cc31e7fe shadow: Fix various invalid assumptions about directory layout
The makefiles in the shadow package have their own hard-coded paths
for ${base_bindir} and ${base_sbindir} (known as "bindir" and "sbindir"
in shadow-speak).  Ensure that they install into our paths rather than
their own.

Also check that ${base_bindir} and ${bindir} are different before trying
to move files from one to the other; likewise for ${base_sbindir} and
${sbindir}.

(From OE-Core rev: d4e62e164ef73b47c178edcbc2579f5358934afc)

Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-09-12 15:13:37 +01:00
Saul Wold 9ed6b34541 shadow: cleanup update-alternatives deprecated code
(From OE-Core rev: 3c9361606e458ffe3fec1eef621998ab887894c2)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-08-15 14:26:34 +01:00
Otavio Salvador 93060b69c7 shadow: use 'users' group by default
The rootfs has 'users' group at number 100 and without this fix it
would assign to a non-existent group and if a group with gid as 1000
is created later it would own all files for users created.

(From OE-Core rev: a67d77d25cbab0d88b9ff76e3f28429d4ac4f34b)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:40:45 +01:00
Otavio Salvador 92cfb88ff3 shadow-native: use 'users' group by default
The rootfs has 'users' group at number 100 and without this fix it
would assign to a non-existent group and if a group with gid as 1000
is created later it would own all files for users created.

(From OE-Core rev: e06414092c7aa4fce1173f00e610a33a0deca9cd)

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-07-26 14:40:45 +01:00
Mark Hatle 3792f77128 shadow-native: Disable nscd support
Disabling nscd support prevents error messages when shadow utilities attempt
to trigger nscd to reload.  This does nothing unless the user is root, and even
if they are root, it's the wrong action to perform when creating a target fs.

(From OE-Core rev: eb6fb917b7a6745b296c8ae0a5bf66f498bf3576)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Elizabeth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-06-08 11:43:20 +01:00
Mark Hatle e4c35790d6 shadow-utils-native: remove unnecessary alternatives
(From OE-Core rev: b1ea93143a473f006b31ab22f88baf41661971a7)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:44 +01:00
Mark Hatle 079f2fb981 shadow: use BPN for alternatives
(From OE-Core rev: 87d43530b434e5be139b845d6b96bbf2d885867d)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-30 12:04:38 +01:00
Nitin A Kamble 0d4d9bd61b shadow shadow-native: fix build with automake 1.12
(From OE-Core rev: dec7696b737e5921fcac0dbb346851e31a81537b)

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-05-25 11:17:57 +01:00
Mark Hatle f264a10d4f shadow: Use update-alternatives
Switch to using ALTERNATIVE_LINKS to ensure the update-alternatives are setup
properly, along with the package provides.

[RP: Fix links so as not to need the bbclass changes]
(From OE-Core rev: cb27e78bfc059d6878dcda8b7a27a078f7a871e4)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-26 10:05:08 +01:00
Scott Garman c54831fa89 shadow-native: disable logging to syslog
Disable use of syslog to prevent sysroot user and group additions
from writing entries to the host's syslog.

This fixes [YOCTO #2012]

(From OE-Core rev: e5aee0a2f5973a7aef81d0f38307a93791f616c6)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-04-10 13:31:59 +01:00
Richard Purdie 0f99e6ba8d shadow: Correct license Artistic -> Artistic-1.0
(From OE-Core rev: 14ae4991d8067eb047acf77b30b3abef2cecef5f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-03-13 11:45:05 +00:00
Martin Jansa 3a20beb260 shadow-sysroot: disable package creation
(From OE-Core rev: a46d80247553f5ecb68bdd3f77ec539381350399)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-24 18:04:49 +00:00
Steve Sakoman 3301dc44b2 shadow-securetty: allow root logins on usb serial gadget device
Existing tty list does not include ttyGS0, add it

(From OE-Core rev: 6ba9dc6460eb615e002e90ead0f4d5bc31856f22)

Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-02-03 17:22:12 +00:00
Richard Purdie 238a47d800 shadow-sysroot: Simplfy login.defs installation
Currently if shadow-sysroot is installed from a sstate package,
shadow_sysroot_sstate_postinst is looking in ${D} for login.defs which
isn't a valid for an install from sstate.

The easiest and most correct way to fix this is to override the standard
sysroot_stage_all function to install the files correctly and then
sstate installs work as expected. This simplifies the code as an added
bonus.

(From OE-Core rev: 6437e7315a0f2e077f9d69e4b65b48280ea8edbc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-26 20:53:16 +00:00
Richard Purdie 7c8899662b shadow: Split securetty into a separate recipe
The securetty file is machine specific whilst the rest of the shadow recipe
is not. Unfortunately making the recipce machine specific is both inefficient
and also causes dependency problems since parts of the system such as the useradd
code depend upon it and this introduces a machine specific element to sstate
checksums which should not be machine specific.

To resolve this, this patch separates out the file into a separate recipe
meaning the machine specific components are isolated.

(From OE-Core rev: 318133b5202632c6957c2aade22b1ef7af929f23)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-25 14:30:56 +00:00
Martin Jansa d10d614d01 shadow: use u-a for /usr/bin/groups
* otherwise coreutils upgrade fails with
  update-alternatives: Error: not linking //usr/bin/groups to groups.coreutils since //usr/bin/groups exists and is not a link

(From OE-Core rev: 3080f523dfe2da165dcb976676ac1dcfc77b0abc)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-01 12:20:01 +00:00
Mark Hatle af2a885c9e shadow: Generate the shadow files at rootfs construction
With the recent changes to the shadow-native package support "--root",
we can now convert the passwd/group files to their shadow forms while
doing the rootfs install, instead of waiting to run on the target.

(From OE-Core rev: 662431ace246e9bb35ad8d0ddd0510193f93517d)

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-11 11:01:07 +00:00
Saul Wold 1578058221 shadow-native: Bump PR for patch update
(From OE-Core rev: 2ab1a60c44898198bf3049dc1f987dc5e597552f)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-14 13:18:12 +01:00
Julian Pidancet 73abadd43e Fix the --root option in shadow-native programs
The add_root_cmd_options.patch that we apply to shadow-native allow the
various programs from the shadow utility package to chroot() so they can
be used to modify etc/passwd and etc/group if they are located in a
sysroot.

Some of the shadow programs (gpasswd, useradd and usermod) need to parse
the command line in two passes. But we can't use getopt_long() twice
because getopt_long() reorders the command line arguments, and
consequently corrupts the option parsing during the second pass.

This patch fixes this issue by replacing the first pass by a very simple
manual walk of the command line to handle the --root argument.

This change is a patch of another patch, I apologize if it is
difficult to read. But IMHO it wouldn't make sense to put the patch for
this issue in another separated file.

The --root options in groupadd and useradd are needed to make the
useradd class work, and this issue was preventing to use useradd and
groupadd long options while using the class.

(From OE-Core rev: 6e9e19b18597103d8fe09f258cfd9904bb5f1c27)

Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-10-10 10:00:08 +01:00
Phil Blundell acf62d33d0 shadow: add patch for useradd lossage
This fixes (or, at least, papers over) a failure in do_install for recipes which
inherit useradd.bbclass.  Rewinding optind in this way is not entirely portable
but in practice it seems to work on GNU-ish build hosts at least.

(From OE-Core rev: 8fce8180c802ad187c4df44c17207bfb026ce6c7)

Signed-off-by: Phil Blundell <philb@gnu.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-09 18:42:55 +01:00
Zhai Edwin 7a27253f56 shadow: Fix rpm failed dependencies when install
There are some links become invalid after rename, so that failed dependencies
detected when install rpm package. This commit update links to resolve it.

[YOCTO #1158] got fixed.

(From OE-Core rev: 48ec20d1331eb665d9fc1a06bdb1ea79e4513159)

Signed-off-by: Zhai Edwin <edwin.zhai@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-31 19:59:59 +01:00
Joshua Lock 5ab332a205 shadow: switch to a fetchable SRC_URI
Swith the SRC_URI to the one referenced on the sources section of the
utilities download page (http://pkg-shadow.alioth.debian.org/download.php).

(From OE-Core rev: c8cdfcd2fe06593d8523b94c33920a607429004a)

Signed-off-by: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-08-17 15:56:06 +01:00
Kang Kai 7772a8893d shadow: update pam related configure files
add shadow-update-pam-conf.patch to update the pam related configure files
in oe way rather than Fedora.

(From OE-Core rev: 10e6fdd7e8fed5733f65a504148bba54bccb3c48)

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-27 12:02:42 +01:00
Richard Purdie 8511d1ec1b Drop PRIORITY variable
As discussed on the mailing list, this variable isn't useful and if wanted
would be better implemented by distros using pn-X overrides.

This patch executes:

find . -regex ".*\.\(bb\|inc\)$" | xargs sed -i '/^PRIORITY = ".*"$/d'

against the tree removing the referenced. Thanks to Phil Blundell for
the command.

(From OE-Core rev: d122343362669c683acc4af295971a62cbc823fc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-07-01 23:27:29 +01:00
Scott Garman 5c7d37c51c shadow-native: fix creation of home directories
Pseudo was recently changed so that when system() calls are
made after a chroot(), the host binaries can no longer be found,
breaking the system("mkdir -p") approach when useradd creates
home directories.

Instead, use mkdir(2) to create home directories with a helper
function to ensure parent directories get created.

(From OE-Core rev: 7d4099a964ec79b1ac4cf5348cf9f4221c3d4908)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-30 20:57:07 +01:00
Scott Garman c82a1b111d shadow-sysroot: new recipe for useradd.bbclass support
Packaging login.defs with base-passwd causes problems due to the
file being included in target package installs. Instead, this
shadow-sysroot recipe can be used by useradd.bbclass to put
login.defs into the target sysroot without disturbing packages
intended for target devices.

(From OE-Core rev: 6cbf741d73070759ecb9a284e6511c63d945f7c1)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-28 13:55:40 +01:00
Scott Garman 20ef3425b2 shadow: add a -native recipe with customized utilities
This adds a -native recipe for the shadow utilities.

The custom --root option allows the the following utilities to be
run within a chroot when invoked under pseudo:

* useradd
* groupadd
* usermod
* groupmod
* userdel
* groupdel
* passwd
* gpasswd
* pwconv
* pwunconv
* grpconv
* grpunconv

They can then be used to manipulate user and group account information
in target sysroots.

useradd was also modified to create home directories recursively when
necessary.

(From OE-Core rev: 37b8c18a3c2f3e77a9810a56a8ee786855ae1ba3)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-06 15:58:41 +01:00
Scott Garman 109aa5c860 shadow: recipe and patch cleanup
Taking over maintenance of the shadow recipe. Cleaning it up in
preparation of adding a -native version that will be used to add
users/groups during preinstall.

(From OE-Core rev: 254ca8c1667b8d35914555714239a09bfb4f43be)

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-06 15:58:41 +01:00
Koen Kooi 08bac9fb25 shadow: remove selinux entry from pam.d/login
SElinux has been disabled in the recipe, leading to messages like this:

[  167.643218] login[312]: PAM unable to dlopen(/lib/security/pam_selinux.so): /lib/security/pam_selinux.so: cannot open shared object file: No such file or directory
[  167.670837] login[312]: PAM adding faulty module: /lib/security/pam_selinux.so

(From OE-Core rev: b90e9c2318fc421f37c57788ece54ce791a90b62)

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-02 14:55:54 +01:00
Yu Ke f3a482b476 shadow: upgrade to 4.1.4.3 to fix security vulnerability
For CVE-2011-0721: http://lists.debian.org/debian-security-announce/2011/msg00030.html

Signed-off-by: Yu Ke <ke.yu@intel.com>
2011-03-01 07:27:31 -08:00
Koen Kooi 0e8f0f0a03 RDEPENDS, RRECOMMENDS -> RDPEPENDS_${PN}, RRECOMMENDS_${PN}
For these recipes the dependencies listed in RDEPENDS and RRECOMMENDS only apply to ${PN}

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-30 10:03:10 +00:00
Saul Wold 3d08b9f2c6 SRC_URI Checksums Additionals
Signed-off-by: Saul Wold <sgw@linux.intel.com>
2010-12-09 08:18:17 -08:00
Richard Purdie 29d6678fd5 Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things
and is generally overwhelming. This commit splits it into several
logical sections roughly based on function, recipes.txt gives more
information about the classifications used.

The opportunity is also used to switch from "packages" to "recipes"
as used in OpenEmbedded as the term "packages" can be confusing to
people and has many different meanings.

Not all recipes have been classified yet, this is just a first pass
at separating things out. Some packages are moved to meta-extras as
they're no longer actively used or maintained.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-08-27 15:29:45 +01:00