|
XenevaOS
|


Go to the source code of this file.
Macros | |
| #define | GID_NUM int |
| #define | UID_NUM int |
| #define | GID_GLOBAL_NET_COUNT 4 |
| #define | GID_GLOBAL_IPC_COUNT 4 |
| #define | GID_GLOBAL_MISC_COUNT 4 |
| #define | GID_GLOBAL_NET 0 |
| #define | GID_GLOBAL_IPC GID_GLOBAL_NET_COUNT |
| #define | GID_GLOBAL_MISC (GID_GLOBAL_NET_COUNT + GID_GLOBAL_IPC_COUNT) |
Enumerations | |
| enum | _gid_entries_ { AURORA_GID_NET_SOCKET = GID_GLOBAL_NET , AURORA_GID_NET_RAW , AURORA_GID_NET_ADMIN , AURORA_GID_NET_MONITOR , AURORA_GID_IPC_POSTBOX = GID_GLOBAL_IPC , AURORA_GID_IPC_SHARED , AURORA_GID_IPC_SIGNAL , AURORA_GID_IPC_PIPE , AURORA_GID_MISC_WORLD = GID_GLOBAL_MISC , AURORA_GID_MISC_USERS , AURORA_GID_MISC_ADMIN , AURORA_GID_MISC_DAEMONS } |
Functions | |
| XE_LIB int | _KeCredChangeID (int fd, UID_NUM uid, GID_NUM gid) |
| _KeCredChangeID – change credential ids | |
| XE_LIB int | _KeCredAddSGroup (int proc_id, int sgid) |
| _KeCredAddSGroup – add supplimentary gid to process | |
| XE_LIB int | _KeCredSetCap (int proc_id, int cap) |
| XE_LIB int | _KeCredGetCap (int proc_id) |
| XE_LIB int | _KeSetUID (int proc_id, UID_NUM uid) |
| _KeSetUID – change user id of a process | |
| XE_LIB int | _KeSetGID (int proc_id, GID_NUM gid) |
| _KeSetGID – change user id of a process | |
| XE_LIB GID_NUM | _KeGetGlobalGroupID (uint8_t category) |
| _KeGetGlobalGroupID – return a group id number | |
BSD 2-Clause License
Copyright (c) 2022-2026, Manas Kamal Choudhury All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| #define GID_GLOBAL_IPC GID_GLOBAL_NET_COUNT |
| #define GID_GLOBAL_IPC_COUNT 4 |
| #define GID_GLOBAL_MISC (GID_GLOBAL_NET_COUNT + GID_GLOBAL_IPC_COUNT) |
| #define GID_GLOBAL_MISC_COUNT 4 |
| #define GID_GLOBAL_NET 0 |
offset based category
| #define GID_GLOBAL_NET_COUNT 4 |
| #define GID_NUM int |
| #define UID_NUM int |
| enum _gid_entries_ |
this are category entry, each category will have its own group id
| XE_LIB int _KeCredAddSGroup | ( | int | proc_id, |
| int | sgid | ||
| ) |
_KeCredAddSGroup – add supplimentary gid to process
| proc_id | – process id to set |
| sgid | – sgid number |
_KeCredChangeID – change credential ids
| fd | – file descriptor |
| uid | – user id |
| gid | – groupd id number |
| XE_LIB int _KeCredGetCap | ( | int | proc_id | ) |
_KeCredGetCap – get capabilities of desired process
| proc_id | – process id, zero for current process, zero = current |
| XE_LIB int _KeCredSetCap | ( | int | proc_id, |
| int | cap | ||
| ) |
_KeCredSetCap – add capability to a process
| proc_id | – process id, zero for current process, zero = current |
| cap | – capability to add |
_KeGetGlobalGroupID – return a group id number
| category | – category id |
_KeSetGID – change user id of a process
| proc | – Process id to change their uid, zero = current |
| uid | – User id |