ldap_log.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2001 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <time.h>
#include "nis_proc.h"
#include <nis_servlist.h>
#include <ldap_util.h>
int
beginTransaction(void) {
return (begin_transaction(nis_local_principal()));
}
int
/* Are we the master for the directory ? */
master = 1;
} else {
master = 0;
}
/*
* End the trans.log operation. If we're the master, we also
* modify the update time cache, otherwise not.
*/
/*
* If we're the master, and there are replicas, make a note to
* ping them.
*/
if (master) {
}
return (ret);
}
int
__nis_buffer_t b = {0, 0};
char *myself = "addUpdate";
return (-1);
/* Supply current time for log entry, if the caller specified zero */
if (ttime == 0)
add_update(&le);
/* Flush the relevant caches */
case NIS_DIRECTORY_OBJ:
/*
* Since flush_dircache() looks for a new version in the
* directory cache (assuming it's been flushed by the update,
* which doesn't happen in our case), we first need to flush
* the rpc.nisd dir cache.
*/
/*
* If an old (pre-mod) directory object was supplied, and
* we were the master for that object, tell all replicas
* (of the old incarnation) to flush it from their caches.
*/
}
break;
case NIS_TABLE_OBJ:
if (b.len > 0) {
flush_tablecache(b.buf);
}
break;
case NIS_GROUP_OBJ:
if (b.len > 0) {
flush_groupcache(b.buf);
}
default:
break;
}
return (0);
}