OSF DCE Administration Guide--Core Components
OSF DCE Administration Guide—Core Components
proc process_attribute_list {attribute_list pile_of_attributes} {
foreach element $pile_of_attributes { upvar 1 $element _dcp_$element }
upvar 1 attribute_list _dcp_attribute_list
set _dcp_attribute_list [check_list_list $_dcp_attribute_list]
foreach element $_dcp_attribute_list {
if { [llength $element] !=2}{
error "Incorrect attribute list element
}
set attribute_name [lindex $element 0]
set attribute_value [lindex $element 1]
set _dcp_attr_name [info vars _dcp_$attribute_name*]
if {[llength $_dcp_attr_name] > 1} {
error "Ambiguous attribute
}
set [set _dcp_attr_name] $attribute_value
}
}
proc check_list_list {attribute_list} {
set not_list_list 0
seti1
foreach element $attribute_list {
if {[llength $element] != 2 && [llength $attribute_list] < 3} {
if {$i == 1} {
return [format "{%s}" $attribute_list]
}
}
incr i
}
return $attribute_list
}
The next procedure we discuss in the user task object is one that takes a single optional
argument and returns lots of output information: the _dcp_show_user procedure. This
procedure returns the results of principal show, principal catalog, and account show
operations.
#
#_dcp_show_user - This procedure shows the principal and account
# attribute lists for a specified user.
#
proc _dcp_show_user {local_args} {
upvar 1 local_args cargs
set local_args $cargs
3− 10 Tandem Computers Incorporated 124243