Re: [PATCH] semodule-utils/semodule_package: report the output filename on write errors

Stephen Smalley <[email protected]> Tue, 21 Jul 2026 08:50:41 -0400
Newsgroups org.kernel.vger.selinux
Message-ID <CAEjxPJ61+jnsd7L9rMkZPRw5PAfVLFFLgrvSPL08cTJQw2QfyA@mail.gmail.com>
On Thu, Jul 16, 2026 at 10:49 AM Stephen Smalley
<[email protected]> wrote:
>
> The error message reported argv[1] for the output filename, but this
> may be incorrect depending on option ordering. Use outfile instead.
>
> Signed-off-by: Stephen Smalley <[email protected]>

Merged.

> ---
>  semodule-utils/semodule_package/semodule_package.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/semodule-utils/semodule_package/semodule_package.c b/semodule-utils/semodule_package/semodule_package.c
> index fa50a80a..c2bc49fd 100644
> --- a/semodule-utils/semodule_package/semodule_package.c
> +++ b/semodule-utils/semodule_package/semodule_package.c
> @@ -285,7 +285,7 @@ int main(int argc, char **argv)
>         if (sepol_module_package_write(pkg, out)) {
>                 fprintf(stderr,
>                         "%s:  Error while writing module package to %s\n",
> -                       argv[0], argv[1]);
> +                       argv[0], outfile);
>                 goto failure;
>         }
>
> --
> 2.55.0
>