libintrovirt v0.57.4
IntroVirt introspection library
Loading...
Searching...
No Matches
TOKEN_PRIVILEGES.hh
Go to the documentation of this file.
1/*
2 * Copyright 2021 Assured Information Security, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17
18#include "TOKEN_INFORMATION.hh"
19
22
23#include <introvirt/util/json/json.hh>
24
25#include <cstdint>
26#include <memory>
27#include <ostream>
28#include <string>
29
30namespace introvirt {
31namespace windows {
32namespace nt {
33
35 public:
38
45 virtual LUID_AND_ATTRIBUTES& operator[](uint32_t index) = 0;
46 virtual const LUID_AND_ATTRIBUTES& operator[](uint32_t index) const = 0;
47
51 virtual LUID_AND_ATTRIBUTES& at(uint32_t index) = 0;
52 virtual const LUID_AND_ATTRIBUTES& at(uint32_t index) const = 0;
53
60 virtual iterator erase(const const_iterator& iter) = 0;
61
67 virtual uint32_t length() const = 0;
68
74 virtual iterator begin() = 0;
75
81 virtual iterator end() = 0;
82
88 virtual const_iterator begin() const = 0;
89
95 virtual const_iterator end() const = 0;
96
97 static std::unique_ptr<TOKEN_PRIVILEGES> make_unique(const guest_ptr<void>& ptr);
98 static std::unique_ptr<TOKEN_PRIVILEGES> make_unique(const guest_ptr<void>& ptr,
99 uint32_t buffer_size);
100};
101
102} /* namespace nt */
103} /* namespace windows */
104} /* namespace introvirt */
Definition guest_ptr.hh:88
Definition LUID_AND_ATTRIBUTES.hh:38
An abstract class reprseneting a more specific token information buffer.
Definition TOKEN_INFORMATION.hh:36
virtual guest_ptr< void > ptr() const =0
Get the address that the buffer is at.
virtual uint32_t buffer_size() const =0
Get the size of the buffer.
Definition TOKEN_PRIVILEGES.hh:34
virtual const_iterator begin() const =0
Get an iterator to the first entry.
virtual const LUID_AND_ATTRIBUTES & operator[](uint32_t index) const =0
virtual LUID_AND_ATTRIBUTES & at(uint32_t index)=0
Get an entry at the specified index.
virtual const LUID_AND_ATTRIBUTES & at(uint32_t index) const =0
static std::unique_ptr< TOKEN_PRIVILEGES > make_unique(const guest_ptr< void > &ptr)
virtual const_iterator end() const =0
Get the end iterator.
virtual uint32_t length() const =0
Get the number of entries.
virtual iterator begin()=0
Get an iterator to the first entry.
virtual iterator end()=0
Get the end iterator.
virtual LUID_AND_ATTRIBUTES & operator[](uint32_t index)=0
Get an entry at the specified index.
virtual iterator erase(const const_iterator &iter)=0
Remove an element from the list.
static std::unique_ptr< TOKEN_PRIVILEGES > make_unique(const guest_ptr< void > &ptr, uint32_t buffer_size)
Iterator helper for _INFORMATION types that have a fixed array result.
Definition array_iterator.hh:35
Core IntroVirt classes.
Definition Cr0.hh:20