From: Zdeněk Salvet Date: Mon, 29 Nov 2004 22:00:27 +0000 (+0000) Subject: Reimplement NO_GACL and NO_VOMS cases in a type-clean manner. X-Git-Tag: glite-deployment-lb_R_0_1_0~80 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=29682f1137091654d990a3314607b5a7dbc4e431;p=jra1mw.git Reimplement NO_GACL and NO_VOMS cases in a type-clean manner. --- diff --git a/org.glite.lb.server/src/lb_authz.c b/org.glite.lb.server/src/lb_authz.c index 15b22ba..cd9920c 100644 --- a/org.glite.lb.server/src/lb_authz.c +++ b/org.glite.lb.server/src/lb_authz.c @@ -5,6 +5,9 @@ #include #include +#include "glite/lb/context-int.h" +#include "lb_authz.h" + #ifndef NO_VOMS #include @@ -16,7 +19,6 @@ #include "glite/wmsutils/jobid/cjobid.h" #include "glite/lb/producer.h" #include "glite/lb/trio.h" -#include "lb_authz.h" #include "lbs_db.h" /* XXX should be defined in gridsite-gacl.h */ @@ -263,9 +265,13 @@ edg_wll_FreeVomsGroups(edg_wll_VomsGroups *groups) #else /* NO_VOMS */ int -edg_wll_SetVomsGroups() { return 0; } +edg_wll_SetVomsGroups(edg_wll_Context ctx, edg_wll_GssConnection *gss, char *server_cert, + char *server_key, char *voms_dir, char *ca_dir) +{ + return 0; +} -void edg_wll_FreeVomsGroups() {} +void edg_wll_FreeVomsGroups(edg_wll_VomsGroups *groups) {} #endif @@ -903,14 +909,24 @@ end: #else /* VOMS & GACL */ -int edg_wll_CheckACL() { return EPERM; } -int edg_wll_EncodeACL() { return 0; } -int edg_wll_DecodeACL() { return 0; } -int edg_wll_InitAcl() { return 0; } -int edg_wll_FreeAcl() { return 0; } -int edg_wll_HandleCounterACL() { return 0; } -int edg_wll_UpdateACL() { return 0; } -int edg_wll_GetACL() { return 0; } +int edg_wll_CheckACL(edg_wll_Context ctx, edg_wll_Acl acl, int requested_perm) { return EPERM; } + +#ifndef NO_GACL +int edg_wll_EncodeACL(GRSTgaclAcl *acl, char **str) { return 0; } +int edg_wll_DecodeACL(char *buf, GRSTgaclAcl **result_acl) { return 0; } +#else +int edg_wll_EncodeACL(void *acl, char **str) { return 0; } +int edg_wll_DecodeACL(char *buf, void **result_acl) { return 0; } +#endif + +int edg_wll_InitAcl(edg_wll_Acl *acl) { return 0; } +void edg_wll_FreeAcl(edg_wll_Acl acl) { } +int edg_wll_HandleCounterACL(edg_wll_Context ctx, edg_wll_Acl acl, + char *aclid, int incr) { return 0; } +int edg_wll_UpdateACL(edg_wll_Context ctx, edg_wlc_JobId job, + char *user_id, int user_id_type, + int permission, int perm_type, int operation) { return 0; } +int edg_wll_GetACL(edg_wll_Context ctx, edg_wlc_JobId jobid, edg_wll_Acl *acl) { return 0; } #endif diff --git a/org.glite.lb.server/src/lb_authz.h b/org.glite.lb.server/src/lb_authz.h index 6c37a62..137dd57 100644 --- a/org.glite.lb.server/src/lb_authz.h +++ b/org.glite.lb.server/src/lb_authz.h @@ -15,14 +15,25 @@ typedef struct _edg_wll_Acl { } _edg_wll_Acl; typedef struct _edg_wll_Acl *edg_wll_Acl; -#ifndef NO_VOMS - # ifndef NO_GACL -#include +extern int +edg_wll_DecodeACL(char *, GRSTgaclAcl **); + +extern int +edg_wll_EncodeACL(GRSTgaclAcl *, char **); + +#else -#include "glite/lb/context-int.h" -#include "glite/lb/lb_gss.h" +extern int +edg_wll_DecodeACL(char *, void **); + +extern int +edg_wll_EncodeACL(void *, char **); + +#endif /* NO_GACL */ + +/* we have NO_VOMS||NO_GACL placeholders for following routines */ extern int edg_wll_InitAcl(edg_wll_Acl *); @@ -37,22 +48,12 @@ extern int edg_wll_CheckACL(edg_wll_Context, edg_wll_Acl, int); extern int -edg_wll_DecodeACL(char *, GRSTgaclAcl **); - -extern int -edg_wll_EncodeACL(GRSTgaclAcl *, char **); - -extern int edg_wll_GetACL(edg_wll_Context, edg_wlc_JobId, edg_wll_Acl *); -#endif /* NO_GACL */ - extern int edg_wll_SetVomsGroups(edg_wll_Context, edg_wll_GssConnection *, char *, char *, char *, char *); extern void edg_wll_FreeVomsGroups(edg_wll_VomsGroups *); -#endif /* NO_VOMS */ - #endif