enable to switch off authz checks
authorMiloš Mulač <mulac@civ.zcu.cz>
Mon, 4 Sep 2006 12:21:33 +0000 (12:21 +0000)
committerMiloš Mulač <mulac@civ.zcu.cz>
Mon, 4 Sep 2006 12:21:33 +0000 (12:21 +0000)
org.glite.jp.primary/src/authz.c
org.glite.jp.primary/src/bones_server.c

index f7f415f..39451d4 100644 (file)
@@ -33,7 +33,7 @@ int glite_jpps_authz(glite_jp_context_t ctx,int op,const char *job,const char *o
                case SOAP_TYPE___jpsrv__GetJobAttributes:
                case SOAP_TYPE___jpsrv__RecordTag:
                        assert(owner);
-                       if (strcmp(owner,ctx->peer)) {
+                       if (!ctx->noauth && strcmp(owner,ctx->peer)) {
                                err.desc = "you are not a job owner";
                                glite_jp_stack_error(ctx,&err);
                                return 1;
index d2c37b2..dd7b4b4 100644 (file)
@@ -71,7 +71,7 @@ int main(int argc, char *argv[])
 
        b_argc = p_argc = 1;
 
-       while ((opt = getopt(argc,argv,"B:P:a:p:s:dl:i:c:k:")) != EOF) switch (opt) {
+       while ((opt = getopt(argc,argv,"B:P:a:p:s:dl:i:c:k:n")) != EOF) switch (opt) {
                case 'B':
                        assert(b_argc < 20);
                        if (com = strchr(optarg,',')) *com = 0;
@@ -106,6 +106,7 @@ int main(int argc, char *argv[])
                case 'i': strncpy(pidfile,optarg,PATH_MAX); pidfile[PATH_MAX-1] = 0; break;
                case 'c': server_cert = optarg; break;
                case 'k': server_key = optarg; break;
+               case 'n': ctx->noauth = 1; break;
                case '?': fprintf(stderr,"usage: %s: -Bb,val ... -Pplugin.so ...\n"
                                          "b is backend option\n",argv[0]);
                          exit (1);