semodule-utils/semodule_package: report the output filename on write errors
Stephen Smalley
maintainerPATCH 1/1 semodule-utils/semodule_package: report the output filename on write errors
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]>
--- semodule-utils/semodule_package/semodule_package.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
semodule-utils/semodule_package/semodule_package.c +1 -1
@@ -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; }
Signature · 1 line
2.55.0
Stephen Smalley
maintainerQuoted 5 lines · Stephen Smalley
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.
Quoted 20 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@@ -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