2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License, Version 1.0 only 2N/A * (the "License"). You may not use this file except in compliance 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A#
pragma ident "%Z%%M% %I% %E% SMI" 2N/A * create an ancilary file if audit characteristics exist 2N/A * else delete an ancilary if if one exists 2N/A * gets differences between old and new crontab files. 2N/A * cf - name of crontab file 2N/A * tmp_name - name of new crontab file 2N/A * bufptr - pointer to an array of characters with 2N/A * either an error message or an output of "diff" command. 2N/A * AUDIT_GET_DIFFS_ERR - errors; 2N/A * file not exists (do not free *bufptr in this case) 2N/A * AUDIT_GET_DIFFS_NO_DIFFS - errors; 2N/A * file exists (do not free *bufptr in this case) 2N/A * AUDIT_GET_DIFFS_CRONTAB - OK, old crontab file exists. 2N/A * AUDIT_GET_DIFFS_NO_CRONTAB - OK. there is no crontab file. 2N/A "crontab: %s: stat: %s\n",
2N/A "crontab: %s: stat: %s\n",
2N/A /* there is no difference */ 2N/A /* return information on create or update crontab */ 2N/A * audit_crontab_not_allowed determines if we have a case that should be audited 2N/A * but we can't. If auditing is enabled but the current process is not 2N/A * audited, then the ruid of the user doing the editing must be the owner 2N/A * id of the file to be edited. 2N/A * When audit_crontab_not_allowed is called, ruid is for the crontab file 2N/A * to be modified or created. 2N/A int rc = 0;
/* 0 == allow */ 2N/A rc =
1;
/* deny access if invalid */ 2N/A rc = 0;
/* editing his own crontab */ 2N/A rc = 0;
/* audit failure: not enabled */