XenevaOS
Loading...
Searching...
No Matches
Macros | Enumerations | Functions
group.h File Reference
#include <stdint.h>
Include dependency graph for group.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GID_NUM   int
 
#define AURORA_GID_GENERAL_FILE   -1
 gid general file could be any randome number defined by user administration system, must match the user id number
 
#define GROUP_NAME_NETWORK   "network"
 
#define GROUP_NAME_AUDIO   "audio"
 
#define GROUP_NAME_TTY   "tty"
 
#define GROUP_NAME_STORAGE   "storage"
 
#define GROUP_NAME_GRAPHICS   "graphics"
 
#define GROUP_NAME_IPC_POSTBOX   "postbox_ipc"
 
#define GROUP_ID_ROOT   0
 
#define GID_GLOBAL_NET_COUNT   4
 
#define GID_GLOBAL_IPC_COUNT   4
 
#define GID_GLOBAL_MISC_COUNT   4
 
#define AURORA_MAX_GROUPS
 
#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

void AuCredGroupInitialize ()
 AuCredGroupInitialize – initialize default group id's which is zero.
 
int AuCredGroupAdd (uint8_t category, GID_NUM value)
 
uint8_t AuCredGetGroupCategory (const char *string)
 AuCredGetGroupCategory – get a group category number by looking it name.
 
GID_NUM AuCredGetGroupID (uint8_t category)
 AuCredGetGroupID – return a group id number.
 

Detailed Description

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:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

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.

Macro Definition Documentation

◆ AURORA_GID_GENERAL_FILE

#define AURORA_GID_GENERAL_FILE   -1

gid general file could be any randome number defined by user administration system, must match the user id number

◆ AURORA_MAX_GROUPS

#define AURORA_MAX_GROUPS
Value:
#define GID_GLOBAL_NET_COUNT
Definition group.h:56
#define GID_GLOBAL_IPC_COUNT
Definition group.h:57
#define GID_GLOBAL_MISC_COUNT
Definition group.h:58

◆ GID_GLOBAL_IPC

#define GID_GLOBAL_IPC   GID_GLOBAL_NET_COUNT

◆ GID_GLOBAL_IPC_COUNT

#define GID_GLOBAL_IPC_COUNT   4

◆ GID_GLOBAL_MISC

#define GID_GLOBAL_MISC   (GID_GLOBAL_NET_COUNT + GID_GLOBAL_IPC_COUNT)

◆ GID_GLOBAL_MISC_COUNT

#define GID_GLOBAL_MISC_COUNT   4

◆ GID_GLOBAL_NET

#define GID_GLOBAL_NET   0

offset based category

◆ GID_GLOBAL_NET_COUNT

#define GID_GLOBAL_NET_COUNT   4

◆ GID_NUM

#define GID_NUM   int

◆ GROUP_ID_ROOT

#define GROUP_ID_ROOT   0

◆ GROUP_NAME_AUDIO

#define GROUP_NAME_AUDIO   "audio"

◆ GROUP_NAME_GRAPHICS

#define GROUP_NAME_GRAPHICS   "graphics"

◆ GROUP_NAME_IPC_POSTBOX

#define GROUP_NAME_IPC_POSTBOX   "postbox_ipc"

◆ GROUP_NAME_NETWORK

#define GROUP_NAME_NETWORK   "network"

◆ GROUP_NAME_STORAGE

#define GROUP_NAME_STORAGE   "storage"

◆ GROUP_NAME_TTY

#define GROUP_NAME_TTY   "tty"

Enumeration Type Documentation

◆ _gid_entries_

this are category entry, each category will have its own group id

Enumerator
AURORA_GID_NET_SOCKET 
AURORA_GID_NET_RAW 
AURORA_GID_NET_ADMIN 
AURORA_GID_NET_MONITOR 
AURORA_GID_IPC_POSTBOX 
AURORA_GID_IPC_SHARED 
AURORA_GID_IPC_SIGNAL 
AURORA_GID_IPC_PIPE 
AURORA_GID_MISC_WORLD 
AURORA_GID_MISC_USERS 
AURORA_GID_MISC_ADMIN 
AURORA_GID_MISC_DAEMONS 

Function Documentation

◆ AuCredGetGroupCategory()

uint8_t AuCredGetGroupCategory ( const char *  string)
extern

AuCredGetGroupCategory – get a group category number by looking it name.

Parameters
string– name of the group

◆ AuCredGetGroupID()

GID_NUM AuCredGetGroupID ( uint8_t  category)
extern

AuCredGetGroupID – return a group id number.

Parameters
category– group category value
string– group name

◆ AuCredGroupAdd()

int AuCredGroupAdd ( uint8_t  category,
GID_NUM  value 
)
extern

AuCredGroupAdd – add group value to a category

Parameters
category– category number
value– value to add

could not add value

◆ AuCredGroupInitialize()

void AuCredGroupInitialize ( )
extern

AuCredGroupInitialize – initialize default group id's which is zero.

AuCredGroupInitialize – initialize default group id's which is zero.

fill up the IPC group gid

fill up the MISC group gid