From: Shiv Kaushal
Date: Tue, 28 Mar 2006 16:31:31 +0000 (+0000)
Subject: Fixed error in new_entry_form
X-Git-Tag: glite-security-proxyrenewal_R_1_3_0~25
X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=d7821cfa1862ce7711e97630b4780d116753413b;p=jra1mw.git
Fixed error in new_entry_form
---
diff --git a/org.gridsite.core/CHANGES b/org.gridsite.core/CHANGES
index 1cb570e..0d1fa98 100644
--- a/org.gridsite.core/CHANGES
+++ b/org.gridsite.core/CHANGES
@@ -1,3 +1,7 @@
+* Tue Mar 28 2006 Shiv Kaushal
+- Fixed bug in GACL admin interface that would cause
+ internal server erorr sometimes when adding new
+ entries to and ACL.
* Sat Mar 25 2006 Shiv Kaushal
- Change delegation header to Proxy-Delegation-Service
instead of Grst-
diff --git a/org.gridsite.core/src/grst_admin_gacl.c b/org.gridsite.core/src/grst_admin_gacl.c
index 2cb517a..bdcccbd 100644
--- a/org.gridsite.core/src/grst_admin_gacl.c
+++ b/org.gridsite.core/src/grst_admin_gacl.c
@@ -188,8 +188,9 @@ void new_entry_form(GRSTgaclUser *user, char *dn, GRSTgaclPerm perm,char *help_u
GRSTgaclEntry *entry;
GRSTgaclNamevalue* namevalue;
- if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden");
+ if (!GRSTgaclPermHasAdmin(perm)) GRSThttpError ("403 Forbidden");
+ entry = GRSTgaclEntryNew();
StartHTML(&bp, dir_uri, dir_path);
StartForm(&bp, dir_uri, dir_path, admin_file, timestamp, "new_entry");
GRSThttpPrintf (&bp, "NEW ENTRY IN ACL FOR %s
\n", dir_uri);
@@ -831,7 +832,7 @@ void GRSTgaclCredTableEnd(GRSTgaclEntry* entry, int entry_no, int admin, int tim
if (strcmp(cmd, "add_cred_form")==0 ||strcmp(cmd, "del_cred_sure")==0) show_perms=0; else show_perms=1;
if (strcmp(cmd, "edit_entry_form")==0 || strcmp(cmd, "new_entry_form")==0) edit_perms=1; else edit_perms=0;
- if (strcmp(cmd, "new_entry_form")==0) blank_perms=1; else blank_perms=0;
+ if (strcmp(cmd, "new_entry_form")==0) blank_perms=1; else blank_perms=0;
// If showing the last row is not required then exit
if (show_perms==0){GRSThttpPrintf (bp,"
\n"); return;}
@@ -842,7 +843,7 @@ void GRSTgaclCredTableEnd(GRSTgaclEntry* entry, int entry_no, int admin, int tim
GRSThttpPrintf (bp, "\n | ");
- if (blank_perms) entry->allowed=entry->denied=GRST_PERM_NONE;
+ if (blank_perms==1)entry->allowed=entry->denied=GRST_PERM_NONE;
// Show Permissions - will produce a list or a list of check boxes depending on whether the permissions are to be edited or not
GRSThttpPrintf (bp, "Allowed: ");
|