Fix getprivs and getsystem
This is a fix for crap and stupid stuff that I did half way through the packet pivot code. I was working on some priv stuff at the same time, and when I realised that the work I was doing was not sensible as part of the packet pivot PR, I failed to revert my changes properly. As a result I broke `getprivs` and `getsystem`. I am sorry. And I'm ashamed.bug/bundler_fix
parent
579342c4f6
commit
3068fb6e7e
|
@ -170,10 +170,7 @@ class Config
|
|||
ret = []
|
||||
res = client.send_request(req)
|
||||
res.each(TLV_TYPE_PRIVILEGE) do |p|
|
||||
ret << {
|
||||
priv: p.get_tlv_value(TLV_TYPE_PRIVILEGE_NAME),
|
||||
enabled: p.get_tlv_value(TLV_TYPE_PRIVILEGE_ENABLED),
|
||||
}
|
||||
ret << p.value
|
||||
end
|
||||
ret
|
||||
end
|
||||
|
|
|
@ -16,9 +16,7 @@ TLV_TYPE_HANDLE = TLV_META_TYPE_QWORD | 600
|
|||
TLV_TYPE_INHERIT = TLV_META_TYPE_BOOL | 601
|
||||
TLV_TYPE_PROCESS_HANDLE = TLV_META_TYPE_QWORD | 630
|
||||
TLV_TYPE_THREAD_HANDLE = TLV_META_TYPE_QWORD | 631
|
||||
TLV_TYPE_PRIVILEGE = TLV_META_TYPE_GROUP | 632
|
||||
TLV_TYPE_PRIVILEGE_NAME = TLV_META_TYPE_STRING | 633
|
||||
TLV_TYPE_PRIVILEGE_ENABLED = TLV_META_TYPE_BOOL | 634
|
||||
TLV_TYPE_PRIVILEGE = TLV_META_TYPE_STRING | 632
|
||||
|
||||
##
|
||||
#
|
||||
|
|
|
@ -899,12 +899,12 @@ class Console::CommandDispatcher::Stdapi::Sys
|
|||
'Header' => 'Enabled Process Privileges',
|
||||
'Indent' => 0,
|
||||
'SortIndex' => 1,
|
||||
'Columns' => ['Priv Name', 'Enabled']
|
||||
'Columns' => ['Name']
|
||||
)
|
||||
|
||||
privs = client.sys.config.getprivs
|
||||
client.sys.config.getprivs.each do |priv|
|
||||
table << [priv[:priv], priv[:enabled].to_s]
|
||||
table << [priv]
|
||||
end
|
||||
|
||||
print_line
|
||||
|
|
Loading…
Reference in New Issue