Merged revisions 90098 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90098 | kpfleming | 2007-11-28 16:30:46 -0600 (Wed, 28 Nov 2007) | 2 lines

it is impossible to set permissions for manager accounts created by users.conf (reported internally, patched by me)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2007-11-28 22:44:38 +00:00
parent cbe59ac93e
commit 57c2bcca86
2 changed files with 10 additions and 2 deletions

View File

@@ -46,6 +46,11 @@ hasiax = yes
; ;
hasmanager = no hasmanager = no
; ;
; Set permissions for manager entry (see manager.conf.sample for documentation)
; (defaults to *all* permissions)
;managerread = system,call,log,verbose,command,agent,user,config
;managerwrite = system,call,log,verbose,command,agent,user,config
;
; Remaining options are not specific to users.conf entries but are general. ; Remaining options are not specific to users.conf entries but are general.
; ;
callwaiting = yes callwaiting = yes

View File

@@ -1037,9 +1037,12 @@ static int authenticate(struct mansession *s, const struct message *m)
ast_log(LOG_WARNING, "Invalid writetimeout value '%s' at line %d\n", v->value, v->lineno); ast_log(LOG_WARNING, "Invalid writetimeout value '%s' at line %d\n", v->value, v->lineno);
else else
s->writetimeout = val; s->writetimeout = val;
} else if (!strcasecmp(v->name, "hasmanager")) { } else if (!strcasecmp(v->name, "hasmanager"))
hasmanager = ast_true(v->value); hasmanager = ast_true(v->value);
} else if (!strcasecmp(v->name, "managerread"))
readperm = get_perm(v->value);
else if (!strcasecmp(v->name, "managerwrite"))
writeperm = get_perm(v->value);
} }
ast_config_destroy(cfg); ast_config_destroy(cfg);
if (!hasmanager) { if (!hasmanager) {