Fix semodule option handling
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
semodule -B lksjdlj
will blow up.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iD8DBQFHDoGGrlYvE4MpobMRAnWHAKCWIP/cHhbcwOjyc19RSqcvW2zAkACgscin BYK2/vMCU9tpuZH2RB3NrJ4=
=lkqh
-----END PGP SIGNATURE-----
semodule/semodule.c +4 -3
@@ -249,11 +249,12 @@* arguments as args. Will allow 'semodule -i *.pp' to * work as expected. */ -if (commands[num_commands -1 ].mode ==INSTALL_M ) { + +if (commands && commands[num_commands -1 ].mode ==INSTALL_M ) { mode =INSTALL_M ; - }else if (commands[num_commands -1 ].mode ==UPGRADE_M ) { + }else if (commands && commands[num_commands -1 ].mode ==UPGRADE_M ) { mode =UPGRADE_M ; - }else if (commands[num_commands -1 ].mode ==REMOVE_M ) { + }else if (commands && commands[num_commands -1 ].mode ==REMOVE_M ) { mode =REMOVE_M ; }else {fprintf (stderr,"unknown additional arguments:\n" );
Joshua Brindle
Acked-byQuoted 6 lines · Daniel J Walsh
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1semodule -B lksjdlj
will blow up.
Looks reasonable (even though it isn't inline)
Acked-by Joshua Brindle <[email protected]>
--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.