OSF DCE Application Development Guide--Introduction and Style Guide
A Sample Application
/* The constants below come from aclbase.h (aclbase.idl)... */
#define OBJ_OWNER_PERMS sec_acl_perm_read | sec_acl_perm_write \
| sec_acl_perm_delete | sec_acl_perm_test \
| sec_acl_perm_control | sec_acl_perm_execute
#define ALL_MGMT_PERMS mgmt_perm_inq_if | mgmt_perm_inq_pname \
| mgmt_perm_inq_stats | mgmt_perm_ping \
| mgmt_perm_kill | sec_acl_perm_test \
| sec_acl_perm_control
/* These are the two entry point vectors that are explicitly initialized: */
extern rdaclif_v1_0_epv_t dce_acl_v1_0_epv;
extern sample_bind_v1_0_epv_t sample_bind_epv;
/* This global boolean records whether the backing store databases have */
/* actually been opened or not. This allows us to avoid calling the */
/* server_acl_mgr_close() routine when there are no open databases; call- */
/* the dce_db_close() routine on an unopened database will result in a */
/* core dump. */
boolean32 databases_open;
/****************************************************************************/
/* [27.VI.94] */
/* */
/* sample_server.c -- Main program for "sample" server: initialization */
/* and cleanup. */
/* */
/* Note that no remote calls are defined in this file; for those, refer */
/* to either sample_manager.c or sample_bind.c. */
/* */
/* -77 cols- */
/****************************************************************************/
#define DCE_DEBUG
#include <stdio.h>
#include <malloc.h>
#include <time.h>
#include <pthread.h>
#include <errno.h>
#include <unistd.h>
#include <signal.h>
#include <sys/param.h>
#include <dce/dce.h>
/* #include <dce/stubbase.h> */
#include <dce/dce_cf.h>
#include <dce/dce_error.h>
#include <dce/rpc.h>
#include <dce/sec_login.h>
#include <dce/keymgmt.h>
#include <dce/uuid.h>
#include <dce/exc_handling.h>
124246 Tandem Computers Incorporated A−7










