Commit Graph

17 Commits

Author SHA1 Message Date
Roy.Li 78de8222d6 shadow: backport a patch to make newgrp work
Backport a Debian patch to fix the reading of the
gshadow file in order to make newgrp work correctly.

(From OE-Core rev: 3ef8db6217f7c40a9eb063d21ce6f25b16d88d53)

Signed-off-by: Roy.Li <rongqing.li@windriver.com>

[sgw - tweaked commit message]
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-08-22 18:30:02 +01:00
Mikhail Durnev 1f7647c197 shadow-native: Add --root option in groupmems
Patch add_root_cmd_groupmems.patch that we apply to shadow-native
    allows program groupmems from the shadow utility package to chroot()
    so it can be used to modify etc/passwd and etc/group if they are
    located in a sysroot.

    The --root option in groupmems is needed for class useradd.

(From OE-Core rev: ae7aa0ef68372c15224c0c518cb90ba7350137b4)

Signed-off-by: Mikhail Durnev <mikhail_durnev@mentor.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-06-28 09:14:07 +01:00
Saul Wold 216d701c01 shadow: add patch to fix crypt: Invalid Argument
This patch came from Slackware and address a change in crypt()'s handling
of an invalid seed, which in the past returned an encrypted string and now
returns a NULL.

[YOCTO #4097] related to tinylogin segfault

(From OE-Core rev: a7f7e6da8383b4bde6d8ce951e5c3c955073c0bd)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-04-05 18:21:31 +01:00
Martin Donnelly cef8f6b6c6 shadow: remove grpconv argc check
The patched version of grpconv takes arguments but the check on
argc was not removed. This patch removes this check which
otherwise results in a spurious warning during rootfs creation.

(From OE-Core rev: 845a24e78835e93807cfb810fa99715ac4d14e21)

Signed-off-by: Martin Donnelly <martin.donnelly@ge.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-03-01 13:03:28 +00:00
Marcin Juszkiewicz 6309eea2a8 shadow-securetty: add ARM AMBA serial ports
(From OE-Core rev: 77cc57b88a7377e40361428dba52cf35fb7e9e58)

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 12:50:46 +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
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
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
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
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
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