@@ -89,51 +89,41 @@ int main(int argc, char **argv)
89
89
ntlm_opt opt ;
90
90
91
91
ntlm_opt_spec opt_specs [] = {
92
- { NTLM_OPT_SWITCH , "negotiate" , 'n' , & type , NTLM_CLI_NEGOTIATE ,
93
- NULL , "produce a negotiate package" ,
94
- NTLM_OPT_USAGE_SHOW_LONG },
95
- { NTLM_OPT_SWITCH , "response" , 'r' , & type , NTLM_CLI_RESPONSE ,
96
- NULL , "produce a response to a challenge (required)" ,
97
- NTLM_OPT_USAGE_CHOICE | NTLM_OPT_USAGE_SHOW_LONG },
98
-
99
- { NTLM_OPT_VALUE , "target" , 't' , & target , 0 ,
100
- "target" , "sets the target (the remote hostname)" ,
101
- 0 },
102
- { NTLM_OPT_VALUE , "username" , 'u' , & username , 0 ,
103
- "username" , "sets the username for authentication" ,
104
- 0 },
105
- { NTLM_OPT_VALUE , "domain" , 'd' , & domain , 0 ,
106
- "domain" , "sets the user's domain" ,
107
- 0 },
108
- { NTLM_OPT_VALUE , "password" , 'p' , & password , 0 ,
109
- "password" , "sets the user's password" ,
110
- 0 },
111
-
112
- { NTLM_OPT_BOOL , "enable-lm" , 0 , & enable_lm , 0 ,
113
- NULL , "enable LM authentication" ,
114
- 0 },
115
- { NTLM_OPT_BOOL , "enable-ntlm" , 0 , & enable_ntlm , 0 ,
116
- NULL , "enable NTLM authentication" ,
117
- 0 },
118
- { NTLM_OPT_BOOL , "disable-ntlm2" , 0 , & disable_ntlm2 , 0 ,
119
- NULL , "disable NTLM2 authentication" ,
120
- 0 },
121
-
122
- { NTLM_OPT_BOOL , "raw" , 0 , & raw , 0 ,
123
- NULL , "read and write raw binary (instead of base64)" ,
124
- 0 },
125
- { NTLM_OPT_SWITCH , "help" , 0 , & help , 0 ,
126
- NULL , "display help" ,
127
- 0 },
128
-
129
- { NTLM_OPT_NONE , NULL , 0 , NULL , 0 , NULL , NULL , 0 }
92
+ { NTLM_OPT_TYPE_SWITCH , "negotiate" , 'n' , & type , NTLM_CLI_NEGOTIATE ,
93
+ NTLM_OPT_USAGE_SHOW_LONG , NULL , "produce a negotiate package" },
94
+ { NTLM_OPT_TYPE_SWITCH , "response" , 'r' , & type , NTLM_CLI_RESPONSE ,
95
+ NTLM_OPT_USAGE_CHOICE | NTLM_OPT_USAGE_SHOW_LONG ,
96
+ NULL , "produce a response to a challenge (required)" },
97
+
98
+ { NTLM_OPT_TYPE_VALUE , "target" , 't' , & target , 0 ,
99
+ 0 , "target" , "sets the target (the remote hostname)" },
100
+ { NTLM_OPT_TYPE_VALUE , "username" , 'u' , & username , 0 ,
101
+ 0 , "username" , "sets the username for authentication" },
102
+ { NTLM_OPT_TYPE_VALUE , "domain" , 'd' , & domain , 0 ,
103
+ 0 , "domain" , "sets the user's domain" },
104
+ { NTLM_OPT_TYPE_VALUE , "password" , 'p' , & password , 0 ,
105
+ 0 , "password" , "sets the user's password" },
106
+
107
+ { NTLM_OPT_TYPE_BOOL , "enable-lm" , 0 , & enable_lm , 0 ,
108
+ 0 , NULL , "enable LM authentication" },
109
+ { NTLM_OPT_TYPE_BOOL , "enable-ntlm" , 0 , & enable_ntlm , 0 ,
110
+ 0 , NULL , "enable NTLM authentication" },
111
+ { NTLM_OPT_TYPE_BOOL , "disable-ntlm2" , 0 , & disable_ntlm2 , 0 ,
112
+ 0 , NULL , "disable NTLM2 authentication" },
113
+
114
+ { NTLM_OPT_TYPE_BOOL , "raw" , 0 , & raw , 0 ,
115
+ 0 , NULL , "read and write raw binary (instead of base64)" },
116
+ { NTLM_OPT_TYPE_SWITCH , "help" , 0 , & help , 0 ,
117
+ 0 , NULL , "display help" },
118
+
119
+ { NTLM_OPT_TYPE_NONE , NULL , 0 , NULL , 0 , 0 , NULL , NULL }
130
120
};
131
121
132
- ntlm_opt_parser_init (& opt_parser , opt_specs , argv + 1 , argc - 1 );
122
+ ntlm_opt_parser_init (& opt_parser , opt_specs , argv + 1 , argc - 1 , 0 );
133
123
134
124
while (ntlm_opt_parser_next (& opt , & opt_parser )) {
135
125
if (!opt .spec ) {
136
- ntlm_opt_status_fprint (stderr , & opt );
126
+ ntlm_opt_status_fprint (stderr , NULL , & opt );
137
127
ntlm_opt_usage_fprint (stderr , argv [0 ], opt_specs );
138
128
return 129 ;
139
129
}
0 commit comments