]> code.ossystems Code Review - openembedded-core.git/commitdiff
useradd-staticids.bbclass: Always fail/warn for missing IDs
authorPeter Kjellerstedt <peter.kjellerstedt@axis.com>
Wed, 15 Mar 2017 00:27:14 +0000 (01:27 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 21 Mar 2017 22:43:00 +0000 (22:43 +0000)
Previously, with USERADD_ERROR_DYNAMIC set to error/warn, if a static
UID/GID was specified in the recipe, then no error/warning would be
issued even if no ID was specified in the passwd/groups files.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/useradd-staticids.bbclass

index 9b194df490c7bcda1b5c11df7fdcd83c3056a4fe..c156a12ee50e30635c422a2ffe2ee6f86521e7aa 100644 (file)
@@ -123,8 +123,7 @@ def update_useradd_static_config(d):
                 users = merge_files(get_passwd_list(d), 7)
 
             if uaargs.LOGIN not in users:
-                if not uaargs.uid or not uaargs.uid.isdigit() or not uaargs.gid:
-                    handle_missing_id(uaargs.LOGIN, 'user', pkg)
+                handle_missing_id(uaargs.LOGIN, 'user', pkg)
                 newparams.append(param)
                 continue
 
@@ -259,8 +258,7 @@ def update_useradd_static_config(d):
                 groups = merge_files(get_group_list(d), 4)
 
             if gaargs.GROUP not in groups:
-                if not gaargs.gid or not gaargs.gid.isdigit():
-                    handle_missing_id(gaargs.GROUP, 'group', pkg)
+                handle_missing_id(gaargs.GROUP, 'group', pkg)
                 newparams.append(param)
                 continue