semodule_package: fix wrong variable in error message
PATCH v2 1/1 semodule_package: fix wrong variable in error message
Use 'outfile' instead of 'argv[1]' in the error message for sepol_module_package_write() failure. argv[1] does not reliably reflect the output filename since argument order is not fixed.
Signed-off-by Mustafa <[email protected]>
--- semodule-utils/semodule_package/semodule_package.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
semodule-utils/semodule_package/semodule_package.c +1 -1
@@ -266,7 +266,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; }
Signature · 1 line
2.53.0
Quoted 6 lines · Mustafa
Use 'outfile' instead of 'argv[1]' in the error message for
sepol_module_package_write()failure. argv[1] does not reliably reflect the output filename since argument order is not fixed.Signed-off-by Mustafa <[email protected]>
For the Signed-off-by, we need your legal name and email address. Thanks,
Jim
Quoted 21 lines
--- semodule-utils/semodule_package/semodule_package.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)semodule-utils/semodule_package/semodule_package.c +1
-2@@ -266,7 +266,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.53.0