17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*074e084fSml93401 * Common Development and Distribution License (the "License"). 6*074e084fSml93401 * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* 22*074e084fSml93401 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 267c478bd9Sstevel@tonic-gate #ifndef _ACONF_H 277c478bd9Sstevel@tonic-gate #define _ACONF_H 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate #include <sys/types.h> 327c478bd9Sstevel@tonic-gate #include <sys/param.h> 337c478bd9Sstevel@tonic-gate #include <stdio.h> 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate #ifdef __cplusplus 367c478bd9Sstevel@tonic-gate extern "C" { 377c478bd9Sstevel@tonic-gate #endif 387c478bd9Sstevel@tonic-gate 397c478bd9Sstevel@tonic-gate #define MAXRESLEN 256 407c478bd9Sstevel@tonic-gate 417c478bd9Sstevel@tonic-gate typedef struct acctconf { 42*074e084fSml93401 int state; 43*074e084fSml93401 char file[MAXPATHLEN]; 44*074e084fSml93401 char tracked[MAXRESLEN]; 45*074e084fSml93401 char untracked[MAXRESLEN]; 467c478bd9Sstevel@tonic-gate } acctconf_t; 477c478bd9Sstevel@tonic-gate 487c478bd9Sstevel@tonic-gate /* 497c478bd9Sstevel@tonic-gate * Predefined strings 507c478bd9Sstevel@tonic-gate */ 517c478bd9Sstevel@tonic-gate #define AC_STR_NONE "none" 527c478bd9Sstevel@tonic-gate 53*074e084fSml93401 /* 54*074e084fSml93401 * Configuration property group name 55*074e084fSml93401 */ 56*074e084fSml93401 #define AC_PGNAME "config" 577c478bd9Sstevel@tonic-gate 58*074e084fSml93401 /* 59*074e084fSml93401 * Configuration property names 60*074e084fSml93401 */ 61*074e084fSml93401 #define AC_PROP_STATE "enabled" 62*074e084fSml93401 #define AC_PROP_FILE "file" 63*074e084fSml93401 #define AC_PROP_TRACKED "tracked" 64*074e084fSml93401 #define AC_PROP_UNTRACKED "untracked" 65*074e084fSml93401 66*074e084fSml93401 extern void aconf_init(acctconf_t *, int); 67*074e084fSml93401 extern int aconf_setup(const char *); 68*074e084fSml93401 extern int aconf_scf_init(const char *); 69*074e084fSml93401 extern void aconf_scf_fini(void); 70*074e084fSml93401 extern int aconf_set_string(const char *, const char *); 71*074e084fSml93401 extern int aconf_set_bool(const char *, boolean_t); 72*074e084fSml93401 extern int aconf_save(void); 73*074e084fSml93401 extern void aconf_print(FILE *, int); 74*074e084fSml93401 extern boolean_t aconf_have_smf_auths(void); 75*074e084fSml93401 extern const char *aconf_type2fmri(int); 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gate #ifdef __cplusplus 787c478bd9Sstevel@tonic-gate } 797c478bd9Sstevel@tonic-gate #endif 807c478bd9Sstevel@tonic-gate 817c478bd9Sstevel@tonic-gate #endif /* _ACONF_H */ 82