From a4b443bbb712e3f797cdbf8e21cef83e455506bf Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Mon, 7 Aug 2017 17:12:41 -0400 Subject: [PATCH] sys-user.eclass: die if sys-user_getuid gets the wrong number of args. --- eclass/sys-user.eclass | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eclass/sys-user.eclass b/eclass/sys-user.eclass index 6c0c2b8..92c7829 100644 --- a/eclass/sys-user.eclass +++ b/eclass/sys-user.eclass @@ -9,6 +9,7 @@ # This eclass does most of the work for the sys-user/ packages that # supply system user accounts. +# Needed for egetshell and egethome inherit user EXPORT_FUNCTIONS pkg_pretend src_unpack src_configure src_compile src_install src_test pkg_preinst pkg_postinst pkg_prerm @@ -76,6 +77,8 @@ sys-user_src_compile() { :; } sys-user_src_test() { :; } sys-user_getuid() { + [[ $# -eq 1 ]] || die "usage: sys-user_getuid " + # Output the real UID of the given user, or the empty string if the # user does not exist on the system. echo $(id --real --user "${1}") -- 2.43.2