ace0290
diff -urp opencryptoki-2.4.orig/usr/lib/pkcs11/api/shrd_mem.c opencryptoki-2.4/usr/lib/pkcs11/api/shrd_mem.c
ace0290
--- opencryptoki-2.4.orig/usr/lib/pkcs11/api/shrd_mem.c.in	2011-08-15 08:17:14.000000000 -0400
ace0290
+++ opencryptoki-2.4/usr/lib/pkcs11/api/shrd_mem.c.in	2011-08-15 10:22:49.000000000 -0400
ace0290
@@ -351,43 +351,6 @@ attach_shared_memory() {
ace0290
       return NULL;
ace0290
    }
ace0290
 
ace0290
-
ace0290
-   // SAB check for the group id here and membership here as well
ace0290
-   grp = getgrnam("pkcs11");
ace0290
-   if ( grp ) {
ace0290
-        int i=0;
ace0290
-        char member=0;
ace0290
-
ace0290
-        pw = getpwuid(getuid());
ace0290
-
ace0290
-        epw = getpwuid(geteuid());
ace0290
-
ace0290
-        while( grp->gr_mem[i] ) {
ace0290
-           if (pw) {
ace0290
-             if ( strncmp(pw->pw_name, grp->gr_mem[i],strlen(pw->pw_name)) == 0 ){
ace0290
-                member = 1;
ace0290
-                break;
ace0290
-             }
ace0290
-           }
ace0290
-           if (epw) {
ace0290
-              if ( strncmp(epw->pw_name, grp->gr_mem[i],strlen(epw->pw_name)) == 0 ){
ace0290
-                  member = 1;
ace0290
-                  break; 
ace0290
-              }
ace0290
-           }
ace0290
-           i++;
ace0290
-        }
ace0290
-        if ( ! member ) {
ace0290
-             return NULL;  // SAB don't bother even attaching...
ace0290
-        }
ace0290
-
ace0290
-
ace0290
-   } else {
ace0290
-        return NULL;
ace0290
-   }
ace0290
-
ace0290
-
ace0290
-   
ace0290
    Anchor->shm_tok = ftok(TOK_PATH,'b');
ace0290
 
ace0290
    // Get the shared memory id.