pacemaker  2.1.4-dc6eb4362
Scalable High-Availability cluster resource manager
Macros | Enumerations | Functions
pcmki_acl.h File Reference
#include <crm/common/xml.h>
Include dependency graph for pcmki_acl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PCMK__COMPAT_ACL_2_MIN_INCL   "pacemaker-2.0"
 

Enumerations

enum  pcmk__acl_cred_type { pcmk__acl_cred_unset = 0, pcmk__acl_cred_user }
 
enum  pcmk__acl_render_how { pcmk__acl_render_namespace = 1, pcmk__acl_render_text, pcmk__acl_render_color }
 

Functions

int pcmk__acl_annotate_permissions (const char *cred, xmlDoc *cib_doc, xmlDoc **acl_evaled_doc)
 Mark CIB with namespace-encoded result of ACLs eval'd per credential. More...
 
int pcmk__acl_evaled_render (xmlDoc *annotated_doc, enum pcmk__acl_render_how, xmlChar **doc_txt_ptr)
 

Macro Definition Documentation

◆ PCMK__COMPAT_ACL_2_MIN_INCL

#define PCMK__COMPAT_ACL_2_MIN_INCL   "pacemaker-2.0"

Definition at line 33 of file pcmki_acl.h.

Enumeration Type Documentation

◆ pcmk__acl_cred_type

Enumerator
pcmk__acl_cred_unset 
pcmk__acl_cred_user 

Definition at line 14 of file pcmki_acl.h.

◆ pcmk__acl_render_how

Enumerator
pcmk__acl_render_namespace 
pcmk__acl_render_text 
pcmk__acl_render_color 

Definition at line 20 of file pcmki_acl.h.

Function Documentation

◆ pcmk__acl_annotate_permissions()

int pcmk__acl_annotate_permissions ( const char *  cred,
xmlDoc *  cib_doc,
xmlDoc **  acl_evaled_doc 
)

Mark CIB with namespace-encoded result of ACLs eval'd per credential.

Parameters
[in]cred_typecredential type that cred represents
[in]credcredential whose ACL perspective to switch to
[in]cib_docXML document representing CIB
[out]acl_evaled_docXML document representing CIB, with said namespace-based annotations throughout
Returns
A standard Pacemaker return code Namely:
  • pcmk_rc_ok upon success,
  • pcmk_rc_already if ACLs were not applicable,
  • pcmk_rc_schema_validation if the validation schema version is unsupported (see note), or
  • EINVAL or ENOMEM as appropriate;
Note
Only supported schemas are those following acls-2.0.rng, that is, those validated with pacemaker-2.0.rng and newer.

Definition at line 186 of file pcmk_acl.c.

◆ pcmk__acl_evaled_render()

int pcmk__acl_evaled_render ( xmlDoc *  annotated_doc,
enum  pcmk__acl_render_how,
xmlChar **  doc_txt_ptr 
)

Definition at line 241 of file pcmk_acl.c.