[OpenSER-Devel] [ openser-Bugs-1890988 ] [permissions] "default_allow/deny_file" is not a parameter
SourceForge.net
noreply at sourceforge.net
Thu Feb 14 11:47:44 CET 2008
Bugs item #1890988, was opened at 2008-02-11 09:57
Message generated for change (Comment added) made by ibc_sf
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1890988&group_id=139143
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver devel
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Iñaki Baz (ibc_sf)
Assigned to: Bogdan-Andrei Iancu (bogdan_iancu)
Summary: [permissions] "default_allow/deny_file" is not a parameter
Initial Comment:
There are two parameters in "permissions" module:
- default_allow_file (string)
- default_deny_file (string)
They are supposed to contain the custom path for rule files.
But they are not valid at all since code don't look for them, but for a constant values:
permissions.h:
------------------
#define DEFAULT_ALLOW_FILE "permissions.allow"
#define DEFAULT_DENY_FILE "permissions.deny"
------------------
permissions.c:
------------------
static char* default_allow_file = DEFAULT_ALLOW_FILE;
static char* default_deny_file = DEFAULT_DENY_FILE;
[...]
static param_export_t params[] = {
{"default_allow_file", STR_PARAM, &default_allow_file},
{"default_deny_file", STR_PARAM, &default_deny_file },
[...]
allow[0].filename = get_pathname(DEFAULT_ALLOW_FILE);
[...]
deny[0].filename = get_pathname(DEFAULT_DENY_FILE);
------------------
In fact, I set those parameter to any value and it's not looked for when starting OpenSer:
---------------
modparam("permissions", "default_allow_file", "/etc/MY_CUSTOM_LOCATION_ALLOW_FILE")
---------------
~$ /etc/init.d/openser start
...
WARNING:permissions:mod_init: default allow file (/etc/openser/permissions.allow) not found => empty rule set
...
----------------------------------------------------------------------
>Comment By: Iñaki Baz (ibc_sf)
Date: 2008-02-14 12:47
Message:
Logged In: YES
user_id=1844020
Originator: YES
sorry, Bogdan, it does work properly. The issue is that I pasted the lines
related to "register.allo/deny" files:
WARNING:permissions:load_fixup: file (/etc/openser/register.allow) not
found => empty rule set
WARNING:permissions:load_fixup: file (/etc/openser/register.deny) not
found => empty rule set
while I should paste the lines related to "permission.allow/deny":
WARNING:permissions:parse_config_file: file not found:
/etc/KAKAKA.allow
WARNING:permissions:mod_init: default allow file (/etc/KAKAKA.allow) not
found => empty rule set
XDD
----------------------------------------------------------------------
Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-02-14 12:34
Message:
Logged In: YES
user_id=1275325
Originator: NO
Hi Inaki,
not a problem in changing the status as time as valuable new info is
added.
I just ran a test and works for me:
modparam("permissions", "default_allow_file",
"/etc/openser/permissionsxxxx.allow")
-->
Feb 14 13:30:16 [30329] WARNING:permissions:mod_init: default allow file
(/etc/openser/permissionsxxxx.allow) not found => empty rule set
Feb 14 13:30:16 [30329] WARNING:permissions:parse_config_file: file not
found: ../permissions.deny
Feb 14 13:30:16 [30329] WARNING:permissions:mod_init: default deny file
(../permissions.deny) not found => empty rule set
Are you sure you updated from SVN ??
The changes you suggest are useless as they do exactly the same as the
current code. It will be better to also explain where is the problem with
the current code.
Thanks and regards,
Bogdan
----------------------------------------------------------------------
Comment By: Iñaki Baz (ibc_sf)
Date: 2008-02-14 10:55
Message:
Logged In: YES
user_id=1844020
Originator: YES
Sorry for the long time of this reply.
The patch doesn't work. I still see the same message:
WARNING:permissions:load_fixup: file (/etc/openser/register.allow) not
found => empty rule set
WARNING:permissions:load_fixup: file (/etc/openser/register.deny) not
found => empty rule set
I think I know the reason:
permissions.h:
---------------------
#define DEFAULT_ALLOW_FILE "permissions.allow"
#define DEFAULT_DENY_FILE "permissions.deny"
---------------------
permissions.c:
----------------------------
/* Exported parameters */
static param_export_t params[] = {
{"default_allow_file", STR_PARAM, &default_allow_file}, <---
NOTE there is no ".s"
{"default_deny_file", STR_PARAM, &default_deny_file }, <---
NOTE there is no ".s"
{"check_all_branches", INT_PARAM, &check_all_branches},
{"allow_suffix", STR_PARAM, &allow_suffix },
...
----------------------------
IMHO it should be:
permissions.h:
---------------------
<nothing>
---------------------
permissions.c:
----------------------------
str default_allow_file = str_init("permissions.allow");
str default_deny_file = str_init("permissions.deny");
/* Exported parameters */
static param_export_t params[] = {
{"default_allow_file", STR_PARAM, &default_allow_file.s},
{"default_deny_file", STR_PARAM, &default_deny_file.s },
{"check_all_branches", INT_PARAM, &check_all_branches},
{"allow_suffix", STR_PARAM, &allow_suffix },
...
----------------------------
PD: I've changed the report "Status" and "Resolution", please tell me if I
shouldn't change it.
----------------------------------------------------------------------
Comment By: Bogdan-Andrei Iancu (bogdan_iancu)
Date: 2008-02-11 13:43
Message:
Logged In: YES
user_id=1275325
Originator: NO
Hi Inaki,
I made a fix on SVN trunk - please test and let me know if ok. If so, I
will do the backports.
Thanks and regards,
Bogdan
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1890988&group_id=139143
More information about the Devel
mailing list