X-Git-Url: https://jfr.im/git/solanum.git/blobdiff_plain/353f8625531e7363e2768c026f941e706ab0dafa..b2ee72e4487d9ec90ff64f63d8f8c3974d96bc5c:/include/privilege.h diff --git a/include/privilege.h b/include/privilege.h index 4eb7564b..a3e5bffb 100644 --- a/include/privilege.h +++ b/include/privilege.h @@ -26,11 +26,13 @@ #include "stdinc.h" -typedef enum { +enum { PRIV_NEEDOPER = 1 -} PrivilegeFlags; +}; +typedef unsigned int PrivilegeFlags; struct PrivilegeSet { + unsigned int status; /* If CONF_ILLEGAL, delete when no refs */ int refs; char *name; char *privs; @@ -42,7 +44,10 @@ int privilegeset_in_set(struct PrivilegeSet *set, const char *priv); struct PrivilegeSet *privilegeset_set_new(const char *name, const char *privs, PrivilegeFlags flags); struct PrivilegeSet *privilegeset_extend(struct PrivilegeSet *parent, const char *name, const char *privs, PrivilegeFlags flags); struct PrivilegeSet *privilegeset_get(const char *name); -void privilegeset_ref(struct PrivilegeSet *set); +struct PrivilegeSet *privilegeset_ref(struct PrivilegeSet *set); void privilegeset_unref(struct PrivilegeSet *set); +void privilegeset_mark_all_illegal(void); +void privilegeset_delete_all_illegal(void); +void privilegeset_report(struct Client *source_p); #endif