From: Zdeněk Salvet Date: Tue, 28 Aug 2007 09:46:36 +0000 (+0000) Subject: Don't allow registering job over unauthenticated direct connection. X-Git-Tag: glite-lb-client_R_3_0_1_1~21 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=b454f4697f9df5400386256fbaafc578e50210d3;p=jra1mw.git Don't allow registering job over unauthenticated direct connection. --- diff --git a/org.glite.lb.server/src/store.c.T b/org.glite.lb.server/src/store.c.T index 4a2fa1d..6c99416 100644 --- a/org.glite.lb.server/src/store.c.T +++ b/org.glite.lb.server/src/store.c.T @@ -535,7 +535,8 @@ static int check_auth(edg_wll_Context ctx,edg_wll_Event *e) edg_wll_ResetError(ctx); if (e->type == EDG_WLL_EVENT_REGJOB) - return strcmp(e->any.user,EDG_WLL_LOG_USER_DEFAULT) ? + return ((ctx->isProxy || ctx->peerName) && + strcmp(e->any.user,EDG_WLL_LOG_USER_DEFAULT)) ? 0 : edg_wll_SetError(ctx,EPERM,"can't register jobs anonymously"); trio_asprintf(&q,"select userid from jobs where jobid='%|Ss'",jobid);