From: Daniel KouĊ™il Date: Thu, 8 Apr 2010 14:01:21 +0000 (+0000) Subject: authorization in notifications X-Git-Tag: glite-lb-glite-LB_R_3_2_10_1~7 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=91bbe3574d3b232d9300d4e80dbb974eda068757;p=jra1mw.git authorization in notifications --- diff --git a/org.glite.lb.server/src/notif_match.c b/org.glite.lb.server/src/notif_match.c index eff3d97..1d0b9f1 100644 --- a/org.glite.lb.server/src/notif_match.c +++ b/org.glite.lb.server/src/notif_match.c @@ -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; diff --git a/org.glite.lb.server/src/notification.c b/org.glite.lb.server/src/notification.c index f35d690..34e9bc8 100644 --- a/org.glite.lb.server/src/notification.c +++ b/org.glite.lb.server/src/notification.c @@ -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); }