2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License (the "License").
2N/A * You may not use this file except in compliance with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
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 *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A/*
2N/A * DESCRIPTION: The N2L system is dependent on a number of utility functions
2N/A * supplied by NIS object code (under cmd/ypcmd). When libnisdb
2N/A * is loaded by executable other than those built under
2N/A * cmd/ypcmd these would be undefined. To prevent this happening
2N/A * the stubs in this file contain weak definitions on these
2N/A * functions. In the NIS case these weak definitions will be
2N/A * overridden by the real ones.
2N/A *
2N/A * The functions in this file will never be called. NIS will have
2N/A * overridden them and nothing else should call yptol. If they are
2N/A * called then there is a bug in the build system.
2N/A *
2N/A * Note : This is not elegant but it is a way of dealing with
2N/A * preexisting code structure.
2N/A */
2N/A
2N/A#include <unistd.h>
2N/A#include <syslog.h>
2N/A#include <sys/mman.h>
2N/A#include <thread.h>
2N/A#include <synch.h>
2N/A#include <ndbm.h>
2N/A#include "ypsym.h"
2N/A#include "shim.h"
2N/A#include "../ldap_util.h"
2N/A
2N/A
2N/A/*
2N/A * FUNCTION : disaster()
2N/A *
2N/A * DESCRIPTION: Called if the stubs is accidentally called.
2N/A */
2N/Avoid
2N/Adisaster()
2N/A{
2N/A logmsg(MSG_NOTIMECHECK, LOG_ERR, "YPTOL stub called. This indicates"
2N/A " a serious build error");
2N/A}
2N/A
2N/A#pragma weak lock_core
2N/Aint
2N/Alock_core(int hashval)
2N/A{
2N/A disaster();
2N/A return (0);
2N/A}
2N/A
2N/A#pragma weak unlock_core
2N/Aint
2N/Aunlock_core(int hashval)
2N/A{
2N/A disaster();
2N/A return (0);
2N/A}
2N/A
2N/A#pragma weak lock_map
2N/Aint
2N/Alock_map(char *mapname)
2N/A{
2N/A disaster();
2N/A return (0);
2N/A}
2N/A
2N/A#pragma weak unlock_map
2N/Aint
2N/Aunlock_map(char *mapname)
2N/A{
2N/A disaster();
2N/A return (0);
2N/A}
2N/A
2N/A#pragma weak init_lock_map
2N/Abool
2N/Ainit_lock_map()
2N/A{
2N/A disaster();
2N/A return (FALSE);
2N/A}
2N/A
2N/A#pragma weak hash
2N/Aint
2N/Ahash(char *s)
2N/A{
2N/A disaster();
2N/A return (0);
2N/A}
2N/A
2N/A#pragma weak rename_map
2N/Abool
2N/Arename_map(char *from, char *to, bool_t secure_map)
2N/A{
2N/A disaster();
2N/A return (FALSE);
2N/A}
2N/A
2N/A#pragma weak delete_map
2N/Abool
2N/Adelete_map(char *name)
2N/A{
2N/A disaster();
2N/A return (FALSE);
2N/A}
2N/A
2N/A#pragma weak single
2N/A#pragma weak nogecos
2N/A#pragma weak noshell
2N/A#pragma weak nopw
2N/A#pragma weak mflag
2N/Aint single, nogecos, noshell, nopw, mflag;
2N/A
2N/A#pragma weak validloginshell
2N/Abool_t
2N/Avalidloginshell(char *sh, char *arg, int priv)
2N/A{
2N/A disaster();
2N/A return (0);
2N/A}
2N/A
2N/A#pragma weak validstr
2N/Aint
2N/Avalidstr(char *str, size_t size)
2N/A{
2N/A disaster();
2N/A return (0);
2N/A}