Return the maximum privilege in open session command

This commit does the following:

- Set the maximum privilege role in the session instead of current privilege
  in the implementation of the open session request/response.

- In open session response, return the maximum privilege of the session
  instead of the current privilege level.

- Update RAKP12 and RAKP34 implementation

Tested: Checked the session setup works fine with ipmitool and freeipmi
utility ipmipower.

Change-Id: I41b63b91f08c2ed96856c4db41eedaa878c663e3
Signed-off-by: Tom Joseph <tomjoseph@in.ibm.com>
diff --git a/command/rakp12.cpp b/command/rakp12.cpp
index 17a7483..59ca9e3 100644
--- a/command/rakp12.cpp
+++ b/command/rakp12.cpp
@@ -136,7 +136,8 @@
     {
         session->curPrivLevel = session::Privilege::USER;
     }
-    session->reqMaxPrivLevel = request->req_max_privilege_level;
+    session->reqMaxPrivLevel =
+        static_cast<session::Privilege>(request->req_max_privilege_level);
     if (request->user_name_len == 0)
     {
         // Bail out, if user name is not specified.