You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Nick Betteridge <n....@syntactics.com> on 2001/09/10 15:36:43 UTC
Service C code and security manager problem
I'm trying to set up catalina as a service running as a daemon and
implement the security manager.
I've hit a problem which is that arguments.c in
{catalina_src)/server/native :
a) doesn't provide for more than 1 '=' sign in a -D property (needed
for -Djava.security.policy==/../../../conf/catalina.policy)
b) doesn't provide for a null argument to a -D property (needed for
-Djava.security.manager)
Has anyone written a work around for this?
Thanks
NIck
Re: Service C code and security manager problem
Posted by Nick Betteridge <n....@syntactics.com>.
I just tried this and I think that it might be OK (in arguments.c) ...
} else if (strstr(argv[x],"-verbose")==argv[x]) {
args->opts[args->onum++]=strdup(argv[x]);
/* } else if (strcmp(argv[x],"-D")==0) {
log_error("Parameter -D must be followed by
<name>=<value>");
*/ return(NULL);
} else if (strstr(argv[x],"-D")==argv[x]) {
temp=strchr(argv[x],'=');
/* if (temp==NULL) {
log_error("Parameter -D must contain one '='
character");
return(NULL);
}
*/ if (temp==argv[x]+2) {
log_error("A property name must be specified before
'='");
return(NULL);
}
args->opts[args->onum++]=strdup(argv[x]);
... It compiles OK but is not an elegant solution!