mirror of https://github.com/ipxe/ipxe.git
- modified length of password string to match visible field length
- value of n passed to wgetnstr should now be equivalent to output from strlen (i.e. length excluding NUL-terminating character)pull/1/head
parent
f9887c3f0f
commit
ba2bfd54ed
|
@ -25,7 +25,7 @@ int main ( void ) {
|
||||||
void get_iscsi_chap_secret( char *sec ) {
|
void get_iscsi_chap_secret( char *sec ) {
|
||||||
char *title = "Set new iSCSI CHAP secret",
|
char *title = "Set new iSCSI CHAP secret",
|
||||||
*msg = "Configure the iSCSI access secret",
|
*msg = "Configure the iSCSI access secret",
|
||||||
pw1[16], pw2[16];
|
pw1[17], pw2[17];
|
||||||
WINDOW *secret;
|
WINDOW *secret;
|
||||||
|
|
||||||
secret = newwin( stdscr->height / 2,
|
secret = newwin( stdscr->height / 2,
|
||||||
|
@ -44,9 +44,9 @@ void get_iscsi_chap_secret( char *sec ) {
|
||||||
mvwhline( secret, 8, 12, '_' | secret->attrs, 16 );
|
mvwhline( secret, 8, 12, '_' | secret->attrs, 16 );
|
||||||
|
|
||||||
wmove( secret, 6, 12 );
|
wmove( secret, 6, 12 );
|
||||||
wgetnstr( secret, pw1, 12 );
|
wgetnstr( secret, pw1, 16 );
|
||||||
wmove( secret, 8, 12 );
|
wmove( secret, 8, 12 );
|
||||||
wgetnstr( secret, pw2, 12 );
|
wgetnstr( secret, pw2, 16 );
|
||||||
|
|
||||||
if ( strcmp( pw1, pw2 ) == 0 ) {
|
if ( strcmp( pw1, pw2 ) == 0 ) {
|
||||||
strcpy( sec, pw1 );
|
strcpy( sec, pw1 );
|
||||||
|
|
Loading…
Reference in New Issue