Revision: 16168
          http://sourceforge.net/p/edk2/code/16168
Author:   tye1
Date:     2014-09-24 09:35:54 +0000 (Wed, 24 Sep 2014)
Log Message:
-----------
Enhance TargetName check when save iSCSI configuration.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ye Ting  <[email protected]>
Reviewed-by: Wu, Jiaxin <[email protected]>
Reviewed-by: Fu, Siyuan <[email protected]>

Modified Paths:
--------------
    trunk/edk2/NetworkPkg/IScsiDxe/IScsiConfig.c

Modified: trunk/edk2/NetworkPkg/IScsiDxe/IScsiConfig.c
===================================================================
--- trunk/edk2/NetworkPkg/IScsiDxe/IScsiConfig.c        2014-09-24 09:35:32 UTC 
(rev 16167)
+++ trunk/edk2/NetworkPkg/IScsiDxe/IScsiConfig.c        2014-09-24 09:35:54 UTC 
(rev 16168)
@@ -541,7 +541,24 @@
           );
         return EFI_INVALID_PARAMETER;
       }
+
+      //
+      // Validate iSCSI target name configuration again:
+      // The format of iSCSI target name is already verified in 
IScsiFormCallback() when
+      // user input the name; here we only check the case user does not input 
the name.
+      //
+      if (Attempt->SessionConfigData.TargetName[0] == '\0') {
+        CreatePopUp (
+          EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE,
+          &Key,
+          L"iSCSI target name is NULL!",
+          NULL
+          );
+        return EFI_INVALID_PARAMETER;
+      }
     }
+
+
     //
     // Validate the authentication info.
     //
@@ -2355,7 +2372,7 @@
           &Key,
           L"Invalid iSCSI Name!",
           NULL
-          );       
+          );
       } else {
         AsciiStrCpy (Private->Current->SessionConfigData.TargetName, 
IScsiName);
       }


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to