*wliapitest.c

*/

#include<stdio.h>

 

#include<fcntl.h>

 

#include<sys/errno.h>

 

#include<api.h>

 

 

#define IBAC_TEST

"ibac_test"

main(int argc, char *argv[])

wli_fap_t

ptype = WLIAPI_FAP_IBAC;

wliapi_err_t

err = WLIAPI_SUCCESS;

int

 

fd = 0;

fd = open(IBAC_TEST, O_CREATO_TRUNCO_RDWR, 0666); if ( fd < 0 ) {

(void) fprintf(stderr,

"Failed to create a test file; error %d\n", errno); return(-1);

}

close(fd);

err = wli_add_fap(IBAC_TEST, ptype); if (err) {

fprintf(stderr, "Failed to add fap %d\n", err); return(-1);

}

err = wli_check_fap(IBAC_TEST, ptype, WLIAPI_FREAD); if (err) {

fprintf(stderr, "Failed to check fap %d\n", err); return(-1);

}

err = wli_del_fap(IBAC_TEST, ptype); if (err) {

fprintf(stderr, "Failed to del fap %d\n", err);

}

return(err);

}

A.4 IBAC add and delete program 47

Page 47
Image 47
HP UX Security Products and Features Software manual Ibac add and delete program