debora
-
2017-05-10
- assigned_to: debora
tpm_nvdefine does not ask owner or nvram area password if -o and/or -a options are passed without arguments. The reason is in optstring them are not optional.
Fix:
diff --git a/src/tpm_mgmt/tpm_nvdefine.c b/src/tpm_mgmt/tpm_nvdefine.c
index e2c748f..dde50fa 100644
--- a/src/tpm_mgmt/tpm_nvdefine.c
+++ b/src/tpm_mgmt/tpm_nvdefine.c
@@ -266,7 +266,7 @@ int main(int argc, char **argv)
initIntlSys();
if (genericOptHandler
- (argc, argv, "i:s:p:o:a:r:w:f:yzu", hOpts,
+ (argc, argv, "i:s:p:o::a::r:w:f:yzu", hOpts,
sizeof(hOpts) / sizeof(struct option), parse, help) != 0)
goto out;