[asterisk-commits] jrose: trunk r370265 - in /trunk: configs/acl.conf.sample main/named_acl.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 19 15:37:16 CDT 2012


Author: jrose
Date: Thu Jul 19 15:37:10 2012
New Revision: 370265

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=370265
Log:
named_acl: Remove systemname option from acl.conf, use asterisk.conf value

Review: https://reviewboard.asterisk.org/r/2057/

Modified:
    trunk/configs/acl.conf.sample
    trunk/main/named_acl.c

Modified: trunk/configs/acl.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/acl.conf.sample?view=diff&rev=370265&r1=370264&r2=370265
==============================================================================
--- trunk/configs/acl.conf.sample (original)
+++ trunk/configs/acl.conf.sample Thu Jul 19 15:37:10 2012
@@ -10,12 +10,6 @@
 ;   acl show                         Show all named ACLs configured
 ;   acl show <name>                  Show contents of a particular named ACL
 ;   reload acl                       Reload configuration file
-;
-;[general]
-;systemname=asterisksystem1          ; If a system name is specified, realtime
-;                                    ; ACLs will only be retrieved if they have
-;                                    ; a systemname field that matches this value.
-;                                    ; If it's less blank, the field is ignored.
 ;
 ; Any configuration that uses ACLs which has been made to be able to use named
 ; ACLs will specify a named ACL with the 'acl' option in its configuration in

Modified: trunk/main/named_acl.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/named_acl.c?view=diff&rev=370265&r1=370264&r2=370265
==============================================================================
--- trunk/main/named_acl.c (original)
+++ trunk/main/named_acl.c Thu Jul 19 15:37:10 2012
@@ -39,13 +39,14 @@
 #include "asterisk/cli.h"
 #include "asterisk/acl.h"
 #include "asterisk/astobj2.h"
+#include "asterisk/paths.h"
 
 #define NACL_CONFIG "acl.conf"
 #define ACL_FAMILY "acls"
 
 struct named_acl_global_config {
 	AST_DECLARE_STRING_FIELDS(
-		AST_STRING_FIELD(systemname);
+		/* Nothing here yet. */
 	);
 };
 
@@ -263,12 +264,8 @@
 	struct ast_ha *built_ha = NULL;
 	struct named_acl *acl;
 
-	RAII_VAR(struct named_acl_config *, acl_options, ao2_global_obj_ref(globals), ao2_cleanup);
-
 	/* If we have a systemname set in the global options, we only want to retrieve entries with a matching systemname field. */
-	if (acl_options) {
-		systemname = acl_options->global->systemname;
-	}
+	systemname = ast_config_AST_SYSTEM_NAME;
 
 	if (ast_strlen_zero(systemname)) {
 		cfg = ast_load_realtime_multientry(ACL_FAMILY, "name", name, SENTINEL);
@@ -543,9 +540,6 @@
 		return 0;
 	}
 
-	/* Register the global options */
-	aco_option_register(&cfg_info, "systemname", ACO_EXACT, global_options, NULL, OPT_STRINGFIELD_T, 0, STRFLDSET(struct named_acl_global_config, systemname));
-
 	/* Register the per level options. */
 	aco_option_register(&cfg_info, "permit", ACO_EXACT, named_acl_types, NULL, OPT_ACL_T, 1, FLDSET(struct named_acl, ha));
 	aco_option_register(&cfg_info, "deny", ACO_EXACT, named_acl_types, NULL, OPT_ACL_T, 0, FLDSET(struct named_acl, ha));




More information about the asterisk-commits mailing list