acl.cc File Reference

Functions that check access of users to restricted functionality of the server. More...

#include "jabberd.h"

Functions

int acl_check_access (xdbcache xdb, const char *function, const jid user)
jid acl_get_users (xdbcache xdb, const char *function)

Variables

xmlnode greymatter__


Detailed Description

Functions that check access of users to restricted functionality of the server.

For the moment this is only a provisional implementation of ACLs for jabberd14 to get the interfaces working. A more dynamic implementation of ACLs should soon follow, that will allow authorized accounts to alter ACLs at runtime of the server using Jabber requests.


Function Documentation

int acl_check_access ( xdbcache  xdb,
const char *  function,
const jid  user 
)

check if a user has access to a given functionality

Parameters:
xdb instance of an xdbcache used to check the access
function functionality for which access should be checked
user user for which access should be checked
Returns:
1 if access is granted, 0 if access is denied

References acl_get_users(), xmppd::jabberid_pool::get_pool(), jid_cmpx(), jid_full(), JID_SERVER, JID_USER, log_debug2, LOGT_AUTH, xmppd::jabberid_pool::next, pool_free(), and ZONE.

Referenced by js_trust().

jid acl_get_users ( xdbcache  xdb,
const char *  function 
)

get the list of users, that have access to a given functionality

Parameters:
xdb instance of an xdbcache used to check the access
function functionality for which access should be checked
Returns:
list of jid_struct instances, that hold the users having access to the functionality; must be freed by the caller; NULL if no user has access

References j_strcmp(), jid_append(), jid_new(), NS_JABBERD_ACL, NS_JABBERD_CONFIGFILE, pool_new, xhash_new(), xhash_put(), xmlnode_get_attrib_ns(), xmlnode_get_data(), and xmlnode_get_tags().

Referenced by acl_check_access().


Variable Documentation

this holds the parsed configuration file


Generated on Wed Sep 10 01:59:47 2008 for jabberd14 by  doxygen 1.5.5