summaryrefslogtreecommitdiffstats
path: root/meta/classes/useradd_base.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes/useradd_base.bbclass')
-rw-r--r--meta/classes/useradd_base.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes/useradd_base.bbclass b/meta/classes/useradd_base.bbclass
index 7f5b9b7219..5e1c699118 100644
--- a/meta/classes/useradd_base.bbclass
+++ b/meta/classes/useradd_base.bbclass
@@ -1,3 +1,9 @@
1#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
1# This bbclass provides basic functionality for user/group settings. 7# This bbclass provides basic functionality for user/group settings.
2# This bbclass is intended to be inherited by useradd.bbclass and 8# This bbclass is intended to be inherited by useradd.bbclass and
3# extrausers.bbclass. 9# extrausers.bbclass.
@@ -154,7 +160,7 @@ perform_passwd_expire () {
154 local username=`echo "$opts" | awk '{ print $NF }'` 160 local username=`echo "$opts" | awk '{ print $NF }'`
155 local user_exists="`grep "^$username:" $rootdir/etc/passwd || true`" 161 local user_exists="`grep "^$username:" $rootdir/etc/passwd || true`"
156 if test "x$user_exists" != "x"; then 162 if test "x$user_exists" != "x"; then
157 eval flock -x $rootdir${sysconfdir} -c \"$PSEUDO sed -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
158 local passwd_lastchanged="`grep "^$username:" $rootdir/etc/shadow | cut -d: -f3`" 164 local passwd_lastchanged="`grep "^$username:" $rootdir/etc/shadow | cut -d: -f3`"
159 if test "x$passwd_lastchanged" != "x0"; then 165 if test "x$passwd_lastchanged" != "x0"; then
160 bbfatal "${PN}: passwd --expire operation did not succeed." 166 bbfatal "${PN}: passwd --expire operation did not succeed."