summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2010-07-01 11:39:47 -0700
committerNoriko Hosoi <nhosoi@redhat.com>2010-07-07 17:17:19 -0700
commite9a26dca776e3d812ae634fb6d3f2836499d7356 (patch)
treec528329c9a4dc68d0c2e6613d2ab93905e9edde8 /lib
parentce1ac026add75269d75adc215edac5e01a650e22 (diff)
downloadds-e9a26dca776e3d812ae634fb6d3f2836499d7356.tar.gz
ds-e9a26dca776e3d812ae634fb6d3f2836499d7356.tar.xz
ds-e9a26dca776e3d812ae634fb6d3f2836499d7356.zip
609255 - fix coverity Defect Type: Memory - illegal accesses issues
https://bugzilla.redhat.com/show_bug.cgi?id=609255 12241 Triaged Unassigned Bug Minor Fix Required delete_acl_from_file(char *, char *…) ds/lib/libaccess/acltools.cpp 12242 UNINIT Triaged Unassigned Bug Minor Fix Required get_acl_from_file(char *, char *, ACLListHandle **…) ds/lib/libaccess/acltools.cpp 12243 UNINIT Triaged Unassigned Bug Minor Fix Required ACL_FileGetNameList() ds/lib/libaccess/acltools.cpp 12244 UNINIT Triaged Unassigned Bug Minor Fix Required ACL_FileGetNameList() ds/lib/libaccess/acltools.cpp 12245 UNINIT Triaged Unassigned Bug Minor Fix Required rename_acl_in_file(char *, char *, char *…) ds/lib/libaccess/acltools.cpp 12246 UNINIT Triaged Unassigned Bug Minor Fix Required append_acl_to_file(char *, char *, char *…) ds/lib/libaccess/acltools.cpp 12247 UNINIT Triaged Unassigned Bug Minor Fix Required append_acl_to_file(char *, char *, char *…) ds/lib/libaccess/acltools.cpp Comment: ACL_FileRenameAcl, ACL_FileDeleteAcl, ACL_FileGetAcl, ACL_FileSetAcl, ACL_FileMergeAcl, ACL_FileMergeFile and their helper functions are not used. These functions and their helper functions plus libaccess test programs under the directory ./utest are eliminated.
Diffstat (limited to 'lib')
-rw-r--r--lib/libaccess/acltools.cpp760
-rw-r--r--lib/libaccess/oneeval.cpp8
-rw-r--r--lib/libaccess/utest/.purify19
-rw-r--r--lib/libaccess/utest/Makefile147
-rw-r--r--lib/libaccess/utest/acl.dat44
-rw-r--r--lib/libaccess/utest/aclfile087
-rw-r--r--lib/libaccess/utest/aclfile143
-rw-r--r--lib/libaccess/utest/aclfile1045
-rw-r--r--lib/libaccess/utest/aclfile1143
-rw-r--r--lib/libaccess/utest/aclfile1243
-rw-r--r--lib/libaccess/utest/aclfile1343
-rw-r--r--lib/libaccess/utest/aclfile1443
-rw-r--r--lib/libaccess/utest/aclfile1543
-rw-r--r--lib/libaccess/utest/aclfile1643
-rw-r--r--lib/libaccess/utest/aclfile1743
-rw-r--r--lib/libaccess/utest/aclfile1851
-rw-r--r--lib/libaccess/utest/aclfile1946
-rw-r--r--lib/libaccess/utest/aclfile243
-rw-r--r--lib/libaccess/utest/aclfile343
-rw-r--r--lib/libaccess/utest/aclfile443
-rw-r--r--lib/libaccess/utest/aclfile543
-rw-r--r--lib/libaccess/utest/aclfile655
-rw-r--r--lib/libaccess/utest/aclfile743
-rw-r--r--lib/libaccess/utest/aclfile843
-rw-r--r--lib/libaccess/utest/aclfile943
-rw-r--r--lib/libaccess/utest/aclgrp042
-rw-r--r--lib/libaccess/utest/aclgrp142
-rw-r--r--lib/libaccess/utest/aclgrp242
-rw-r--r--lib/libaccess/utest/aclgrp342
-rw-r--r--lib/libaccess/utest/aclgrp442
-rw-r--r--lib/libaccess/utest/acltest.cpp794
-rw-r--r--lib/libaccess/utest/onetest.cpp77
-rw-r--r--lib/libaccess/utest/shexp.cpp331
-rw-r--r--lib/libaccess/utest/shexp.h168
-rw-r--r--lib/libaccess/utest/test.ref217
-rw-r--r--lib/libaccess/utest/testmain.cpp89
-rw-r--r--lib/libaccess/utest/twotest.cpp87
-rw-r--r--lib/libaccess/utest/ustubs.cpp331
38 files changed, 4 insertions, 4207 deletions
diff --git a/lib/libaccess/acltools.cpp b/lib/libaccess/acltools.cpp
index c93bbc6d..32ab5d74 100644
--- a/lib/libaccess/acltools.cpp
+++ b/lib/libaccess/acltools.cpp
@@ -2273,694 +2273,6 @@ acl_strstr(char * block, char * aclname)
}
-
-/*
- * local function: find the acl string from mapfile and return its acl structure
- */
-int
-get_acl_from_file(char * filename, char * aclname, ACLListHandle_t ** acllist_pp)
-{
- int rv = 0;
- char * pattern=NULL;
- char header[] = "version 3.0;\n";
- int headerlen = strlen(header);
- long filesize;
- FILE * file;
- char * mirror=NULL, * text=NULL, *nextname=NULL;
- char * block=NULL, * aclhead=NULL, * aclend=NULL;
-
- *acllist_pp = NULL;
-
- // build the acl name pattern, which should be acl "..."
- // the ".." is built by acl_to_str_create
-
- if (aclname==NULL) {
- rv = ACLERRUNDEF;
- goto get_cleanup;
- }
-
- if ((pattern=(char *)PERM_MALLOC(strlen(aclname) + 1))==NULL) {
- rv = ACLERRNOMEM;
- goto get_cleanup;
- }
- else {
- sprintf(pattern,"%s", aclname);
- str_tolower(pattern);
- }
-
- /* get the acl text from the mapfile */
- if ((rv=open_file_buf(&file, filename, "rb", &block, &filesize))<0)
- goto get_cleanup;
-
- if ((mirror = (char *) PERM_MALLOC(filesize+1))==NULL) {
- rv = ACLERRNOMEM;
- goto get_cleanup;
- }
-
- memcpy(mirror, block, filesize);
- mirror[filesize]=0;
- str_tolower(mirror);
-
- if ((aclhead = acl_strstr(mirror, pattern))!=NULL) {
- // use mirror to search, then transfer to work on block;
- aclhead = block + (aclhead - mirror);
- acl_get_first_name(aclhead+3, &nextname, &aclend);
- aclend = acl_strstr(aclhead+3, nextname);
- if (aclend == NULL) {
- // this is the last acl in the file
- aclend = &aclhead[strlen(aclhead)];
- }
-
- int len = aclend - aclhead;
- text = (char *) PERM_MALLOC(len + headerlen + 1);
- sprintf(text, "%s", header);
- memcpy(&text[headerlen], aclhead, len);
- text[headerlen + len] = 0;
-
- if ((*acllist_pp=ACL_ParseString(NULL, text))==NULL) {
- rv = ACLERRPARSE;
- }
- }
-
-get_cleanup:
- if (pattern)
- PERM_FREE(pattern);
- if (file)
- close_file_buf(file, filename, "rb", block);
- if (mirror)
- PERM_FREE(mirror);
- if (text)
- PERM_FREE(text);
- if (nextname)
- PERM_FREE(nextname);
- return rv;
-}
-
-
-/*
- * local function: delete the acl string from mapfile
- */
-int
-delete_acl_from_file(char * filename, char * aclname)
-{
- char * pattern=NULL;
- char header[] = "version 3.0;\n";
- int headerlen = strlen(header);
- int rv = ACLERRUNDEF;
- long filesize;
- FILE * file;
- char * mirror=NULL, * text=NULL, * nextname=NULL;
- char * block=NULL, * aclhead=NULL, * aclend=NULL;
- int remain;
-
- // build the acl name pattern, which should be acl "..."
- // the ".." is built by acl_to_str_create
-
- if (aclname==NULL) {
- rv = ACLERRUNDEF;
- goto delete_cleanup;
- }
-
- if ((pattern=(char *)PERM_MALLOC(strlen(aclname) + 10))==NULL) {
- rv = ACLERRNOMEM;
- goto delete_cleanup;
- }
- else {
- sprintf(pattern,"%s", aclname);
- str_tolower(pattern);
- }
-
- /* file the acl text from the mapfile */
- if ((rv=open_file_buf(&file, filename, "rb", &block, &filesize))<0)
- goto delete_cleanup;
-
- if ((mirror = (char *) PERM_MALLOC(filesize+1))==NULL) {
- rv = ACLERRNOMEM;
- goto delete_cleanup;
- }
-
- memcpy(mirror, block, filesize);
- mirror[filesize]=0;
- str_tolower(mirror);
-
- if ((aclhead = acl_strstr(mirror, pattern))!=NULL) {
- // use mirror to search, then transfer to work on block;
- aclhead = block + (aclhead - mirror);
- acl_get_first_name(aclhead+3, &nextname, &aclend);
- aclend = acl_strstr(aclhead+3, nextname);
- if (aclend == NULL) {
- // this is the last acl in the file
- aclend = &aclhead[strlen(aclhead)];
- }
-
- int len = aclend - aclhead;
- text = (char *) PERM_MALLOC(len + headerlen + 1);
- sprintf(text, "%s", header);
- memcpy(&text[headerlen], aclhead, len);
- text[headerlen + len] = 0;
-
- if (ACL_ParseString(NULL, text)==NULL) {
- rv = ACLERRPARSE;
- goto delete_cleanup;
- }
- }
-
- if (aclhead!=NULL) { // found the acl in the map file
-
- // int filesize = mpfile->Size();
-
- remain = strlen(aclend);
- if (memcpy(aclhead, aclend, remain)!=NULL)
- rv = 0;
- else
- rv = ACLERRIO;
-
- aclhead[remain]=0;
-
- block = (char *) PERM_REALLOC(block, strlen(block)+1);
- }
- else
- rv = ACLERRUNDEF;
-
-delete_cleanup:
- if (pattern)
- PERM_FREE(pattern);
- if (text)
- PERM_FREE(text);
- if (mirror)
- PERM_FREE(mirror);
- if (nextname)
- PERM_FREE(nextname);
- if (file)
- close_file_buf(file, filename, "wb", block);
- return rv;
-}
-
-/*
- * local function: append the acl string to file
- */
-int
-append_acl_to_file(char * filename, char * aclname, char * acltext)
-{
- int rv;
- /* acltext has been parsed to verify syntax up to this point */
- char * pattern=NULL;
- char * start=NULL;
- char * block;
- long filesize;
- FILE * file;
- long len;
-
- if ((pattern=(char *)PERM_MALLOC(strlen(aclname) + 10))==NULL) {
- rv = ACLERRNOMEM;
- goto append_cleanup;
- }
- else {
- sprintf(pattern,"%s", aclname);
- }
-
- if ((rv=open_file_buf(&file, filename, "rb", &block, &filesize))<0)
- goto append_cleanup;
-
- // find the begining of acl, skip the version part
-
- len = strlen(block);
- start = acl_strstr(acltext, pattern);
- if ((block=(char *)PERM_REALLOC(block, len+strlen(start)+1))==NULL) {
- rv = ACLERRNOMEM;
- goto append_cleanup;
- }
- strcat(block, start);
-
-append_cleanup:
- if (pattern)
- PERM_FREE(pattern);
- if (file)
- close_file_buf(file, filename, "wb", block);
-
- return rv;
-}
-
-
-
-/*
- * local function: rename the acl name in the file
- */
-int
-rename_acl_in_file(char * filename, char * aclname, char * newname)
-{
- char * pattern=NULL;
- char header[] = "version 3.0;\n";
- int headerlen = strlen(header);
- int rv = 0;
- long filesize;
- FILE * file;
- int remain;
- long len;
- char * text=NULL, * mirror=NULL, * nextname=NULL;
- char * block=NULL, * aclhead=NULL, * aclend=NULL;
- char * cut=NULL;
- acl_string_t str_t = {NULL,0,0};
-
- // build the acl name pattern, which should be acl "..."
- // the ".." is built by acl_to_str_create
-
- if (aclname==NULL || newname==NULL) {
- rv = ACLERRUNDEF;
- goto rename_cleanup;
- }
-
- if ((pattern=(char *)PERM_MALLOC(strlen(aclname) + 10))==NULL) {
- rv = ACLERRNOMEM;
- goto rename_cleanup;
- }
- else {
- sprintf(pattern,"%s", aclname);
- str_tolower(pattern);
- }
-
- // file the acl text from the mapfile
- if ((rv=open_file_buf(&file, filename, "rb", &block, &filesize))<0)
- goto rename_cleanup;
-
- if ((mirror = (char *) PERM_MALLOC(filesize+1))==NULL) {
- rv = ACLERRNOMEM;
- goto rename_cleanup;
- }
-
- memcpy(mirror, block, filesize);
- mirror[filesize]=0;
- str_tolower(mirror);
-
- if ((aclhead = acl_strstr(mirror, pattern))!=NULL) {
- // use mirror to search, then transfer to work on block;
- aclhead = block + (aclhead - mirror);
- acl_get_first_name(aclhead+3, &nextname, &aclend);
- aclend = acl_strstr(aclhead+3, nextname);
- if (aclend == NULL) {
- // this is the last acl in the file
- aclend = &aclhead[strlen(aclhead)];
- }
-
- len = aclend - aclhead;
- text = (char *) PERM_MALLOC(len + headerlen + 1);
- sprintf(text, "%s", header);
- memcpy(&text[headerlen], aclhead, len);
- text[headerlen + len] = 0;
-
- if (ACL_ParseString(NULL, text)==NULL) {
- rv = ACLERRPARSE;
- goto rename_cleanup;
- }
- }
-
- if (aclhead!=NULL) { // found the acl in the map file
-
- remain = strlen(aclend);
- // delete the acltext from where it is
- if (memcpy(aclhead, aclend, remain)!=NULL)
- rv = 0;
- else
- rv = ACLERRUNDEF;
-
- aclhead[remain] = 0;
- len = strlen(block);
-
- /* establish the renamed the acl */
- acl_to_str_append(&str_t, "acl \"");
- acl_to_str_append(&str_t, newname);
- acl_to_str_append(&str_t, "\";");
- /* skip acl "..."; the semicollon in the last counts for the +1
- add the rest acl text to str_t */
- cut = strchr(text, ';'); // skip version ...;
- cut = strchr(cut+1, ';') + 1; // skip acl ...;
- if (cut==NULL) {
- rv = ACLERRUNDEF;
- goto rename_cleanup;
- }
- acl_to_str_append(&str_t, cut);
- // acl_to_str_append(&str_t, "\n");
-
- if ((block=(char *) PERM_REALLOC(block, len + strlen(str_t.str) + 1))==NULL) {
- rv = ACLERRNOMEM;
- goto rename_cleanup;
- }
- // strcat(block, "\n");
- strcat(block, str_t.str);
- }
- else
- rv = ACLERRUNDEF;
-
-rename_cleanup:
- if (pattern)
- PERM_FREE(pattern);
- if (text)
- PERM_FREE(text);
- if (mirror)
- PERM_FREE(mirror);
- if (nextname)
- PERM_FREE(nextname);
- if (str_t.str)
- PERM_FREE(str_t.str);
- if (file)
- close_file_buf(file, filename, "wb", block);
- return rv;
-}
-
-
-/*
- * Retrieves the definition of a named ACL
- *
- * Input:
- * errp a error stack
- * filename Target ACL file
- * acl_name Name of the target ACL
- * acl_text a dynmaically allocated text (result)
- * Output:
- * errp error stack is set on error
- * Returns:
- * 0 success
- * <0 failure
- */
-NSAPI_PUBLIC int
-ACL_FileGetAcl(NSErr_t *errp,
- char *filename,
- char *acl_name,
- // ACLListHandle_t **acllist_p,
- char ** acltext,
- int flags)
-{
- int rv;
- ACLListHandle_t * acllist_p;
-
- if (acl_parse_crit == NULL)
- acl_parse_crit = crit_init();
-
- crit_enter( acl_parse_crit );
-
- rv = get_acl_from_file(filename, acl_name, &acllist_p);
-
- if (acllist_p == NULL) {
- *acltext = NULL;
- goto get_cleanup;
- }
-
- /*
- if ((rv=ACL_Decompose(errp, acltext, acllist_p))<0) {
- *acltext = NULL;
- goto get_cleanup;
- }
- */
- if ((rv=ACL_WriteString(errp, acltext, acllist_p))<0) {
- *acltext = NULL;
- goto get_cleanup;
- }
-
-
-get_cleanup:
-
- crit_exit( acl_parse_crit );
-
- return rv;
-}
-
-
-
-/*
- * Delete a named ACL from an ACL file
- *
- * Input:
- * errp a error stack
- * filename Target ACL file
- * acl_name Name of the target ACL
- * Output:
- * errp error stack is set on error
- * Returns:
- * 0 success
- * < 0 failure
- */
-
-NSAPI_PUBLIC int
-ACL_FileDeleteAcl(NSErr_t *errp,
- char *filename,
- char *acl_name,
- int flags)
-{
- int rv = 0;
-
- if ( acl_parse_crit == NULL )
- acl_parse_crit = crit_init();
-
- crit_enter( acl_parse_crit );
-
- rv = delete_acl_from_file(filename, acl_name);
-
- crit_exit( acl_parse_crit );
- return(rv);
-}
-
-
-/*
- * Sets the definition of an ACL in an ACL file
- *
- * Input:
- * errp a error stack
- * filename Target ACL file
- * acl_name Name of the target ACL
- * acl_text a string that defines the new ACL
- * Output:
- * errp error stack is set on error
- * Returns:
- * 0 success
- * < 0 failure
- */
-
-NSAPI_PUBLIC int
-ACL_FileSetAcl(NSErr_t *errp,
- char *filename,
- char *acl_text,
- int flags)
-{
- int rv = 0;
- ACLListHandle_t *new_acl_list = NULL;
- char **acl_name_list = NULL;
-
- if ( acl_parse_crit == NULL )
- acl_parse_crit = crit_init();
-
- crit_enter( acl_parse_crit );
-
- // get the acl name.
- new_acl_list = ACL_ParseString(errp, acl_text);
- if ( new_acl_list == NULL ) {
- rv = ACLERRPARSE;
- goto set_cleanup;
- }
-
- if ( ACL_ListGetNameList(errp, new_acl_list, &acl_name_list) < 0 ) {
- rv = ACLERRNOMEM;
- goto set_cleanup;
- }
-
-
- delete_acl_from_file(filename, acl_name_list[0]);
- rv = append_acl_to_file(filename, acl_name_list[0], acl_text);
-
-set_cleanup:
-
- crit_exit( acl_parse_crit );
- if (new_acl_list)
- ACL_ListDestroy(errp, new_acl_list);
- if (acl_name_list)
- free(acl_name_list);
- return(rv);
-}
-
-
-/*
- * Rename a named ACL in ACL text file
- *
- * Input:
- * errp a error stack
- * filename Target ACL file
- * acl_name Name of the target ACL
- * new_acl_name New ACL name
- * Output:
- * errp error stack is set on error
- * Returns:
- * 0 success
- * < 0 failure
- */
-
-NSAPI_PUBLIC int
-ACL_FileRenameAcl(NSErr_t *errp,
- char *filename,
- char *aclname,
- char *newname,
- int flags)
-{
- int rv = 0;
-
- if ( acl_parse_crit == NULL )
- acl_parse_crit = crit_init();
-
- crit_enter( acl_parse_crit );
-
- rv = rename_acl_in_file(filename, aclname, newname);
-
- crit_exit( acl_parse_crit );
- return(rv);
-
-}
-
-
-//
-// Merge a list of ACLs into one ACL
-//
-// Input:
-// filename the target acl file
-// acl_list ACLs to merge
-// new_acl_name resultant ACL
-// flags currently ignored
-// Returns:
-// 0 success
-// < 0 failure
-//
-
-NSAPI_PUBLIC int
-ACL_FileMergeAcl(NSErr_t *errp,
- char *filename,
- char **acl_name_list,
- char *new_acl_name,
- int flags)
-{
- ACLListHandle_t *new_acl_list = NULL;
- ACLListHandle_t *tmp_acl_list = NULL;
- int ii;
- int rv;
- ACLHandle_t *tmp_acl;
- ACLHandle_t *new_acl;
- ACLExprHandle_t *expr;
-
-
- tmp_acl_list = ACL_ParseFile(errp, filename);
- if ( tmp_acl_list == NULL ) {
- rv = ACLERRPARSE;
- goto cleanup;
- }
-
- new_acl_list = ACL_ParseFile(errp, filename);
- if ( new_acl_list == NULL ) {
- rv = ACLERRPARSE;
- goto cleanup;
- }
-
- // first get rid of all the ACLs that will be merged
-
- for (ii = 0; acl_name_list[ii]; ii++) {
- rv = ACL_ListAclDelete(errp, new_acl_list, acl_name_list[ii], flags);
- if ( rv < 0 )
- goto cleanup;
- }
-
- // now create ACL to house the merged result
- new_acl = ACL_AclNew(errp, new_acl_name);
- if ( new_acl == NULL ) {
- rv = ACLERRNOMEM;
- goto cleanup;
- }
-
- rv = ACL_ListAppend(errp, new_acl_list, new_acl, flags);
- if ( rv < 0 )
- goto cleanup;
-
- for (ii = 0; acl_name_list[ii]; ii++) {
- tmp_acl = ACL_ListFind(errp, tmp_acl_list, acl_name_list[ii], flags);
- if ( tmp_acl == NULL ) {
- rv = ACLERRUNDEF;
- goto cleanup;
- }
- for (expr = tmp_acl->expr_list_head; expr; expr = expr->expr_next) {
- // This call can't really fail unless we pass it a NULL
- // or some memory is corrupt.
- rv = ACL_ExprAppend(errp, new_acl, expr);
- if ( rv < 0 )
- goto cleanup;
- tmp_acl->expr_list_head = expr->expr_next;
- tmp_acl->expr_count--;
- }
-
- // Last bit of clean up so the destroy routine isn't confused.
-
- tmp_acl->expr_list_tail = NULL;
- tmp_acl->expr_count = 0;
- }
-
- rv = ACL_WriteFile(errp, filename, new_acl_list);
-
-cleanup:
- if ( new_acl_list )
- ACL_ListDestroy(errp, new_acl_list);
- if ( tmp_acl_list )
- ACL_ListDestroy(errp, tmp_acl_list);
- return(rv);
-}
-
-//
-// Merge a list of ACL files into one ACL file
-//
-// Input:
-// filename the target acl file
-// file_list ACL files to merge
-// flags currently ignored
-// Returns:
-// 0 success
-// < 0 failure
-//
-
-NSAPI_PUBLIC int
-ACL_FileMergeFile(NSErr_t *errp,
- char *filename,
- char **file_list,
- int flags)
-{
- ACLListHandle_t *new_acl_list = NULL;
- ACLListHandle_t *tmp_acl_list = NULL;
- int ii;
- int rv;
-
- // we don't care if they have nothing to do
-
- if ( filename == NULL || file_list == NULL )
- return(0);
-
- new_acl_list = ACL_ListNew(errp);
- if (new_acl_list == NULL)
- return(ACLERRNOMEM);
-
- for (ii = 0; file_list[ii]; ii++) {
- tmp_acl_list = ACL_ParseFile(errp, file_list[ii]);
- if (tmp_acl_list == NULL) {
- rv = ACLERRPARSE;
- goto cleanup;
- }
- rv = ACL_ListConcat(errp, new_acl_list, tmp_acl_list, flags);
- if ( rv < 0 )
- goto cleanup;
- ACL_ListDestroy(errp, tmp_acl_list);
- tmp_acl_list = NULL;
- }
-
- rv = ACL_WriteFile(errp, filename, new_acl_list);
-
-cleanup:
- if ( new_acl_list )
- ACL_ListDestroy(errp, new_acl_list);
- if ( tmp_acl_list )
- ACL_ListDestroy(errp, tmp_acl_list);
- return(rv);
-}
-
/*
* Destroy a NameList
*
@@ -3048,78 +2360,6 @@ ACL_ListGetNameList(NSErr_t *errp, ACLListHandle_t *acl_list, char ***name_list)
}
/*
- * Gets a name list of consisting of all ACL names from the input aclfile
- *
- * Input:
- * filename acl file
- * name_list pointer to a list of string pointers
- * Returns:
- * 0 success
- * < 0 failure
- */
-
-NSAPI_PUBLIC int
-ACL_FileGetNameList(NSErr_t *errp, char * filename, char ***name_list)
-{
-
- const int block_size = 50;
- int rv, list_size, list_index;
- char ** local_list = NULL;
- char * block ;
- char * name;
- char * next;
- long filesize;
- FILE * file;
- char * head;
-
- if ((rv=open_file_buf(&file, filename, "rb", &block, &filesize))<0)
- goto list_cleanup;
-
- list_size = block_size;
- local_list = (char **) PERM_MALLOC(sizeof(char *) * list_size);
- if ( local_list == NULL ) {
- rv = ACLERRNOMEM;
- goto list_cleanup;
- }
- list_index = 0;
- local_list[list_index] = NULL;
-
- head = block;
- while ((acl_get_first_name(head, &name, &next))) {
-
- if (list_index+2 > list_size) {
- list_size += block_size;
- char ** tmp_list = (char **) PERM_REALLOC(local_list, sizeof(char *) * list_size);
- if ( tmp_list == NULL ) {
- rv = ACLERRNOMEM;
- goto list_cleanup;
- }
- local_list = tmp_list;
- }
- // local_list[list_index] = PERM_STRDUP(name);
- local_list[list_index] = name;
- if ( local_list[list_index] == NULL ) {
- rv = ACLERRNOMEM;
- goto list_cleanup;
- }
- list_index++;
- local_list[list_index] = NULL;
- head = next;
- }
-
- rv = 0;
- *name_list = local_list;
-
-list_cleanup:
- if (local_list && rv<0)
- ACL_NameListDestroy(errp, local_list);
- if (file)
- close_file_buf(file, filename, "rb", block);
-
- return rv;
-}
-
-/*
* Changes method to method plus DBTYPE, and registers
* databases.
*
diff --git a/lib/libaccess/oneeval.cpp b/lib/libaccess/oneeval.cpp
index 14b15740..83b98dee 100644
--- a/lib/libaccess/oneeval.cpp
+++ b/lib/libaccess/oneeval.cpp
@@ -140,10 +140,10 @@ static ACLDispatchVector_t __nsacl_vector = {
ACL_ParseString,
ACL_WriteString,
ACL_WriteFile,
- ACL_FileRenameAcl,
- ACL_FileDeleteAcl,
- ACL_FileGetAcl,
- ACL_FileSetAcl,
+ NULL /* ex ACL_FileRenameAcl */,
+ NULL /* ex ACL_FileDeleteAcl */,
+ NULL /* ex ACL_FileGetAcl */,
+ NULL /* ex ACL_FileSetAcl */,
/* ACL Expression construction interfaces */
diff --git a/lib/libaccess/utest/.purify b/lib/libaccess/utest/.purify
deleted file mode 100644
index 56b9983e..00000000
--- a/lib/libaccess/utest/.purify
+++ /dev/null
@@ -1,19 +0,0 @@
-suppress umr process_gethost
-suppress umr _door_gethostbyname_r
-suppress umr _get_hostserv_inetnetdir_byname
-suppress umr _get_hostserv_inetnetdir_byaddr
-suppress umr gethostbyname_r
-suppress umr _nsc_trydoorcall
-suppress umr LASDnsBuild
-suppress umr PR_HashString
-suppress umr mthsearch
-suppress umr Hash
-suppress umr strcmp
-suppress umr mthsearch
-suppress umr strlen
-suppress umr strdup
-suppress umr strcpy
-suppress umr PListFindValue
-suppress umr LASIpEval
-suppress umr LASDnsEval
-suppress mlk system_strdup_perm
diff --git a/lib/libaccess/utest/Makefile b/lib/libaccess/utest/Makefile
deleted file mode 100644
index 39096b1a..00000000
--- a/lib/libaccess/utest/Makefile
+++ /dev/null
@@ -1,147 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-#
-#
-BUILD_ROOT=../../..
-MODULE=LibAcl
-include $(BUILD_ROOT)/nsdefs.mk
-
-OBJDEST=.
-UTESTDEST=utest
-
-include $(BUILD_ROOT)/nsconfig.mk
-
-MODULE_CFLAGS=-I$(BUILD_ROOT)/include/libaccess -I$(BUILD_ROOT)/include -I$(BUILD_ROOT)/include/public -I. -DACL_LIB_INTERNAL
-
-include $(INCLUDE_DEPENDS)
-
-#TESTFLAGS = -DUTEST -DDEBUG_LEVEL_2
-TESTFLAGS = -DUTEST
-CC = $(CCC)
-
-CSRC = acltest.cpp onetest.cpp ustubs.cpp twotest.cpp
-TSRC = aclfile0 aclfile1 aclfile2 aclfile3 aclfile4 aclfile5 aclfile6 aclfile7 aclfile8 aclfile9 aclfile10 aclfile11 aclfile12 aclfile13 aclfile14 aclfile15 aclfile16 aclfile17 aclfile18 aclfile19 test.ref
-SRC = $(CSRC) $(TSRC)
-XSRC = \
- ../oneeval.cpp \
- ../lastod.cpp \
- ../lasip.cpp \
- ../aclutil.cpp \
- ../lasdns.cpp \
- ../acl.tab.cpp \
- ../acl.yy.cpp \
- ../acltools.cpp \
- ../aclspace.cpp \
- ../lasgroup.cpp \
- ../lasuser.cpp \
- ../nseframe.cpp \
- ../aclcache.cpp \
- ../register.cpp \
- ../symbols.cpp \
- ../method.cpp \
- ../access_plhash.cpp \
- ../authdb.cpp
-
-COBJ = $(CSRC:%.cpp=%.o)
-XOBJ = $(XSRC:../%.cpp=%.o)
-
-# This may be needed for other platforms too
-ifeq ($(ARCH), IRIX)
-XLIBS = -rpath $(LDAP_LIBPATH)
-endif
-
-ifeq ($(ARCH), HPUX)
-XLIBS = -lpthread
-endif
-ifeq ($(ARCH), SOLARIS)
-XLIBS = -lsocket -lnsl -ldl -lposix4
-endif
-
-XLIBS+= $(OBJDIR)/lib/base/plist.o \
- $(OBJDIR)/lib/base/pool.o \
- $(OBJDIR)/lib/base/util.o \
- $(OBJDIR)/lib/base/ereport.o \
- $(OBJDIR)/lib/base/system.o \
- $(OBJDIR)/lib/base/shexp.o \
- $(OBJDIR)/lib/base/file.o \
- $(OBJDIR)/lib/base/systhr.o \
- $(OBJDIR)/lib/base/nscperror.o \
- $(OBJDIR)/lib/libldapu.a \
- $(LIBNSPR)
-
-all: $(COBJ) $(TSRC) acltest
- ./acltest > test.out
- diff test.ref test.out
- @echo
- @echo "The unit test has passed if there is no diff output and the"
- @echo "Purify window shows no errors and 0 bytes leaked."
- @echo
- @echo "Run - gmake coverage - manually to get code coverage analysis."
- @echo
-
-aclparse: ustubs.o testmain.o $(XOBJ)
- purify $(CC) -o aclparse testmain.o $(XOBJ) ustubs.o $(XLIBS)
-
-aclparse.pure: acl.tab.o acl.yy.o testmain.o acltools.o ustubs.o
- purify -user-path=.. $(CC) -o aclparse.pure $(XOBJ) ustubs.o $(XLIBS)
-
-onetest: onetest.o ustubs.o $(XOBJ)
- $(CC) -o onetest onetest.o $(XOBJ) ustubs.o $(XLIBS)
-
-twotest: twotest.o ustubs.o $(XOBJ)
- $(CC) -o twotest twotest.o $(XOBJ) ustubs.o $(XLIBS)
-
-acltest: acltest.o ustubs.o $(XOBJ)
-# purify $(CC) -o acltest acltest.o $(XOBJ) ustubs.o $(XLIBS)
- $(CC) -o acltest acltest.o $(XOBJ) ustubs.o $(XLIBS)
-
-coverage: acltest.o ustubs.o $(XOBJ)
- purecov $(CC) -o acltestcov acltest.o $(XOBJ) ustubs.o $(XLIBS)
- rm -f *.pcv
- acltestcov
-
-#$(XOBJ): $(XSRC)
-# cd ..; gmake OBJDEST=$(UTESTDEST) CC=$(OCC) TESTFLAGS=$(TESTFLAGS)
-
-%.o:../%.c
- $(CC) -c $(CFLAGS) $(TESTFLAGS) $(MCC_INCLUDE) -I.. $< -o $(OBJDEST)/$*.o
-
-%.o:../%.cpp
- $(CC) -c $(CFLAGS) $(TESTFLAGS) $(MCC_INCLUDE) -I.. $< -o $(OBJDEST)/$*.o
diff --git a/lib/libaccess/utest/acl.dat b/lib/libaccess/utest/acl.dat
deleted file mode 100644
index 00f612d7..00000000
--- a/lib/libaccess/utest/acl.dat
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-
-acl davids;
-
-deny (all) dns=aruba.mcom.com;
diff --git a/lib/libaccess/utest/aclfile0 b/lib/libaccess/utest/aclfile0
deleted file mode 100644
index 248e245b..00000000
--- a/lib/libaccess/utest/aclfile0
+++ /dev/null
@@ -1,87 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile0;
-deny with uri="test";
-allow (read, write, execute) (timeofday<2100);
-allow (read, write, execute) (dayofweek!=sun or ip="255.255.255.255+*.*.*.*, 255.255.0.0+190.198.162.1");
-
-acl aclfile0.0;
-allow (read, write, execute) (timeofday<2100);
-allow (read, write, execute) (dayofweek!=sun or ip="255.255.255.255+*.*.*.*, 255.255.0.0+190.198.162.1");
-acl aclfile0.1;
-allow (read, write, execute) (timeofday<2100);
-allow (read, write, execute) (dayofweek!=sun or ip="255.255.255.255+*.*.*.*, 255.255.0.0+190.198.162.1");
-acl aclfile0.2;
-allow (read, write, execute) (timeofday<2100);
-allow (read, write, execute) (dayofweek!=sun or ip="255.255.255.255+*.*.*.*, 255.255.0.0+190.198.162.1");
-acl aclfile0.3;
-allow (read, write, execute) (timeofday<2100);
-allow (read, write, execute) (dayofweek!=sun or ip="255.255.255.255+*.*.*.*, 255.255.0.0+190.198.162.1");
-acl aclfile0.4;
-allow (read, write, execute) (timeofday<2100);
-allow (read, write, execute) (dayofweek!=sun or ip="255.255.255.255+*.*.*.*, 255.255.0.0+190.198.162.1");
-acl aclfile0.5;
-allow (read, write, execute) (timeofday<2100);
-allow (read, write, execute) (dayofweek!=sun or ip="255.255.255.255+*.*.*.*, 255.255.0.0+190.198.162.1");
-acl aclfile0.6;
-allow (read, write, execute) (timeofday<2100);
-allow (read, write, execute) (dayofweek!=sun or ip="255.255.255.255+*.*.*.*, 255.255.0.0+190.198.162.1");
-acl aclfile0.7;
-allow (read, write, execute) (timeofday<2100);
-allow (read, write, execute) (dayofweek!=sun or ip="255.255.255.255+*.*.*.*, 255.255.0.0+190.198.162.1");
-acl aclfile0.8;
-allow (read, write, execute) (timeofday<2100);
-allow (read, write, execute) (dayofweek!=sun or ip="255.255.255.255+*.*.*.*, 255.255.0.0+190.198.162.1");
-acl aclfile0.9;
-allow (read, write, execute) (timeofday<2100);
-allow (read, write, execute) (dayofweek!=sun or ip="255.255.255.255+*.*.*.*, 255.255.0.0+190.198.162.1");
-acl aclfile0.10;
-allow (read, write, execute) (timeofday<2100);
-allow (read, write, execute) (dayofweek!=sun or ip="255.255.255.255+*.*.*.*, 255.255.0.0+190.198.162.1");
-acl aclfile0.11;
-allow (read, write, execute) (timeofday<2100);
-acl aclfile0.12;
-authenticate (user, group) {
- database=franco;
- method=basic;
-};
-allow (read, write, execute) (timeofday<2100);
-allow (read, write, execute) (dayofweek!=sun or ip="255.255.255.255+*.*.*.*, 255.255.0.0+190.198.162.1");
diff --git a/lib/libaccess/utest/aclfile1 b/lib/libaccess/utest/aclfile1
deleted file mode 100644
index 314ae094..00000000
--- a/lib/libaccess/utest/aclfile1
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile1;
-deny (read, write, execute) (timeofday<2100);
-deny (read, write, execute) (dayofweek!=sun);
diff --git a/lib/libaccess/utest/aclfile10 b/lib/libaccess/utest/aclfile10
deleted file mode 100644
index 4d78bbc1..00000000
--- a/lib/libaccess/utest/aclfile10
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile10;
-deny absolute (read) ip="17.34.*";
-allow (read,write) timeofday>1700;
-deny (read) dns="*.mcom.com";
-allow (read,write) dayofweek=mon;
diff --git a/lib/libaccess/utest/aclfile11 b/lib/libaccess/utest/aclfile11
deleted file mode 100644
index 16376bb3..00000000
--- a/lib/libaccess/utest/aclfile11
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile11;
-allow (read) (timeofday<2100);
-allow (html_write, execute) (dayofweek!=sun);
diff --git a/lib/libaccess/utest/aclfile12 b/lib/libaccess/utest/aclfile12
deleted file mode 100644
index 0a4c2adb..00000000
--- a/lib/libaccess/utest/aclfile12
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile12;
-allow (read) (timeofday<2100);
-allow (read, html_write, execute) (dayofweek!=sun);
diff --git a/lib/libaccess/utest/aclfile13 b/lib/libaccess/utest/aclfile13
deleted file mode 100644
index 0fbce619..00000000
--- a/lib/libaccess/utest/aclfile13
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile13;
-allow (read) (ip="17.34.1.1+255.255.0.0");
-allow (html_write) (dns!="*.microsoft.com");
diff --git a/lib/libaccess/utest/aclfile14 b/lib/libaccess/utest/aclfile14
deleted file mode 100644
index 7ed043d2..00000000
--- a/lib/libaccess/utest/aclfile14
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile14;
-allow (read, write) (ip="17.34.*");
-deny (write) (dns!="*.mcom.com");
diff --git a/lib/libaccess/utest/aclfile15 b/lib/libaccess/utest/aclfile15
deleted file mode 100644
index b2dd641b..00000000
--- a/lib/libaccess/utest/aclfile15
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile15;
-allow (html_read, write) (dns="*.mcom.com");
-deny (read) (ip="17.34.*");
diff --git a/lib/libaccess/utest/aclfile16 b/lib/libaccess/utest/aclfile16
deleted file mode 100644
index 1f837b12..00000000
--- a/lib/libaccess/utest/aclfile16
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile16;
-allow (html_read, write) (dns="*.mcom.com");
-deny (read) (ip="17.34.1.1 + 255.255.0.0");
diff --git a/lib/libaccess/utest/aclfile17 b/lib/libaccess/utest/aclfile17
deleted file mode 100644
index 42901016..00000000
--- a/lib/libaccess/utest/aclfile17
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile17;
-allow absolute (all) (dns="*.mcom.com");
-deny (read) (ip="17.34.1.1+255.255.0.0");
diff --git a/lib/libaccess/utest/aclfile18 b/lib/libaccess/utest/aclfile18
deleted file mode 100644
index 1d0445d2..00000000
--- a/lib/libaccess/utest/aclfile18
+++ /dev/null
@@ -1,51 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile18;
-authenticate (user) {
- method=SSL;
- database=LDAP;
-};
-allow (read, write, execute, create) dns="*.mcom.com";
-authenticate (user) {
- method=basic;
- database=20;
-};
-allow (read, write, execute, create) (timeofday>1700 or timeofday<0800);
diff --git a/lib/libaccess/utest/aclfile19 b/lib/libaccess/utest/aclfile19
deleted file mode 100644
index f637c17f..00000000
--- a/lib/libaccess/utest/aclfile19
+++ /dev/null
@@ -1,46 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile19A;
-deny (read, write, execute, create) dns!="*.mcom.com";
-allow absolute (read) ((timeofday>1700 or timeofday<0800) or dayofweek=satsunmon);
-
-acl aclfile19B;
-deny (write) dns="*.mcom.com";
diff --git a/lib/libaccess/utest/aclfile2 b/lib/libaccess/utest/aclfile2
deleted file mode 100644
index a4424310..00000000
--- a/lib/libaccess/utest/aclfile2
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile2;
-deny (read) (timeofday<2100);
-deny (read) (dayofweek!=sun);
diff --git a/lib/libaccess/utest/aclfile3 b/lib/libaccess/utest/aclfile3
deleted file mode 100644
index 957072e5..00000000
--- a/lib/libaccess/utest/aclfile3
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile3;
-allow (read) (timeofday<2100);
-allow (read) (dayofweek!=sun);
diff --git a/lib/libaccess/utest/aclfile4 b/lib/libaccess/utest/aclfile4
deleted file mode 100644
index aa373b34..00000000
--- a/lib/libaccess/utest/aclfile4
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile4;
-allow (read) (timeofday>0700);
-allow (write) (dayofweek!=sun);
diff --git a/lib/libaccess/utest/aclfile5 b/lib/libaccess/utest/aclfile5
deleted file mode 100644
index 10de6a52..00000000
--- a/lib/libaccess/utest/aclfile5
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile5;
-allow (read) (ip="17.34.*");
-allow (write) (dns!="*.microsoft.com");
diff --git a/lib/libaccess/utest/aclfile6 b/lib/libaccess/utest/aclfile6
deleted file mode 100644
index cc3cb7aa..00000000
--- a/lib/libaccess/utest/aclfile6
+++ /dev/null
@@ -1,55 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile6;
-allow (read,
-write) (ip="17.34.*");
-allow (read, write) (ip="17.34.*");
-allow (read, write) (ip="17.34.*");
-allow (read, write) (ip="17.34.*");
-allow (read, write) (ip="17.34.*");
-allow (read, write) (ip="17.34.*");
-deny (write)
-(dns!="*.mcom.com");
-deny (write) (dns!="*.mcom.com");
-deny (write) (dns!="*.mcom.com");
-deny (write) (dns!="*.mcom.com");
-deny (write) (dns!="*.mcom.com");
-deny (write) (dns!="*.mcom.com");
diff --git a/lib/libaccess/utest/aclfile7 b/lib/libaccess/utest/aclfile7
deleted file mode 100644
index 1c89664c..00000000
--- a/lib/libaccess/utest/aclfile7
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile7;
-allow (read,write) (dns="*.mcom.com");
-deny (read) (ip="17.34.*");
diff --git a/lib/libaccess/utest/aclfile8 b/lib/libaccess/utest/aclfile8
deleted file mode 100644
index e44ff8fc..00000000
--- a/lib/libaccess/utest/aclfile8
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile8;
-allow (read, write, execute, create) dns="*.mcom.com";
-allow (read, write, execute, create) (timeofday>1700 or timeofday<0800);
diff --git a/lib/libaccess/utest/aclfile9 b/lib/libaccess/utest/aclfile9
deleted file mode 100644
index 753fdee0..00000000
--- a/lib/libaccess/utest/aclfile9
+++ /dev/null
@@ -1,43 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclfile9;
-deny (read) ip="*.34.*+*.128.*.0";
-allow (read, write, execute, create) ((timeofday>1700 or timeofday<0800) or dayofweek=satsunmon);
diff --git a/lib/libaccess/utest/aclgrp0 b/lib/libaccess/utest/aclgrp0
deleted file mode 100644
index da6012c4..00000000
--- a/lib/libaccess/utest/aclgrp0
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclgrp0;
-allow (read, write, execute) (group = marketing or group!="Directory Administrators");
diff --git a/lib/libaccess/utest/aclgrp1 b/lib/libaccess/utest/aclgrp1
deleted file mode 100644
index e877794f..00000000
--- a/lib/libaccess/utest/aclgrp1
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclgrp1;
-allow (read, write, execute) (group!="Directory Administrators");
diff --git a/lib/libaccess/utest/aclgrp2 b/lib/libaccess/utest/aclgrp2
deleted file mode 100644
index f799ef0b..00000000
--- a/lib/libaccess/utest/aclgrp2
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclgrp2;
-allow (read, write, execute) (group=marketing);
diff --git a/lib/libaccess/utest/aclgrp3 b/lib/libaccess/utest/aclgrp3
deleted file mode 100644
index 7ad63041..00000000
--- a/lib/libaccess/utest/aclgrp3
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclgrp3;
-allow (read, write, execute) (group>"Directory Admin,marketing");
diff --git a/lib/libaccess/utest/aclgrp4 b/lib/libaccess/utest/aclgrp4
deleted file mode 100644
index e726f3bd..00000000
--- a/lib/libaccess/utest/aclgrp4
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# BEGIN COPYRIGHT BLOCK
-# This Program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU General Public License as published by the Free Software
-# Foundation; version 2 of the License.
-#
-# This Program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along with
-# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
-# Place, Suite 330, Boston, MA 02111-1307 USA.
-#
-# In addition, as a special exception, Red Hat, Inc. gives You the additional
-# right to link the code of this Program with code not covered under the GNU
-# General Public License ("Non-GPL Code") and to distribute linked combinations
-# including the two, subject to the limitations in this paragraph. Non-GPL Code
-# permitted under this exception must only link to the code of this Program
-# through those well defined interfaces identified in the file named EXCEPTION
-# found in the source code files (the "Approved Interfaces"). The files of
-# Non-GPL Code may instantiate templates or use macros or inline functions from
-# the Approved Interfaces without causing the resulting work to be covered by
-# the GNU General Public License. Only Red Hat, Inc. may make changes or
-# additions to the list of Approved Interfaces. You must obey the GNU General
-# Public License in all respects for all of the Program code and other code used
-# in conjunction with the Program except the Non-GPL Code covered by this
-# exception. If you modify this file, you may extend this exception to your
-# version of the file, but you are not obligated to do so. If you do not wish to
-# provide this exception without modification, you must delete this exception
-# statement from your version and license this file solely under the GPL without
-# exception.
-#
-#
-# Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
-# Copyright (C) 2005 Red Hat, Inc.
-# All rights reserved.
-# END COPYRIGHT BLOCK
-#
-version 3.0;
-acl aclgrp4;
-allow (read, write, execute) (group = " marketing ,, Directory Administrators ,, ");
diff --git a/lib/libaccess/utest/acltest.cpp b/lib/libaccess/utest/acltest.cpp
deleted file mode 100644
index c05d6236..00000000
--- a/lib/libaccess/utest/acltest.cpp
+++ /dev/null
@@ -1,794 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- *
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- *
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
- *
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <netsite.h>
-#include <base/systhr.h>
-#include <libaccess/nserror.h>
-#include <libaccess/acl.h>
-#include "../aclpriv.h"
-#include <libaccess/aclproto.h>
-#include "../aclcache.h"
-#include <libaccess/las.h>
-
-
-extern ACLListHandle_t *ACL_ParseFile(NSErr_t *errp, char *filename);
-
-int
-TestEvalFunc(NSErr_t *errp, char *attr, CmpOp_t comparator,
- char *attr_pattern, ACLCachable_t *cachable,
- void **las_cookie, PList_t subject, PList_t resource,
- PList_t auth_info, PList_t global_auth)
-{
- return 0;
-}
-
-void
-TestFlushFunc(void **cookie)
-{
- return;
-}
-
-static int parse_dburl (NSErr_t *errp, ACLDbType_t dbtype,
- const char *dbname, const char *url,
- PList_t plist, void **db)
-{
- *db = strdup(url);
- return 0;
-}
-
-
-int main(int argc, char **argv)
-{
- ACLListHandle_t *acl_list;
- int result;
- ACLCachable_t cachable = 0;
- void *las_cookie=NULL;
- ACLEvalHandle_t eval;
- char *rights[3];
- char filename[20];
- char newfilename[25];
- int i;
- char *map_generic[7];
- LASEvalFunc_t Eval_funcp;
- LASFlushFunc_t Flush_funcp;
- char *bong;
- char *bong_type;
- char *acl_tag;
- int expr_num;
- int ii;
- char **name_list;
- ACLMethod_t method=NULL;
- ACLDbType_t dbtype=NULL;
- int rv;
- ACLAttrGetterList_t aglist;
- ACLAttrGetter_t *agptr;
- char **names;
- int cnt;
-
- systhread_init("acl_utest");
-
- char *acl_file_list[3] = {"aclfile6", "aclfile7", NULL};
- char *new_filename = "merge6_7";
- char *acl_name_list[3] = {"aclfile6", "aclfile7", NULL};
- char *new_aclname = "merge6_7";
- char *bad_acl_file_list[3] = {"bad_aclfile6", "bad_aclfile7", NULL};
-
- if ( ACL_FileMergeFile(NULL, new_filename, bad_acl_file_list, 0) < 0 ) {
- printf("Failed ACL_FileMergeFile() test.\n");
- }
-
- if ( ACL_FileMergeFile(NULL, new_filename, acl_file_list, 0) < 0 ) {
- printf("Failed ACL_FileMergeFile() test.\n");
- }
-
- if ( ACL_FileMergeAcl(NULL, new_filename, acl_name_list, new_aclname, 0) < 0 ) {
- printf("Failed ACL_FileMergeAcl() test.\n");
- }
-
- /* LAS Registration Unit Tests */
-
- ACL_Init();
-
- rv = ACL_MethodRegister(NULL, "one", &method);
- printf("Method one is #%d, rv=%d\n", (int)method, rv);
-
- rv = ACL_MethodRegister(NULL, "two", &method);
- printf("Method two is #%d, rv=%d\n", (int)method, rv);
-
- rv = ACL_MethodRegister(NULL, "one", &method);
- printf("Method one repeated is #%d, rv=%d\n", (int)method, rv);
-
- rv = ACL_MethodRegister(NULL, "three", &method);
- printf("Method three is #%d, rv=%d\n", (int)method, rv);
-
- rv = ACL_MethodNamesGet(NULL, &names, &cnt);
-
- for(i = 0; i < cnt; i++) {
- printf("\tMethod[%d] = \"%s\"\n", i, names[i]);
- }
-
- ACL_MethodNamesFree(NULL, names, cnt);
-
- if (!ACL_MethodIsEqual(NULL, method, method)) {
- printf("Error comparing methods");
- }
-
- if (!ACL_MethodNameIsEqual(NULL, method, "three")) {
- printf("Error comparing method by name");
- }
-
- /* Since LDAP is already registered by ACL_Init, the first number
- * we'll get is actually 2.
- */
- rv = ACL_DbTypeRegister(NULL, "two", parse_dburl, &dbtype);
- printf("DbType two is #%d, rv=%d\n", (int)dbtype, rv);
-
- rv = ACL_DbTypeRegister(NULL, "three", parse_dburl, &dbtype);
- printf("DbType three is #%d, rv=%d\n", (int)dbtype, rv);
-
- rv = ACL_DbTypeRegister(NULL, "two", parse_dburl, &dbtype);
- printf("DbType two repeated is #%d, rv=%d\n", (int)dbtype, rv);
-
- rv = ACL_DbTypeRegister(NULL, "four", parse_dburl, &dbtype);
- printf("DbType four is #%d, rv=%d\n", (int)dbtype, rv);
-
- if (!ACL_DbTypeIsEqual(NULL, dbtype, dbtype)) {
- printf("Error comparing dbtypes\n");
- }
-
- if (!ACL_DbTypeNameIsEqual(NULL, dbtype, "four")) {
- printf("Error comparing dbtype by name\n");
- }
-
- rv = ACL_DatabaseRegister(NULL, dbtype, "db1", "url for db1", NULL);
- if (rv < 0) {
- printf("ACL_DatabaseRegister failed for db1\n");
- }
-
- rv = ACL_DatabaseRegister(NULL, dbtype, "db2", "url for db2", NULL);
- if (rv < 0) {
- printf("ACL_DatabaseRegister failed for db2\n");
- }
-
- rv = ACL_DatabaseRegister(NULL, dbtype, "db3", "url for db3", NULL);
- if (rv < 0) {
- printf("ACL_DatabaseRegister failed for db3\n");
- }
-
- rv = ACL_DatabaseNamesGet(NULL, &names, &cnt);
-
- for(i = 0; i < cnt; i++) {
- printf("\tDatabase[%d] = \"%s\"\n", i, names[i]);
- }
-
- if (ACL_AttrGetterRegister(NULL, "attr", (ACLAttrGetterFn_t)2, (ACLMethod_t)10, (ACLDbType_t)20, ACL_AT_FRONT, NULL)) {
- printf("Error registering attr getter\n");
- }
-
- if (ACL_AttrGetterRegister(NULL, "attr", (ACLAttrGetterFn_t)3, (ACLMethod_t)10, (ACLDbType_t)20, ACL_AT_END, NULL)) {
- printf("Error registering attr getter\n");
- }
-
- if (ACL_AttrGetterRegister(NULL, "attr", (ACLAttrGetterFn_t)1, (ACLMethod_t)10, (ACLDbType_t)20, ACL_AT_FRONT, NULL)) {
- printf("Error registering attr getter\n");
- }
-
- if (ACL_AttrGetterRegister(NULL, "attr", (ACLAttrGetterFn_t)4, (ACLMethod_t)10, (ACLDbType_t)20, ACL_AT_END, NULL)) {
- printf("Error registering attr getter\n");
- }
-
- if (ACL_AttrGetterFind(NULL, "attr", &aglist)) {
- printf("Error finding attr getter\n");
- }
-
- for (i = 0, agptr = ACL_AttrGetterFirst(&aglist);
- i < 4;
- i++, agptr = ACL_AttrGetterNext(&aglist, agptr)) {
-
- if (agptr) {
- printf("position %d\n", (int)(agptr->fn));
- }
- else {
- printf("***Error: missing getter ***\n");
- }
- }
-
-#ifndef XP_WIN32
- if (ACL_LasRegister(NULL, "test_attr", TestEvalFunc, TestFlushFunc)) {
- printf("Error registering Test LAS functions\n");
- }
- ACL_LasFindEval(NULL, "test_attr", &Eval_funcp);
- if (Eval_funcp != TestEvalFunc) {
- printf("Error finding Eval function - expecting %x, got %x\n",
- TestEvalFunc, Eval_funcp);
- }
- ACL_LasFindFlush(NULL, "test_attr", &Flush_funcp);
- if (Flush_funcp != TestFlushFunc) {
- printf("Error finding Flush function - expecting %x, got %x\n",
- TestFlushFunc, Flush_funcp);
- }
- ACL_LasFindEval(NULL, "wrong_attr", &Eval_funcp);
- if (Eval_funcp != NULL) {
- printf("Error finding Eval function - expecting NULL, got %x\n",
- Eval_funcp);
- }
- ACL_LasFindFlush(NULL, "wrong_attr", &Flush_funcp);
- if (Flush_funcp != NULL) {
- printf("Error finding Flush function - expecting NULL, got %x\n",
- Flush_funcp);
- }
-#endif /* !XP_WIN32 */
-
- /* ACL Eval Unit Tests
- */
- rights[0] = "http_get";
- rights[1] = "http_post";
- rights[2] = NULL;
-
- eval.subject = NULL;
- eval.resource = NULL;
- eval.default_result = ACL_RES_DENY;
-
- for (i=0; i<10; i++) {
- sprintf(filename, "aclfile%d", i);
- eval.acllist = ACL_ParseFile((NSErr_t *)NULL, filename);
- if ( eval.acllist == NULL ) {
- printf("Couldn't parse.\n");
- continue;
- }
-
- sprintf(newfilename, "%s.v30", filename);
- if ( ACL_WriteFile(NULL, newfilename, eval.acllist) < 0) {
- printf("Couldn't write %s.\n", newfilename);
- }
- result = ACL_EvalTestRights(NULL, &eval, &rights[0],
- http_generic, &bong, &bong_type, &acl_tag, &expr_num);
- ACL_ListDestroy(NULL, eval.acllist);
- printf("%s = %d\n\n", filename, result);
- }
-
-/********************************************************************
-
- TEST #1
-
- TEST ACL_ParseString()
- TEST ACL_WriteFile()
- TEST ACL_ParseFile()
- TEST ACL_ListFind()
-
-*********************************************************************/
- acl_list = ACL_ParseString((NSErr_t *)NULL,
- "version 3.0; acl > franco;");
- if ( acl_list != NULL ) {
- ACL_ListDestroy(NULL, acl_list);
- printf("Test #1a fails parsed invalid ACL\n");
- goto skip_test;
- }
-
- acl_list = ACL_ParseString((NSErr_t *)NULL,
- "version 3.0; acl franco; \nallow (read) user=franco;");
- if ( acl_list == NULL ) {
- printf("Test #1b fails couldn't parse valid ACL\n");
- goto skip_test;
- } else {
- if ( ACL_WriteFile(NULL, "buffer", acl_list) < 0) {
- printf("Test #1b, couldn't write %s.\n", "buffer");
- }
- ACL_ListDestroy(NULL, acl_list);
- }
-
- acl_list = ACL_ParseString((NSErr_t *)NULL,
- "version 3.0; acl franco; \njunk (read) user=franco;");
-
- if ( acl_list != NULL ) {
- printf("Test #1c failed missed syntax error\n");
- ACL_ListDestroy(NULL, acl_list);
- goto skip_test;
- }
-
- acl_list = ACL_ParseString((NSErr_t *)NULL,
- "version 3.0; acl franco; \nallow (read) user=franco;");
-
- if ( acl_list == NULL ) {
- printf("Test #1d couldn't parse valid ACL\n");
- } else {
- ACL_ListDestroy(NULL, acl_list);
- goto skip_test;
- }
-
- acl_list= ACL_ParseFile((NSErr_t *)NULL, "buffer");
- if ( acl_list == NULL ) {
- printf("Test #1e, couldn't perform ACL_ParseFile(buffer)\n");
- goto skip_test;
- } else {
- if ( ACL_ListFind(NULL, acl_list, "franco", ACL_CASE_INSENSITIVE) == NULL ) {
- printf("Test #1e, couldn't find %s in %s.\n", "franco", "buffer");
- }
- ACL_ListDestroy(NULL, acl_list);
- }
-
-/********************************************************************
-
- TEST #2
-
- TEST ACL_FileDeleteAcl()
- TEST ACL_ParseFile()
- TEST ACL_ListFind()
-
-*********************************************************************/
- if ( ACL_FileDeleteAcl(NULL, "buffer", "franco", ACL_CASE_INSENSITIVE) < 0) {
- printf("Test #2, couldn't write %s.\n", "buffer");
- }
- acl_list= ACL_ParseFile((NSErr_t *)NULL, "buffer");
- if ( acl_list == NULL ) {
- printf("Test #2, couldn't perform ACL_ParseFile(buffer)\n");
- goto skip_test;
- } else {
- if ( ACL_ListFind(NULL, acl_list, "franco", ACL_CASE_INSENSITIVE) ) {
- printf("Couldn't delete %s from %s.\n", "franco", "buffer");
- }
- ACL_ListDestroy(NULL, acl_list);
- }
-
-/********************************************************************
-
- TEST #3
-
- TEST ACL_FileSetAcl()
- TEST ACL_ParseFile()
- TEST ACL_ListFind()
-
-*********************************************************************/
- if ( ACL_FileSetAcl(NULL, "buffer",
- "version 3.0; acl FileSetAcl; \nallow (read) user=franco;",
- ACL_CASE_INSENSITIVE)< 0) {
- printf("Test #3, couldn't ACL_FileSetACL(%s).\n", "FileSetAcl");
- }
- if ( ACL_FileSetAcl(NULL, "buffer",
- "version 3.0; acl franco; \nallow (read) user=franco;",
- ACL_CASE_INSENSITIVE)< 0) {
- printf("Test #3, couldn't ACL_FileSetACL(%s).\n", "franco");
- }
- acl_list= ACL_ParseFile((NSErr_t *)NULL, "buffer");
- if ( acl_list == NULL ) {
- printf("Test #3, couldn't perform ACL_ParseFile(buffer)\n");
- goto skip_test;
- } else {
- if ( ACL_ListFind(NULL, acl_list, "franco", ACL_CASE_INSENSITIVE) == NULL) {
- printf("Test #3, couldn't set %s in %s.\n", "franco", "buffer");
- }
- if ( ACL_ListFind(NULL, acl_list, "filesetacl", ACL_CASE_INSENSITIVE) == NULL) {
- printf("Test #3, couldn't set %s in %s.\n", "filesetacl", "buffer");
- }
- ACL_ListDestroy(NULL, acl_list);
- }
-
-/********************************************************************
-
- TEST #4
-
- TEST ACL_FileRenameAcl()
- TEST ACL_ParseFile()
- TEST ACL_ListFind()
-
-*********************************************************************/
- if ( ACL_FileRenameAcl(NULL, "buffer", "FileSetAcl", "loser", ACL_CASE_INSENSITIVE)< 0) {
- printf("Test #4, fail ACL_FileRenameACL(filesetacl, loser).\n");
- }
- if ( ACL_FileRenameAcl(NULL, "buffer", "franco", "bigdogs",
- ACL_CASE_INSENSITIVE)< 0) {
- printf("Test #4, fail ACL_FileRenameACL(franco, bigdogs).\n");
- }
- acl_list= ACL_ParseFile((NSErr_t *)NULL, "buffer");
- if ( acl_list == NULL ) {
- printf("Test #3, couldn't perform ACL_ParseFile(buffer)\n");
- goto skip_test;
- } else {
- if ( ACL_ListFind(NULL, acl_list, "loser", ACL_CASE_INSENSITIVE) == NULL) {
- printf("Test #4, fail rename %s in %s.\n", "loser", "buffer");
- }
- if ( ACL_ListFind(NULL, acl_list, "bigdogs", ACL_CASE_INSENSITIVE) == NULL) {
- printf("Test #4, fail rename %s in %s.\n", "bigdogs", "buffer");
- }
- if ( ACL_ListGetNameList(NULL, acl_list, &name_list) < 0 ) {
- printf("Test #4, yikes, the GetNameList failed.\n");
- } else {
- for (ii = 0; name_list[ii]; ii++)
- printf("ACL %s\n", name_list[ii]);
- ACL_NameListDestroy(NULL, name_list);
- }
- ACL_ListDestroy(NULL, acl_list);
- }
-
-
-
-
-skip_test:
-/********************************************************************
-
- END
-
-*********************************************************************/
-
- rights[0] = "html_read";
- rights[1] = "html_write";
-
- map_generic[0] = "html_read";
- map_generic[1] = "html_write";
- map_generic[2] = "N/A";
- map_generic[3] = "html_create";
- map_generic[4] = "html_delete";
- map_generic[5] = "N/A";
- map_generic[6] = NULL;
-
- for (i=10; i<20; i++) {
- sprintf(filename, "aclfile%d", i);
- eval.acllist = ACL_ParseFile((NSErr_t *)NULL, filename);
- if ( eval.acllist == NULL ) {
- printf("Parse failed.\n");
- continue;
- }
- result = ACL_EvalTestRights(NULL, &eval, &rights[0], map_generic, &bong, &bong_type, &acl_tag, &expr_num);
- ACL_ListDestroy(NULL, eval.acllist);
- printf("%s = %d\n\n", filename, result);
- }
-
- /*
- * DNS LAS Unit Tests
- */
-
- result = LASDnsEval(NULL, "dnsalias", CMP_OP_EQ, "*", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("dnsalias = *? %d\n\n", result);
-
- LASDnsFlush(&las_cookie);
-
- result = LASDnsEval(NULL, "dnsalias", CMP_OP_EQ, "aruba.mcom.com brain251.mcom.com", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("dnsalias = aruba.mcom.com brain251.mcom.com? %d\n\n", result);
-
- LASDnsFlush(&las_cookie);
-
- result = LASDnsEval(NULL, "dns", CMP_OP_EQ, "*", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("dns = *? %d\n\n", result);
-
- result = LASDnsEval(NULL, "dns", CMP_OP_NE, "*", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("dns != *? %d\n\n", result);
-
- LASDnsFlush(&las_cookie);
-
- result = LASDnsEval(NULL, "dns", CMP_OP_EQ, "aruba.mcom.com", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("dns = aruba.mcom.com? %d\n\n", result);
-
- LASDnsFlush(&las_cookie);
-
- result = LASDnsEval(NULL, "dns", CMP_OP_EQ, "ai.mit.edu", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("dns = ai.mit.edu? %d\n\n", result);
-
- LASDnsFlush(&las_cookie);
-
- result = LASDnsEval(NULL, "dns", CMP_OP_EQ, "*.ai.mit.edu", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("dns = *.ai.mit.edu? %d\n\n", result);
-
- LASDnsFlush(&las_cookie);
-
- result = LASDnsEval(NULL, "dns", CMP_OP_EQ, "*.mit.edu", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("dns = *.mit.edu? %d\n\n", result);
-
- LASDnsFlush(&las_cookie);
-
- result = LASDnsEval(NULL, "dns", CMP_OP_EQ, "*.edu", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("dns = *.edu? %d\n\n", result);
-
- LASDnsFlush(&las_cookie);
-
- result = LASDnsEval(NULL, "dns", CMP_OP_NE, "*.edu", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("dns != *.edu? %d\n\n", result);
-
- LASDnsFlush(&las_cookie);
-
- result = LASDnsEval(NULL, "mistake", CMP_OP_NE, "*.edu", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("mistake != *.edu? %d\n\n", result);
-
- LASDnsFlush(&las_cookie);
-
- result = LASDnsEval(NULL, "dns", CMP_OP_GT, "*.edu", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("dns > *.edu? %d\n\n", result);
-
- LASDnsFlush(&las_cookie);
-
-
- /*
- * IP LAS Unit Tests
- */
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "*", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = *? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_NE, "*", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip != *? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "*.*.*.*", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = *.*.*.*? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "17.*", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 17.*? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "17.*.*.*", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 17.*.*.*? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "17.34.*", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 17.34.*? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "17.34.*.*", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 17.34.*.*? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "17.34.51.*", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 17.34.51.*? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "17.34.51.*+255.255.255.255", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 17.34.51.*+255.255.255.255? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "17.34.51.69+255.255.255.254, 123.45.67.89", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 17.34.51.69+255.255.255.254, 123.45.67.89? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_NE, "17.34.51.69+255.255.255.254, 123.45.67.89", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip != 17.34.51.69+255.255.255.254, 123.45.67.89? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "17.34.51.68, 17.34.51.69", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 17.34.51.68, 17.34.51.69? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "17.34.51.68, 17.34.51.69, 123.45.67.89", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 17.34.51.68, 17.34.51.69, 123.45.67.89? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_NE, "17.34.51.68, 17.34.51.69, 123.45.67.89", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip != 17.34.51.68, 17.34.51.69, 123.45.67.89? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "17.34.51.68", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 17.34.51.68? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "17.34.51.69", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 17.34.51.69? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "17.34.51.69+255.255.255.254", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 17.34.51.69+255.255.255.254? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "17.34.50.69+255.255.254.0", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 17.34.50.69+255.255.254.0? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "17.35.50.69+255.254.0.0", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 17.35.50.69+255.254.0.0? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "16.35.50.69+254.0.0.0", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 16.35.50.69+254.0.0.0? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "ip", CMP_OP_EQ, "123.45.67.89", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip = 123.45.67.89? %d\n\n", result);
-
- result = LASIpEval(NULL, "ip", CMP_OP_NE, "123.45.67.89", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip != 123.45.67.89? %d\n\n", result);
-
- result = LASIpEval(NULL, "ip", CMP_OP_GT, "123.45.67.89", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip > 123.45.67.89? %d\n\n", result);
-
- result = LASIpEval(NULL, "ip", CMP_OP_LT, "123.45.67.89", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip < 123.45.67.89? %d\n\n", result);
-
- result = LASIpEval(NULL, "ip", CMP_OP_GE, "123.45.67.89", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip >= 123.45.67.89? %d\n\n", result);
-
- result = LASIpEval(NULL, "ip", CMP_OP_LE, "123.45.67.89", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("ip <= 123.45.67.89? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
- result = LASIpEval(NULL, "mistake", CMP_OP_LE, "123.45.67.89", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf ("mistake <= 123.45.67.89? %d\n\n", result);
-
- LASIpFlush(&las_cookie);
-
-
- /*
- * Time of Day unit tests.
- */
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_EQ, "2120", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time = 2120? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_NE, "2120", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time != 2120? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_EQ, "0700", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time = 0700? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_NE, "0700", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time != 0700? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_EQ, "2400", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time = 2400? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_NE, "2400", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time != 2400? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_GT, "2120", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time > 2120? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_LT, "2120", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time < 2120? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_GT, "0700", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time > 0700? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_LT, "0700", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time < 0700? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_GT, "2400", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time > 2400? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_LT, "2400", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time < 2400? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_GE, "2120", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time >= 2120? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_LE, "2120", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time <= 2120? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_GE, "0700", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time >= 0700? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_LE, "0700", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time <= 0700? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_GE, "2400", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time >= 2400? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_LE, "2400", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time <= 2400? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "mistake", CMP_OP_LE, "2400", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("mistake <= 2400? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_EQ, "0800-2200", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time = 0800-2200? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_NE, "0800-2200", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time != 0800-2200? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_EQ, "2200-0800", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time = 2200-0800? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_NE, "2200-0800", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time != 2200-0800? %d\n\n", result);
-
- result = LASTimeOfDayEval(NULL, "timeofday", CMP_OP_LE, "2200-0800", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("time <= 2200-0800? %d\n\n", result);
-
-
- /*
- * Day Of Week Unit Tests
- */
- result = LASDayOfWeekEval(NULL, "dayofweek", CMP_OP_EQ, "Mon", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("= mon? %d\n\n", result);
-
- result = LASDayOfWeekEval(NULL, "dayofweek", CMP_OP_EQ, "tUe", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("= tUe? %d\n\n", result);
-
- result = LASDayOfWeekEval(NULL, "dayofweek", CMP_OP_EQ, "weD", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("= weD? %d\n\n", result);
-
- result = LASDayOfWeekEval(NULL, "dayofweek", CMP_OP_EQ, "THu", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("= THu? %d\n\n", result);
-
- result = LASDayOfWeekEval(NULL, "dayofweek", CMP_OP_EQ, "FrI", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("= FrI? %d\n\n", result);
-
- result = LASDayOfWeekEval(NULL, "dayofweek", CMP_OP_EQ, "sAT", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("= tUe? %d\n\n", result);
-
- result = LASDayOfWeekEval(NULL, "dayofweek", CMP_OP_EQ, "Sun", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("= Sun? %d\n\n", result);
-
- result = LASDayOfWeekEval(NULL, "dayofweek", CMP_OP_EQ, "mon,tuewed,thu,frisatsun", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("= mon,tuewed,thu,frisatsun? %d\n\n", result);
-
- result = LASDayOfWeekEval(NULL, "dayofweek", CMP_OP_NE, "mon,tuewed,thu,frisatsun", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("!= mon,tuewed,thu,frisatsun? %d\n\n", result);
-
- result = LASDayOfWeekEval(NULL, "dayofweek", CMP_OP_GT, "Sun", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("> Sun? %d\n\n", result);
-
- result = LASDayOfWeekEval(NULL, "dayofweek", CMP_OP_LT, "Sun", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("< Sun? %d\n\n", result);
-
- result = LASDayOfWeekEval(NULL, "dayofweek", CMP_OP_GE, "Sun", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf(">= Sun? %d\n\n", result);
-
- result = LASDayOfWeekEval(NULL, "dayofweek", CMP_OP_LE, "Sun", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("<= Sun? %d\n\n", result);
-
- result = LASDayOfWeekEval(NULL, "mistake", CMP_OP_LE, "Sun", &cachable, &las_cookie, NULL, NULL, NULL, NULL);
- printf("mistake <= Sun? %d\n\n", result);
-
-
- ACL_Destroy();
-
- exit(0);
-
-}
diff --git a/lib/libaccess/utest/onetest.cpp b/lib/libaccess/utest/onetest.cpp
deleted file mode 100644
index 1c91d25f..00000000
--- a/lib/libaccess/utest/onetest.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- *
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- *
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
- *
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <netsite.h>
-#include <libaccess/nserror.h>
-#include <libaccess/acl.h>
-#include "../aclpriv.h"
-#include <libaccess/aclproto.h>
-#include <libaccess/las.h>
-#include <base/plist.h>
-#include <base/ereport.h>
-
-extern ACLListHandle_t *ACL_ParseFile(NSErr_t *errp, char *filename);
-
-
-int main(int arc, char **argv)
-{
- int result;
- ACLEvalHandle_t eval;
- char *rights[2];
- char *bong;
- char *bong_type;
- char *acl_tag;
- int expr_num;
-
- /* ACL Eval Unit Tests
- */
- rights[0] = "read";
- rights[1] = "write";
- rights[2] = NULL;
-
- eval.acllist = ACL_ParseFile((NSErr_t *)NULL, argv[1]);
- result = ACL_EvalTestRights(NULL, &eval, &rights[0], NULL, &bong, &bong_type, &acl_tag, &expr_num);
- ACL_ListDestroy(NULL, eval.acllist);
- printf("%s = %d\n\n", argv[1], result);
-
-}
diff --git a/lib/libaccess/utest/shexp.cpp b/lib/libaccess/utest/shexp.cpp
deleted file mode 100644
index c118081b..00000000
--- a/lib/libaccess/utest/shexp.cpp
+++ /dev/null
@@ -1,331 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- *
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- *
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
- *
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-/*
- * shexp.c: shell-like wildcard match routines
- *
- *
- * See shexp.h for public documentation.
- *
- * Rob McCool
- *
- */
-
-#include "shexp.h"
-#include <ctype.h> /* isalpha, tolower */
-
-
-/* ----------------------------- shexp_valid ------------------------------ */
-
-
-int valid_subexp(char *exp, char stop)
-{
- register int x,y,t;
- int nsc,np,tld;
-
- x=0;nsc=0;tld=0;
-
- while(exp[x] && (exp[x] != stop)) {
- switch(exp[x]) {
- case '~':
- if(tld) return INVALID_SXP;
- else ++tld;
- case '*':
- case '?':
- case '^':
- case '$':
- ++nsc;
- break;
- case '[':
- ++nsc;
- if((!exp[++x]) || (exp[x] == ']'))
- return INVALID_SXP;
- for(++x;exp[x] && (exp[x] != ']');++x)
- if(exp[x] == '\\')
- if(!exp[++x])
- return INVALID_SXP;
- if(!exp[x])
- return INVALID_SXP;
- break;
- case '(':
- ++nsc;np = 0;
- while(1) {
- if(exp[++x] == ')')
- return INVALID_SXP;
- for(y=x;(exp[y]) && (exp[y] != '|') && (exp[y] != ')');++y)
- if(exp[y] == '\\')
- if(!exp[++y])
- return INVALID_SXP;
- if(!exp[y])
- return INVALID_SXP;
- if(exp[y] == '|')
- ++np;
- t = valid_subexp(&exp[x],exp[y]);
- if(t == INVALID_SXP)
- return INVALID_SXP;
- x+=t;
- if(exp[x] == ')') {
- if(!np)
- return INVALID_SXP;
- break;
- }
- }
- break;
- case ')':
- case ']':
- return INVALID_SXP;
- case '\\':
- if(!exp[++x])
- return INVALID_SXP;
- default:
- break;
- }
- ++x;
- }
- if((!stop) && (!nsc))
- return NON_SXP;
- return ((exp[x] == stop) ? x : INVALID_SXP);
-}
-
-NSAPI_PUBLIC int shexp_valid(char *exp) {
- int x;
-
- x = valid_subexp(exp, '\0');
- return (x < 0 ? x : VALID_SXP);
-}
-
-
-/* ----------------------------- shexp_match ----------------------------- */
-
-
-#define MATCH 0
-#define NOMATCH 1
-#define ABORTED -1
-
-int _shexp_match(char *str, char *exp);
-
-int handle_union(char *str, char *exp)
-{
- char *e2 = (char *) MALLOC(sizeof(char)*strlen(exp));
- register int t,p2,p1 = 1;
- int cp;
-
- while(1) {
- for(cp=1;exp[cp] != ')';cp++)
- if(exp[cp] == '\\')
- ++cp;
- for(p2 = 0;(exp[p1] != '|') && (p1 != cp);p1++,p2++) {
- if(exp[p1] == '\\')
- e2[p2++] = exp[p1++];
- e2[p2] = exp[p1];
- }
- for(t=cp+1;(e2[p2] = exp[t]);++t,++p2);
- if(_shexp_match(str,e2) == MATCH) {
- FREE(e2);
- return MATCH;
- }
- if(p1 == cp) {
- FREE(e2);
- return NOMATCH;
- }
- else ++p1;
- }
-}
-
-
-int _shexp_match(char *str, char *exp)
-{
- register int x,y;
- int ret,neg;
-
- ret = 0;
- for(x=0,y=0;exp[y];++y,++x) {
- if((!str[x]) && (exp[y] != '(') && (exp[y] != '$') && (exp[y] != '*'))
- ret = ABORTED;
- else {
- switch(exp[y]) {
- case '$':
- if( (str[x]) )
- ret = NOMATCH;
- else
- --x; /* we don't want loop to increment x */
- break;
- case '*':
- while(exp[++y] == '*');
- if(!exp[y])
- return MATCH;
- while(str[x]) {
- switch(_shexp_match(&str[x++],&exp[y])) {
- case NOMATCH:
- continue;
- case ABORTED:
- ret = ABORTED;
- break;
- default:
- return MATCH;
- }
- break;
- }
- if((exp[y] == '$') && (exp[y+1] == '\0') && (!str[x]))
- return MATCH;
- else
- ret = ABORTED;
- break;
- case '[':
- if((neg = ((exp[++y] == '^') && (exp[y+1] != ']'))))
- ++y;
-
- if((isalnum(exp[y])) && (exp[y+1] == '-') &&
- (isalnum(exp[y+2])) && (exp[y+3] == ']'))
- {
- int start = exp[y], end = exp[y+2];
-
- /* Droolproofing for pinheads not included */
- if(neg ^ ((str[x] < start) || (str[x] > end))) {
- ret = NOMATCH;
- break;
- }
- y+=3;
- }
- else {
- int matched;
-
- for(matched=0;exp[y] != ']';y++)
- matched |= (str[x] == exp[y]);
- if(neg ^ (!matched))
- ret = NOMATCH;
- }
- break;
- case '(':
- return handle_union(&str[x],&exp[y]);
- break;
- case '?':
- break;
- case '\\':
- ++y;
- default:
-#ifdef XP_UNIX
- if(str[x] != exp[y])
-#else /* XP_WIN32 */
- if(strnicmp(str + x, exp + y, 1))
-#endif /* XP_WIN32 */
- ret = NOMATCH;
- break;
- }
- }
- if(ret)
- break;
- }
- return (ret ? ret : (str[x] ? NOMATCH : MATCH));
-}
-
-NSAPI_PUBLIC int shexp_match(char *str, char *xp) {
- register int x;
- char *exp = STRDUP(xp);
-
- for(x=strlen(exp)-1;x;--x) {
- if((exp[x] == '~') && (exp[x-1] != '\\')) {
- exp[x] = '\0';
- if(_shexp_match(str,&exp[++x]) == MATCH)
- goto punt;
- break;
- }
- }
- if(_shexp_match(str,exp) == MATCH) {
- FREE(exp);
- return 0;
- }
-
- punt:
- FREE(exp);
- return 1;
-}
-
-
-/* ------------------------------ shexp_cmp ------------------------------- */
-
-
-NSAPI_PUBLIC int shexp_cmp(char *str, char *exp)
-{
- switch(shexp_valid(exp)) {
- case INVALID_SXP:
- return -1;
- case NON_SXP:
-#ifdef XP_UNIX
- return (strcmp(exp,str) ? 1 : 0);
-#else /* XP_WIN32 */
- return (stricmp(exp,str) ? 1 : 0);
-#endif /* XP_WIN32 */
- default:
- return shexp_match(str, exp);
- }
-}
-
-
-/* ---------------------------- shexp_casecmp ----------------------------- */
-
-
-NSAPI_PUBLIC int shexp_casecmp(char *str, char *exp)
-{
- char *lstr = STRDUP(str), *lexp = STRDUP(exp), *t;
- int ret;
-
- for(t = lstr; *t; t++)
- if(isalpha(*t)) *t = tolower(*t);
- for(t = lexp; *t; t++)
- if(isalpha(*t)) *t = tolower(*t);
-
- switch(shexp_valid(lexp)) {
- case INVALID_SXP:
- ret = -1;
- break;
- case NON_SXP:
- ret = (strcmp(lexp, lstr) ? 1 : 0);
- break;
- default:
- ret = shexp_match(lstr, lexp);
- }
- FREE(lstr);
- FREE(lexp);
- return ret;
-}
-
diff --git a/lib/libaccess/utest/shexp.h b/lib/libaccess/utest/shexp.h
deleted file mode 100644
index 76d62ffc..00000000
--- a/lib/libaccess/utest/shexp.h
+++ /dev/null
@@ -1,168 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- *
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- *
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
- *
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-/*
- * shexp.h: Defines and prototypes for shell exp. match routines
- *
- *
- * This routine will match a string with a shell expression. The expressions
- * accepted are based loosely on the expressions accepted by zsh.
- *
- * o * matches anything
- * o ? matches one character
- * o \ will escape a special character
- * o $ matches the end of the string
- * o [abc] matches one occurence of a, b, or c. The only character that needs
- * to be escaped in this is ], all others are not special.
- * o [a-z] matches any character between a and z
- * o [^az] matches any character except a or z
- * o ~ followed by another shell expression will remove any pattern
- * matching the shell expression from the match list
- * o (foo|bar) will match either the substring foo, or the substring bar.
- * These can be shell expressions as well.
- *
- * The public interface to these routines is documented below.
- *
- * Rob McCool
- *
- */
-
-#ifndef SHEXP_H
-#define SHEXP_H
-
-/*
- * Requires that the macro MALLOC be set to a "safe" malloc that will
- * exit if no memory is available. If not under MCC httpd, define MALLOC
- * to be the real malloc and play with fire, or make your own function.
- */
-
-#include "../netsite.h"
-
-#include <ctype.h> /* isalnum */
-#include <string.h> /* strlen */
-
-
-/*
- * Wrappers for shexp/regexp
- *
- * Portions of code that explicitly want to have either shexp's
- * or regexp's should call those functions directly.
- *
- * Common code bases for multiple products should use the following
- * macros instead to use either shell or regular expressions,
- * depending on the flavor chosen for a given server.
- *
- */
-#if defined(MCC_PROXY) && defined(USE_REGEX)
-
-#include "base/regexp.h"
-
-#define WILDPAT_VALID(exp) regexp_valid(exp)
-#define WILDPAT_MATCH(str, exp) regexp_match(str, exp)
-#define WILDPAT_CMP(str, exp) regexp_cmp(str, exp)
-#define WILDPAT_CASECMP(str, exp) regexp_casecmp(str, exp)
-
-#else /* HTTP servers */
-
-#define WILDPAT_VALID(exp) shexp_valid(exp)
-#define WILDPAT_MATCH(str, exp) shexp_match(str, exp)
-#define WILDPAT_CMP(str, exp) shexp_cmp(str, exp)
-#define WILDPAT_CASECMP(str, exp) shexp_casecmp(str, exp)
-
-#endif
-
-
-/* --------------------------- Public routines ---------------------------- */
-
-NSPR_BEGIN_EXTERN_C
-
-/*
- * shexp_valid takes a shell expression exp as input. It returns:
- *
- * NON_SXP if exp is a standard string
- * INVALID_SXP if exp is a shell expression, but invalid
- * VALID_SXP if exp is a valid shell expression
- */
-
-#define NON_SXP -1
-#define INVALID_SXP -2
-#define VALID_SXP 1
-
-/* and generic shexp/regexp versions */
-#define NON_WILDPAT NON_SXP
-#define INVALID_WILDPAT INVALID_SXP
-#define VALID_WILDPAT VALID_SXP
-
-/* and regexp versions */
-#define NON_REGEXP NON_SXP
-#define INVALID_REGEXP INVALID_SXP
-#define VALID_REGEXP VALID_SXP
-
-
-NSAPI_PUBLIC int shexp_valid(char *exp);
-
-/*
- * shexp_match
- *
- * Takes a prevalidated shell expression exp, and a string str.
- *
- * Returns 0 on match and 1 on non-match.
- */
-
-NSAPI_PUBLIC int shexp_match(char *str, char *exp);
-
-
-/*
- * shexp_cmp
- *
- * Same as above, but validates the exp first. 0 on match, 1 on non-match,
- * -1 on invalid exp. shexp_casecmp does the same thing but is case
- * insensitive.
- */
-
-NSAPI_PUBLIC int shexp_cmp(char *str, char *exp);
-NSAPI_PUBLIC int shexp_casecmp(char *str, char *exp);
-
-NSPR_END_EXTERN_C
-
-#endif
-
diff --git a/lib/libaccess/utest/test.ref b/lib/libaccess/utest/test.ref
deleted file mode 100644
index 1a2d060f..00000000
--- a/lib/libaccess/utest/test.ref
+++ /dev/null
@@ -1,217 +0,0 @@
-Failed ACL_FileMergeFile() test.
-Method one is #1, rv=0
-Method two is #2, rv=0
-Method one repeated is #1, rv=0
-Method three is #3, rv=0
- Method[0] = "two"
- Method[1] = "three"
- Method[2] = "one"
-DbType two is #2, rv=0
-DbType three is #3, rv=0
-DbType two repeated is #2, rv=0
-DbType four is #4, rv=0
- Database[0] = "db2"
- Database[1] = "db1"
- Database[2] = "db3"
-position 1
-position 2
-position 3
-position 4
-aclfile0 = 0
-
-aclfile1 = 1
-
-aclfile2 = 1
-
-aclfile3 = 1
-
-aclfile4 = 0
-
-aclfile5 = 0
-
-aclfile6 = 0
-
-aclfile7 = 1
-
-aclfile8 = 0
-
-aclfile9 = 3
-
-ACL file: internal-buffer
-Syntax error at line: 1, token: >
-ACL file: internal-buffer
-Syntax error at line: 2, token: junk
-aclfile10 = 1
-
-aclfile11 = 1
-
-aclfile12 = 0
-
-aclfile13 = 0
-
-aclfile14 = 0
-
-aclfile15 = 1
-
-aclfile16 = 1
-
-aclfile17 = 0
-
-aclfile18 = 0
-
-aclfile19 = 1
-
-dnsalias = *? -1
-
-dnsalias = aruba.mcom.com brain251.mcom.com? -1
-
-dns = *? -1
-
-dns != *? -2
-
-dns = aruba.mcom.com? -1
-
-dns = ai.mit.edu? -2
-
-dns = *.ai.mit.edu? -2
-
-dns = *.mit.edu? -2
-
-dns = *.edu? -2
-
-dns != *.edu? -1
-
-mistake != *.edu? -5
-
-dns > *.edu? -5
-
-ip = *? -1
-
-ip != *? -2
-
-ip = *.*.*.*? -1
-
-ip = 17.*? -1
-
-ip = 17.*.*.*? -1
-
-ip = 17.34.*? -1
-
-ip = 17.34.*.*? -1
-
-ip = 17.34.51.*? -1
-
-ip = 17.34.51.*+255.255.255.255? -1
-
-ip = 17.34.51.69+255.255.255.254, 123.45.67.89? -1
-
-ip != 17.34.51.69+255.255.255.254, 123.45.67.89? -2
-
-ip = 17.34.51.68, 17.34.51.69? -1
-
-ip = 17.34.51.68, 17.34.51.69, 123.45.67.89? -1
-
-ip != 17.34.51.68, 17.34.51.69, 123.45.67.89? -2
-
-ip = 17.34.51.68? -1
-
-ip = 17.34.51.69? -2
-
-ip = 17.34.51.69+255.255.255.254? -1
-
-ip = 17.34.50.69+255.255.254.0? -1
-
-ip = 17.35.50.69+255.254.0.0? -1
-
-ip = 16.35.50.69+254.0.0.0? -1
-
-ip = 123.45.67.89? -2
-
-ip != 123.45.67.89? -1
-
-ip > 123.45.67.89? -5
-
-ip < 123.45.67.89? -5
-
-ip >= 123.45.67.89? -5
-
-ip <= 123.45.67.89? -5
-
-mistake <= 123.45.67.89? -5
-
-time = 2120? -1
-
-time != 2120? -2
-
-time = 0700? -2
-
-time != 0700? -1
-
-time = 2400? -2
-
-time != 2400? -1
-
-time > 2120? -2
-
-time < 2120? -2
-
-time > 0700? -1
-
-time < 0700? -2
-
-time > 2400? -2
-
-time < 2400? -1
-
-time >= 2120? -1
-
-time <= 2120? -1
-
-time >= 0700? -1
-
-time <= 0700? -2
-
-time >= 2400? -2
-
-time <= 2400? -1
-
-mistake <= 2400? -5
-
-time = 0800-2200? -1
-
-time != 0800-2200? -2
-
-time = 2200-0800? -2
-
-time != 2200-0800? -1
-
-time <= 2200-0800? -5
-
-= mon? -1
-
-= tUe? -2
-
-= weD? -2
-
-= THu? -2
-
-= FrI? -2
-
-= tUe? -2
-
-= Sun? -2
-
-= mon,tuewed,thu,frisatsun? -1
-
-!= mon,tuewed,thu,frisatsun? -2
-
-> Sun? -5
-
-< Sun? -5
-
->= Sun? -5
-
-<= Sun? -5
-
-mistake <= Sun? -5
-
diff --git a/lib/libaccess/utest/testmain.cpp b/lib/libaccess/utest/testmain.cpp
deleted file mode 100644
index 24b535a3..00000000
--- a/lib/libaccess/utest/testmain.cpp
+++ /dev/null
@@ -1,89 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- *
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- *
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
- *
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-/*
- * ACL parser unit test program
- */
-
-#include <stdio.h>
-#include <netsite.h>
-#include <libaccess/acl.h>
-#include <libaccess/nserror.h>
-#include "../aclpriv.h"
-#include <libaccess/aclproto.h>
-
-main(int argc, char **argv)
-{
-
-ACLListHandle_t *acllist;
-int ii;
-char filename[255];
-ACLWrapper_t *wrap;
-ACLExprHandle_t *expr;
-
- if ( argc < 2 ) {
- fprintf(stderr, "usage: aclparse <filenames>\n");
- exit(1);
- }
- for (ii = 1; ii < argc; ii++ ) {
- acllist = ACL_ParseFile(NULL, argv[ii]);
- if ( acllist == NULL ) {
- printf("Failed to parse ACL.\n");
-
- } else {
- for (wrap = acllist->acl_list_head; wrap;
- wrap = wrap->wrap_next) {
- for (expr=wrap->acl->expr_list_head;
- expr;
- expr = expr->expr_next ) {
- ACL_ExprDisplay(expr);
- }
- }
- }
-
-
- sprintf(filename, "%s.v30", argv[ii]);
- ACL_WriteFile(NULL, filename, acllist);
- ACL_ListDestroy( acllist );
- }
-
-}
diff --git a/lib/libaccess/utest/twotest.cpp b/lib/libaccess/utest/twotest.cpp
deleted file mode 100644
index 25024d3a..00000000
--- a/lib/libaccess/utest/twotest.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- *
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- *
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
- *
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <netsite.h>
-#include <base/plist.h>
-#include <base/ereport.h>
-#include <libaccess/nserror.h>
-#include <libaccess/acl.h>
-#include "../aclpriv.h"
-#include <libaccess/aclproto.h>
-#include <libaccess/las.h>
-
-
-extern ACLListHandle_t *ACL_ParseFile(NSErr_t *errp, char *filename);
-
-int main(int arc, char **argv)
-{
- int result;
- ACLEvalHandle_t eval;
- char *rights[2];
- char *map_generic[7];
- char *bong;
- char *bong_type;
- char *acl_tag;
- int expr_num;
-
- /* ACL Eval Unit Tests
- */
-
- rights[0] = "html_read";
- rights[1] = "html_write";
- rights[2] = NULL;
-
- map_generic[0] = "html_read";
- map_generic[1] = "html_write";
- map_generic[2] = "N/A";
- map_generic[3] = "html_create";
- map_generic[4] = "html_delete";
- map_generic[5] = "N/A";
- map_generic[6] = NULL;
-
- eval.acllist = ACL_ParseFile((NSErr_t *)NULL, argv[1]);
- result = ACL_EvalTestRights(NULL, &eval, &rights[0], map_generic, &bong, &bong_type, &acl_tag, &expr_num);
- ACL_ListDestroy(NULL, eval.acllist);
- printf("%s = %d\n\n", argv[1], result);
-
-}
diff --git a/lib/libaccess/utest/ustubs.cpp b/lib/libaccess/utest/ustubs.cpp
deleted file mode 100644
index 61a0845e..00000000
--- a/lib/libaccess/utest/ustubs.cpp
+++ /dev/null
@@ -1,331 +0,0 @@
-/** BEGIN COPYRIGHT BLOCK
- * This Program is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free Software
- * Foundation; version 2 of the License.
- *
- * This Program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place, Suite 330, Boston, MA 02111-1307 USA.
- *
- * In addition, as a special exception, Red Hat, Inc. gives You the additional
- * right to link the code of this Program with code not covered under the GNU
- * General Public License ("Non-GPL Code") and to distribute linked combinations
- * including the two, subject to the limitations in this paragraph. Non-GPL Code
- * permitted under this exception must only link to the code of this Program
- * through those well defined interfaces identified in the file named EXCEPTION
- * found in the source code files (the "Approved Interfaces"). The files of
- * Non-GPL Code may instantiate templates or use macros or inline functions from
- * the Approved Interfaces without causing the resulting work to be covered by
- * the GNU General Public License. Only Red Hat, Inc. may make changes or
- * additions to the list of Approved Interfaces. You must obey the GNU General
- * Public License in all respects for all of the Program code and other code used
- * in conjunction with the Program except the Non-GPL Code covered by this
- * exception. If you modify this file, you may extend this exception to your
- * version of the file, but you are not obligated to do so. If you do not wish to
- * provide this exception without modification, you must delete this exception
- * statement from your version and license this file solely under the GPL without
- * exception.
- *
- *
- * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
- * Copyright (C) 2005 Red Hat, Inc.
- * All rights reserved.
- * END COPYRIGHT BLOCK **/
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <sys/types.h>
-#include <malloc.h>
-#include <string.h>
-#include <base/crit.h>
-#include <base/plist.h>
-
-#include <libaccess/nserror.h>
-#include <libaccess/acl.h>
-#include "../aclpriv.h"
-#include <libaccess/aclproto.h>
-#include <libaccess/ldapacl.h>
-#include <ldaputil/dbconf.h>
-#include <prprf.h>
-
-NSPR_BEGIN_EXTERN_C
-extern char * ACL_Program;
-extern int conf_getglobals();
-extern int SPconf_getglobals();
-extern int ereport(int, char*, ...);
-extern int SPereport(int, char*, ...);
-extern char * GetAdminLanguage(void);
-extern char * XP_GetStringFromDatabase(char *strLibraryName, char *strLanguage, int iToken);
-extern void ACL_Restart(void *cntlData);
-extern int XP_SetError();
-extern int XP_GetError();
-extern int acl_usr_cache_init();
-extern int acl_usr_cache_set_group();
-extern int acl_usr_cache_group_check();
-extern int acl_usr_cache_group_len_check();
-extern int acl_usr_cache_enabled();
-extern int get_userdn_ldap (NSErr_t *errp, PList_t subject,
- PList_t resource, PList_t auth_info,
- PList_t global_auth, void *unused);
-extern char *ldapu_err2string(int err);
-extern int ACL_CacheFlush(void);
-NSPR_END_EXTERN_C
-
-static char errbuf[10];
-
-char *
-ldapu_err2string(int err)
-{
- sprintf(errbuf, "%d", err);
- return errbuf;
-}
-
-#ifdef notdef
-char *system_errmsg()
-{
- static char errmsg[1024];
-
- sprintf(errmsg, "Stubbed system_errmsg");
- return errmsg;
-}
-#endif
-
-int
-ACL_CacheFlushRegister(AclCacheFlushFunc_t flush_func)
-{
- return 0;
-}
-
-int acl_usr_cache_init()
-{
- return 0;
-}
-
-int acl_usr_cache_group_check()
-{
- return 0;
-}
-
-int acl_usr_cache_set_group()
-{
- return 0;
-}
-
-int acl_usr_cache_group_len_check()
-{
- return 0;
-}
-
-int acl_usr_cache_enabled()
-{
- return 0;
-}
-
-int get_userdn_ldap (NSErr_t *errp, PList_t subject,
- PList_t resource, PList_t auth_info,
- PList_t global_auth, void *unused)
-{
- return LAS_EVAL_TRUE;
-}
-
-int XP_SetError()
-{
- return 0;
-}
-
-int XP_GetError()
-{
- return 0;
-}
-
-CRITICAL
-crit_init()
-{
- return (CRITICAL)1;
-}
-
-void
-crit_enter(CRITICAL c)
-{
- return;
-}
-
-void
-crit_exit(CRITICAL c)
-{
- return;
-}
-
-void
-crit_terminate(CRITICAL c)
-{
- return;
-}
-
-int crit_owner_is_me(CRITICAL id)
-{
- return 1;
-}
-
-int symTableFindSym()
-{
- return 0;
-}
-
-int
-ldap_auth_uid_groupid(LDAP *ld, char *uid, char *groupid,
- char *base)
-{
- return 0;
-}
-
-LDAP *
-init_ldap (char *host, int port, int use_ssl)
-{
- return (LDAP *)"init_ldap_stub";
-}
-
-int ACL_LDAPDatabaseHandle (NSErr_t *errp, const char *dbname, LDAP **ld,
- char **basedn)
-{
- *ld = (LDAP *)"ACL_LDAPDatabaseHandle_stub";
- if (basedn) *basedn = strdup("unknown basedn");
- return LAS_EVAL_TRUE;
-}
-
-#ifdef notdef
-NSEFrame_t * nserrGenerate(NSErr_t * errp, long retcode, long errorid,
- char * program, int errc, ...)
-{
- return 0;
-}
-#endif
-
-char * ACL_Program;
-
-char *
-LASUserGetUser()
-{
- return "hmiller";
-}
-
-int
-LASIpGetIp()
-{
- return(0x11223344);
-}
-
-int
-LASDnsGetDns(char **dnsv)
-{
- *dnsv = "aruba.mcom.com";
- return 0;
-}
-
-int
-ACL_DestroyList()
-{
-return(0);
-}
-
-int
-aclCheckHosts()
-{
-return(0);
-}
-
-int
-aclCheckUsers()
-{
-return(0);
-}
-
-char *LASGroupGetUser()
-{
- return("hmiller");
-}
-
-int
-SPconf_getglobals()
-{
- return 0;
-}
-
-int
-conf_getglobals()
-{
- return 0;
-}
-
-int
-SPereport(int degree, char *fmt, ...)
-{
- va_list args;
- char errstr[1024];
-
- va_start(args, fmt);
- PR_vsnprintf(&errstr[0], sizeof(errstr), fmt, args);
- printf("%s", errstr);
- va_end(args);
- return 0;
-}
-
-int
-ereport(int degree, char *fmt, ...)
-{
- va_list args;
- char errstr[1024];
-
- va_start(args, fmt);
- PR_vsnprintf(&errstr[0], sizeof(errstr), fmt, args);
- printf("%s", errstr);
- va_end(args);
- return 0;
-}
-
-#ifdef notdef
-int dbconf_read_config_file (const char *file, DBConfInfo_t **conf_info_out)
-{
- return 0;
-}
-#endif
-
-char *
-GetAdminLanguage(void)
-{
- return "";
-}
-
-static char errstr[1024];
-
-char *
-XP_GetStringFromDatabase(char *strLibraryName, char *strLanguage, int iToken)
-{
- sprintf(errstr, "XP_GetAdminStr called for error %d\n", iToken);
- return errstr;
-}
-
-void
-ACL_Restart(void * cntlData)
-{
- return;
-}
-
-NSAPI_PUBLIC int
-parse_ldap_url(NSErr_t *errp, ACLDbType_t dbtype, const char *name, const char
-*url, PList_t plist, void **db)
-{
- return 0;
-}
-
-int
-ACL_CacheFlush(void)
-{
- return 0;
-}