From: Duncan L. <ice...@us...> - 2006-09-12 23:23:32
|
Update of /cvsroot/ipmitool/ipmitool/lib In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv19788/lib Modified Files: ipmi_main.c Log Message: add support for name+privilege lookup for lanplus sessions Index: ipmi_main.c =================================================================== RCS file: /cvsroot/ipmitool/ipmitool/lib/ipmi_main.c,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ipmi_main.c 19 Mar 2006 20:04:20 -0000 1.13 --- ipmi_main.c 12 Sep 2006 23:23:28 -0000 1.14 *************** *** 229,232 **** --- 229,233 ---- lprintf(LOG_NOTICE, " -k key Use Kg key for IPMIv2 authentication"); lprintf(LOG_NOTICE, " -L level Remote session privilege level [default=ADMINISTRATOR]"); + lprintf(LOG_NOTICE, " Append a '+' to use name/privilege lookup in RAKP1"); lprintf(LOG_NOTICE, " -A authtype Force use of auth type NONE, PASSWORD, MD2, MD5 or OEM"); lprintf(LOG_NOTICE, " -P password Remote session password"); *************** *** 270,273 **** --- 271,275 ---- uint8_t target_lun = 0; uint8_t my_addr = 0; + uint8_t lookupbit = 0x10; /* use name-only lookup by default */ int authtype = -1; char * tmp = NULL; *************** *** 448,454 **** break; case 'L': privlvl = str2val(optarg, ipmi_privlvl_vals); ! if (privlvl == 0xFF) lprintf(LOG_WARN, "Invalid privilege level %s", optarg); break; case 'A': --- 450,462 ---- break; case 'L': + i = strlen(optarg); + if ((i > 0) && (optarg[i-1] == '+')) { + lookupbit = 0; + optarg[i-1] = 0; + } privlvl = str2val(optarg, ipmi_privlvl_vals); ! if (privlvl == 0xFF) { lprintf(LOG_WARN, "Invalid privilege level %s", optarg); + } break; case 'A': *************** *** 565,568 **** --- 573,577 ---- IPMI_SESSION_PRIV_ADMIN); /* default */ + ipmi_intf_session_set_lookupbit(intf, lookupbit); ipmi_intf_session_set_sol_escape_char(intf, sol_escape_char); ipmi_intf_session_set_cipher_suite_id(intf, cipher_suite_id); |