diff options
author | Julian Pidancet <julian.pidancet@gmail.com> | 2011-10-07 01:13:40 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-10-10 09:54:02 +0100 |
commit | 6e9e19b18597103d8fe09f258cfd9904bb5f1c27 (patch) | |
tree | 97c2013d02b32bb4c1d826261a4eb2cae535e36c /meta/files/common-licenses/SAX-PD | |
parent | 3b1346c607c41a2d592c48594457c32153cb2314 (diff) | |
download | openembedded-core-6e9e19b18597103d8fe09f258cfd9904bb5f1c27.tar.gz openembedded-core-6e9e19b18597103d8fe09f258cfd9904bb5f1c27.tar.bz2 openembedded-core-6e9e19b18597103d8fe09f258cfd9904bb5f1c27.tar.xz openembedded-core-6e9e19b18597103d8fe09f258cfd9904bb5f1c27.zip |
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.
Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/files/common-licenses/SAX-PD')
0 files changed, 0 insertions, 0 deletions