diff options
author | Adam Johnston <adam.johnston@arm.com> | 2023-11-21 19:05:28 +0000 |
---|---|---|
committer | Steve Sakoman <steve@sakoman.com> | 2024-01-04 04:09:43 -1000 |
commit | dc33087410ae71ca6e2d4ac63ff4c948ac78d495 (patch) | |
tree | ebe1eecc92669e3bcd02b00c137a70b46be11784 | |
parent | 713b5d5803c4b8c5b69fc809db6330ac9fbba1b3 (diff) | |
download | poky-dc33087410ae71ca6e2d4ac63ff4c948ac78d495.tar.gz |
useradd_base: Fix sed command line for passwd-expire
A previous commit tried to add the --follow-symlinks option to
the perform_passwd_expire function in useradd_base.bbclass, however it used
a single -.
This is interpreted as --file=ollow-symlinks which results in...
sed: couldn't open file ollow-symlinks: No such file or directory
and...
ERROR: <image name>: passwd --expire operation did not succeed.
Fix by adding the missing -
(From OE-Core rev: 67721b71bf677097645b9150a31ac833125c0c23)
Signed-off-by: Adam Johnston <adam.johnston@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 3c0deafcfcea3f610c7dd9a2d2884a16fbfe0497)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r-- | meta/classes/useradd_base.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/useradd_base.bbclass b/meta/classes/useradd_base.bbclass index f1a7a9695d..5e1c699118 100644 --- a/meta/classes/useradd_base.bbclass +++ b/meta/classes/useradd_base.bbclass | |||
@@ -160,7 +160,7 @@ perform_passwd_expire () { | |||
160 | local username=`echo "$opts" | awk '{ print $NF }'` | 160 | local username=`echo "$opts" | awk '{ print $NF }'` |
161 | local user_exists="`grep "^$username:" $rootdir/etc/passwd || true`" | 161 | local user_exists="`grep "^$username:" $rootdir/etc/passwd || true`" |
162 | if test "x$user_exists" != "x"; then | 162 | if test "x$user_exists" != "x"; then |
163 | eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO sed -follow-symlinks -i \''s/^\('$username':[^:]*\):[^:]*:/\1:0:/'\' $rootdir/etc/shadow \" || true | 163 | eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO sed --follow-symlinks -i \''s/^\('$username':[^:]*\):[^:]*:/\1:0:/'\' $rootdir/etc/shadow \" || true |
164 | local passwd_lastchanged="`grep "^$username:" $rootdir/etc/shadow | cut -d: -f3`" | 164 | local passwd_lastchanged="`grep "^$username:" $rootdir/etc/shadow | cut -d: -f3`" |
165 | if test "x$passwd_lastchanged" != "x0"; then | 165 | if test "x$passwd_lastchanged" != "x0"; then |
166 | bbfatal "${PN}: passwd --expire operation did not succeed." | 166 | bbfatal "${PN}: passwd --expire operation did not succeed." |