Enable job status query over socket (fixes the proxy purge, second part of the SB...
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 30 Apr 2012 10:13:20 +0000 (10:13 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Mon, 30 Apr 2012 10:13:20 +0000 (10:13 +0000)
org.glite.lb.server/src/lb_authz.c

index 02e3b7e..dd85425 100644 (file)
@@ -1219,12 +1219,14 @@ check_jobstat_authz(edg_wll_Context ctx,
                    int *authz_flags)
 {
     *authz_flags = 0;
+    if (job_flags & EDG_WLL_NOTIF_ANONYMIZE) *authz_flags |= READ_ANONYMIZED;
+
+    if (ctx->noAuth)
+       return 1;
 
     if (peer == NULL || peer->name == NULL)
        return 0;
 
-    if (job_flags & EDG_WLL_NOTIF_ANONYMIZE) *authz_flags |= READ_ANONYMIZED;
-
     if (edg_wll_gss_equal_subj(peer->name, stat->owner))
        return 1;
     if (stat->payload_owner && edg_wll_gss_equal_subj(peer->name, stat->payload_owner))
@@ -1233,8 +1235,7 @@ check_jobstat_authz(edg_wll_Context ctx,
     if ((!(*authz_flags & READ_ANONYMIZED)) && (check_authz_policy(&ctx->authz_policy, peer, READ_ANONYMIZED)))
        *authz_flags |= READ_ANONYMIZED;
 
-    if (ctx->noAuth ||
-       edg_wll_amIroot(peer->name, peer->fqans, &ctx->authz_policy))
+    if (edg_wll_amIroot(peer->name, peer->fqans, &ctx->authz_policy))
        return 1;
     if (acl && edg_wll_CheckACL_princ(ctx, acl, EDG_WLL_CHANGEACL_READ, peer) == 0)
        return 1;