summaryrefslogtreecommitdiffstats
path: root/meta/classes/extrausers.bbclass
Commit message (Collapse)AuthorAgeFilesLines
* classes: Drop ';' delimiter from ROOTFS/IMAGE*COMMAND variablesRichard Purdie2023-09-091-1/+1
| | | | | | | | | | | | | Originally these were shell functions but they have long since been processed by bb.build.exec_func(). Since we no longer need shell syntax, we can drop the ';' delimiters and just use a space separated string. This cleans up the variable and quietly removes any stray ';' that do happen to still make it in. (From OE-Core rev: c3365dfd9ddd7fbe70b62e0f11166e57a8ca6f73) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Add SPDX license identifiersRichard Purdie2022-08-121-0/+2
| | | | | | | | | | | | As stated in our top level license files, the license is MIT unless otherwise stated. Add SPDX identifers accordingly. Replace older license statementa with the standardised syntax. Also drop "All Rights Reserved" expression as it isn't used now, doesn't mean anything and is confusing. (From OE-Core rev: 081a391fe09a21265881e39a2a496e4e10b4f80b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes: Add copyright statements to files without oneRichard Purdie2022-08-121-0/+4
| | | | | | | | | Where there isn't a copyright statement, add one to make it explicit. Also drop editor config lines where they were present. (From OE-Core rev: 880c1ea3edc8edef974e65b2d424fc36809ea034) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Convert to new override syntaxRichard Purdie2021-08-021-2/+2
| | | | | | | | | | | | This is the result of automated script conversion: scripts/contrib/convert-overrides.py <oe-core directory> converting the metadata to use ":" as the override character instead of "_". (From OE-Core rev: 42344347be29f0997cc2f7636d9603b1fe1875ae) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* add new extrausers command passwd-expireJoseph Reynolds2020-11-111-0/+3
| | | | | | | | | | | | | | | | | | | | This enhances extrausers with a new passwd-expire command that causes a local user's password to be expired as if the `passwd --expire` command was run, so the password needs to be changed on initial login. Example: EXTRA_USERS_PARAMS += " useradd ... USER; passwd-expire USER;" Tested: on useradd accounts When configured with Linux-PAM, console login prompts for and can successfully change the password. OpenSSH server works. Dropbear SSH server notes the password must be changed but does not offer a password change dialog and rejects the login request. (From OE-Core rev: 1bdcfa4b0d378947a6759fb91872a4edc9a42622) Signed-off-by: Joseph Reynolds <joseph-reynolds@charter.net> Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* extrausers.bbclass: Suggest to use IMAGE_CLASSES rather than INHERITPeter Kjellerstedt2019-01-181-9/+8
| | | | | | | | | | | | | Since this class is only useful for image recipes, it is better to suggest adding it via IMAGE_CLASSES instead of INHERIT in the example. Also make the example a bit more readable by indenting the variable values. (From OE-Core rev: ee91a464f2cad6b3801e18fee28e639e1c957d41) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* extrausers: Use static ids when availableDavid Vincent2017-01-191-0/+4
| | | | | | | | | | | | | When creating users at the image level using extrausers class, the current behavior is to ignore the status of USERADDEXTENSION. This could lead to undefined behavior when static ids are expected but the system falls back to dynamic ones. (From OE-Core rev: 331140e892f84b70bced44a0b5d14f32ec95042e) Signed-off-by: David Vincent <freesilicon@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta: remove True option to getVar callsJoshua Lock2016-12-161-1/+1
| | | | | | | | | | | | | getVar() now defaults to expanding by default, thus remove the True option from getVar() calls with a regex search and replace. Search made with the following regex: getVar ?\(( ?[^,()]*), True\) (From OE-Core rev: 7c552996597faaee2fbee185b250c0ee30ea3b5f) Signed-off-by: Joshua Lock <joshua.g.lock@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* extrausers.bbclass: Use PACKAGE_INSTALL instead of IMAGE_INSTALLJackie Huang2016-12-161-1/+1
| | | | | | | | | | | | | | | | | The initramfs image recipes changed to use PACKAGE_INSTALL so they will not be affected by IMAGE_INSTALL, and will cause error when inherit extrausers: | ERROR: core-image-minimal-initramfs-1.0-r0 do_rootfs: core-image-minimal-initramfs: usermod command did not succeed. So use PACKAGE_INSTALL as well in extrausers.bbclass to fix it. (From OE-Core rev: fa541362e2d2cc0494a86a413b7b52dfe3eee908) Signed-off-by: Jackie Huang <jackie.huang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* extrausers.bbclass: drop retry count for perform_user/group* callsMark Asselstine2016-04-091-6/+6
| | | | | | | | | | | | Commit 2ebf697b46c42cee8bfa6d2e6087397f8cce385c [useradd_base.bbclass: replace retry logic with flock] dropped the 3rd (retry) parameter for these functions. These are simply being ignored now but we should remove the retry count to avoid confusion. (From OE-Core rev: 4ec99da681a6cd164ae177554b23c4fdf2194e2a) Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* extrausers.bbclass: avoid infinite loopChen Qi2013-11-061-0/+4
| | | | | | | | | | | | | | | | | | | | Avoid infinite loop if the last record in EXTRA_USRES_PARAMS doesn't end with a semicolon. It's possible the the users will write configurations like below. INHERIT += "extrausers" EXTRA_USERS_PARAMS = "useradd tester; useradd developer" In such situation, the do_rootfs task will enter an infinite loop. An infinite loop is never acceptable. This patch fixes the above problem. (From OE-Core rev: bf4fb345a9db306fa4c7211b7e6795334a649dd5) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* extrausers.bbclass: add a new bbclassChen Qi2013-07-241-0/+61
This class is dedicated to image level user/group configuration. It inherits useradd_base.bbclass. Users need to inherit this class in their layers or local.conf to make the setting of EXTRA_USERS_PARAMS effective. For detailed configuration format of EXTRA_USERS_PARAMS, please refer to local.conf.sample.extended. [YOCTO #4074] (From OE-Core rev: 4b6deb521183b728d9a1c651d4805fe635e6cb50) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>