From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 1253181E61 for ; Wed, 16 Nov 2016 18:24:20 -0800 (PST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP; 16 Nov 2016 18:24:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,651,1473145200"; d="scan'208";a="32318922" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by fmsmga006.fm.intel.com with ESMTP; 16 Nov 2016 18:24:24 -0800 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Liming Gao , Eric Dong , Jiewen Yao Date: Thu, 17 Nov 2016 10:24:05 +0800 Message-Id: <1479349447-46344-3-git-send-email-dandan.bi@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1479349447-46344-1-git-send-email-dandan.bi@intel.com> References: <1479349447-46344-1-git-send-email-dandan.bi@intel.com> Subject: [patch 2/4] MdeModulePkg/SetupBrowser:Don't support password without interactive flag X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Nov 2016 02:24:20 -0000 In current SetupBrowser, the logic related to non-interative password is not correct. How to support it correctly or whether support it is still under investigation. First step remove the incorrect logic. Cc: Liming Gao Cc: Eric Dong Cc: Jiewen Yao Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi --- MdeModulePkg/Universal/SetupBrowserDxe/Setup.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index 7547814..451fd03 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -6106,33 +6106,14 @@ PasswordCheck ( if ((Question->QuestionFlags & EFI_IFR_FLAG_CALLBACK) == EFI_IFR_FLAG_CALLBACK) { if (ConfigAccess == NULL) { return EFI_UNSUPPORTED; } } else { - if (PasswordString == NULL) { - return EFI_SUCCESS; - } - - // - // Check whether has preexisted password. - // - if (PasswordString[0] == 0) { - if (*((CHAR16 *) Question->BufferValue) == 0) { - return EFI_SUCCESS; - } else { - return EFI_NOT_READY; - } - } - // - // Check whether the input password is same as preexisted password. + // If a password doesn't have the CALLBACK flag, browser will not handle it. // - if (StrnCmp (PasswordString, (CHAR16 *) Question->BufferValue, Question->StorageWidth/sizeof (CHAR16)) == 0) { - return EFI_SUCCESS; - } else { - return EFI_NOT_READY; - } + return EFI_UNSUPPORTED; } // // Prepare password string in HII database // -- 1.9.5.msysgit.1