|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T e
Length: 2958 (0xb8e)
Types: TextFile
Names: »eis_select.c«
└─⟦3d0c2be1b⟧ Bits:30001254 ISODE-5.0 Tape
└─⟦eba4602b1⟧ »./isode-5.0.tar.Z«
└─⟦d3ac74d73⟧
└─⟦this⟧ »isode-5.0/quipu/eis_select.c«
/* eis_select.c - */
#ifndef lint
static char *rcsid = "$Header: /f/osi/quipu/RCS/eis_select.c,v 6.0 89/03/18 23:41:31 mrose Rel $";
#endif
/*
* $Header: /f/osi/quipu/RCS/eis_select.c,v 6.0 89/03/18 23:41:31 mrose Rel $
*
*
* $Log: eis_select.c,v $
* Revision 6.0 89/03/18 23:41:31 mrose
* Release 5.0
*
*/
/*
* NOTICE
*
* Acquisition, use, and distribution of this module and related
* materials are subject to the restrictions of a license agreement.
* Consult the Preface in the User's Manual for the full terms of
* this agreement.
*
*/
#include "quipu/util.h"
#include "quipu/commonarg.h"
#include "quipu/entry.h"
extern LLog * log_dsap;
#define EIS_SELECT eis.eis_select
static Attr_Sequence cpy_as_comp_type ();
static Attr_Sequence cpy_as_comp ();
Attr_Sequence eis_select (eis,entryptr,dn)
EntryInfoSelection eis;
Entry entryptr;
DN dn;
{
Attr_Sequence result = NULLATTR;
register Attr_Sequence trail;
register Attr_Sequence temp;
Attr_Sequence temp2;
register Attr_Sequence eptr;
Attr_Sequence as;
DN node;
DLOG (log_dsap,LLOG_TRACE,("eis_select"));
as = entryptr -> e_attributes;
node = get_copy_dn (entryptr);
as_decode (EIS_SELECT);
if (eis.eis_allattributes) {
for(temp=as; temp != NULLATTR; temp=temp->attr_link) {
if ( (temp->attr_acl != NULLACL_INFO)&& (check_acl(dn,ACL_READ,temp->attr_acl,node ) != OK ))
continue;
if (eis.eis_infotypes == EIS_ATTRIBUTETYPESONLY)
temp2 = cpy_as_comp_type (temp);
else
temp2 = cpy_as_comp (temp);
if (result == NULLATTR) {
result = temp2;
trail = result;
} else {
trail->attr_link = temp2;
trail = temp2;
}
}
} else {
for(eptr=EIS_SELECT; eptr != NULLATTR; eptr=eptr->attr_link) {
temp = as_find_type (as,eptr->attr_type);
if ( temp == NULLATTR)
continue;
if ( (temp->attr_acl != NULLACL_INFO)&& (check_acl(dn,ACL_READ,temp->attr_acl,node ) != OK ))
continue;
if (eis.eis_infotypes == EIS_ATTRIBUTETYPESONLY)
temp2 = cpy_as_comp_type (temp);
else
temp2 = cpy_as_comp (temp);
if (result == NULLATTR) {
result = temp2;
trail = result;
} else {
trail->attr_link = temp2;
trail = temp2;
}
}
}
dn_free (node);
return (result);
}
static Attr_Sequence cpy_as_comp (as)
Attr_Sequence as;
{
Attr_Sequence ptr;
if (as==NULLATTR) {
LLOG (log_dsap,LLOG_EXCEPTIONS,("copy of null as"));
return (NULLATTR);
}
ptr = as_comp_alloc();
ptr->attr_type = as->attr_type;
ptr->attr_value = as->attr_value;
ptr->attr_link = NULLATTR;
ptr->attr_acl = NULLACL_INFO;
return (ptr);
}
static Attr_Sequence cpy_as_comp_type (as)
Attr_Sequence as;
{
Attr_Sequence ptr;
if (as==NULLATTR) {
LLOG (log_dsap,LLOG_EXCEPTIONS,("copy of null as"));
return (NULLATTR);
}
ptr = as_comp_alloc();
ptr->attr_type = as->attr_type;
ptr->attr_value = NULLAV;
ptr->attr_link = NULLATTR;
ptr->attr_acl = NULLACL_INFO;
return (ptr);
}