Read credentials from environment
diff --git a/src/wsman.c b/src/wsman.c
index d20c1a5..8660aaa 100644
--- a/src/wsman.c
+++ b/src/wsman.c
@@ -632,6 +632,14 @@
char subscontext[512];
filter_t *filter = NULL;
+ /* read credentials from environment */
+ username = getenv("WSMAN_USER");
+ password = getenv("WSMAN_PASS");
+ event_username = getenv("WSMAN_EVENT_USER");
+ event_password = getenv("WSMAN_EVENT_PASS");
+
+ /* parse command line options
+ might overwrite environment credentials */
if (!wsman_parse_options(argc, argv)) {
exit(EXIT_FAILURE);