authorization in notifications
authorDaniel Kouřil <kouril@ics.muni.cz>
Thu, 8 Apr 2010 14:01:21 +0000 (14:01 +0000)
committerDaniel Kouřil <kouril@ics.muni.cz>
Thu, 8 Apr 2010 14:01:21 +0000 (14:01 +0000)
org.glite.lb.server/src/notif_match.c
org.glite.lb.server/src/notification.c

index eff3d97..1d0b9f1 100644 (file)
@@ -235,6 +235,9 @@ static int notif_check_acl(edg_wll_Context ctx,const edg_wll_JobStat *stat,const
        edg_wll_ResetError(ctx);
        if (strcmp(stat->owner,recip) == 0
                || edg_wll_amIroot(recip,NULL,&ctx->authz_policy)) return 1;
+       princ.name = (char *)recip;
+       if (check_authz_policy(&ctx->authz_policy, &princ, READ_ALL))
+               return 1;
 
        if (stat->acl) {
                ret = edg_wll_DecodeACL(stat->acl,&acl->value);
@@ -253,7 +256,6 @@ static int notif_check_acl(edg_wll_Context ctx,const edg_wll_JobStat *stat,const
                edg_wll_ResetError(ctx);
        }
 
-       princ.name = (char *)recip;
        if (check_authz_policy(&ctx->authz_policy, &princ, STATUS_FOR_MONITORING)) {
                *authz_flags |= STATUS_FOR_MONITORING;
                 return 1;
index f35d690..34e9bc8 100644 (file)
@@ -513,7 +513,7 @@ static int check_notif_request(
        char    **destination)
 {
        char       *nid_s = NULL,
-                          *stmt, *user, *dest = NULL;
+                          *stmt = NULL, *user, *dest = NULL;
        int                     ret;
        glite_lbu_Statement     s = NULL;
 
@@ -731,7 +731,7 @@ static int update_notif(
                        char *errt, *errd;
 
                        edg_wll_Error(ctx, &errt, &errd);
-                       glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_ERROR, "edg_wll_NotifChangeIL(): %s (%s)");
+                       glite_common_log(LOG_CATEGORY_CONTROL, LOG_PRIORITY_ERROR, "edg_wll_NotifChangeIL(): %s (%s)", errt, errd);
                        free(errt);
                        free(errd);
                }