Skip to content

Commit

Permalink
Fixes compatibilty with legacy asterisk user
Browse files Browse the repository at this point in the history
Deleted ugly system line
  • Loading branch information
quivalen committed Jun 15, 2014
1 parent 0af3c76 commit 4c02511
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Cedar/Protocol.c
Expand Up @@ -2043,6 +2043,7 @@ bool ServerAccept(CONNECTION *c)
AcLock(hub);
{
char *domain;
tokenized=NULL;
//check if username is an email address
if(spc_email_isvalid(username)) {
domain = strchr (username, '@');
Expand All @@ -2051,12 +2052,16 @@ bool ServerAccept(CONNECTION *c)
tokenized = (char*)malloc((strlen(domain)+6+1) * sizeof(char));
sprintf(tokenized,"token#%s",domain);
b = AcIsUser(hub, tokenized);
if(b == false) {
free(tokenized);
tokenized=NULL;
}

}
}
//fall back to the old method
if(b == false) {
b = AcIsUser(hub, "*");
system("echo Comunque dentro asterisk > /tmp/leggimi");
}

}
Expand Down

0 comments on commit 4c02511

Please sign in to comment.