OSF DCE Application Development Guide--Introduction and Style Guide
Security
machine_principal,
&machine_princ_id,
status);
/* Add a user entry for the machine principal to the new */
/* ACL... */
permset = ALL_MGMT_PERMS;
dce_acl_obj_add_user_entry(
&new_acl,
permset,
&machine_princ_id,
status);
/* By default everybody must be able to get the principal */
/* name. They should be able to ping too. So add an appro- */
/* priate unauthenticated permissions entry to the ACL... */
permset = mgmt_perm_inq_pname | mgmt_perm_ping;
dce_acl_obj_add_unauth_entry(
&new_acl,
permset,
status);
/* Add permissions for the any_other entry in the ACL... */
permset = mgmt_perm_inq_pname | mgmt_perm_ping;
dce_acl_obj_add_any_other_entry(
&new_acl,
permset,
status);
/* Store the mgmt ACL... */
server_store_acl(
*db_acl, /* The ACL UUID-indexed store. */
*db_object, /* The object UUID-indexed store. */
*db_name, /* The name ("residual")-indexed store. */
&new_acl, /* The ACL itself. */
mgmt_acl_uuid, /* The mgmt ACL UUID. */
&mgmt_object_uuid, /* The mgmt object UUID. */
(unsigned_char_t *)MGMT_OBJ_NAME, /* The mgmt ob- */
/* ject name. */
/* (void*) */ &datahdr, /* The data header = object */
/* contents. */
0, /* Not a container ACL. */
status);
/********************************************************************/
/* Object ACL creation code... */
/* Now create the object ACL... */
server_create_acl(
sample_acl_mgr_uuid, /* Create an ACL with this */
/* manager type. */
owner_perms, /* Give it these permissions. */
owner, /* Make this the principal name. */
&new_acl, /* This will contain new ACL. */
object_acl_uuid, /* This will contain new ACL UUID. */
124246 Tandem Computers Incorporated 3− 41










