Path: blob/main/crypto/heimdal/appl/login/login_locl.h
96309 views
/*1* Copyright (c) 1997 - 2005 Kungliga Tekniska Högskolan2* (Royal Institute of Technology, Stockholm, Sweden).3* All rights reserved.4*5* Redistribution and use in source and binary forms, with or without6* modification, are permitted provided that the following conditions7* are met:8*9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11*12* 2. Redistributions in binary form must reproduce the above copyright13* notice, this list of conditions and the following disclaimer in the14* documentation and/or other materials provided with the distribution.15*16* 3. Neither the name of the Institute nor the names of its contributors17* may be used to endorse or promote products derived from this software18* without specific prior written permission.19*20* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND21* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE22* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE23* ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE24* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL25* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS26* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)27* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT28* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY29* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF30* SUCH DAMAGE.31*/3233/* $Id$ */3435#ifndef __LOGIN_LOCL_H__36#define __LOGIN_LOCL_H__3738#ifdef HAVE_CONFIG_H39#include <config.h>40#endif41#include <stdio.h>42#include <stdlib.h>43#include <string.h>44#include <ctype.h>45#include <unistd.h>46#include <syslog.h>47#include <signal.h>48#include <termios.h>49#include <err.h>50#include <pwd.h>51#include <roken.h>52#include <getarg.h>53#ifdef HAVE_NETDB_H54#include <netdb.h>55#endif56#ifdef HAVE_PATHS_H57#include <paths.h>58#endif59#ifdef HAVE_UTMP_H60#include <utmp.h>61#endif62#ifdef HAVE_UTMPX_H63#include <utmpx.h>64#endif65#ifdef HAVE_UDB_H66#include <udb.h>67#endif68#ifdef HAVE_SYS_RESOURCE_H69#include <sys/resource.h>70#endif71#ifdef HAVE_SYS_CATEGORY_H72#include <sys/category.h>73#endif74#ifdef HAVE_SYS_WAIT_H75#include <sys/wait.h>76#endif77#ifdef HAVE_SHADOW_H78#include <shadow.h>79#endif80#ifdef HAVE_NETGROUP_H81#include <netgroup.h>82#endif83#ifdef HAVE_RPCSVC_YPCLNT_H84#include <rpcsvc/ypclnt.h>85#endif86#ifdef KRB587#include <krb5.h>88#endif89#include <kafs.h>9091#ifdef OTP92#include <otp.h>93#endif9495#ifdef HAVE_OSFC296#define getargs OSFgetargs97#include "/usr/include/prot.h"98#undef getargs99#endif100101#ifndef _PATH_BSHELL102#define _PATH_BSHELL "/bin/sh"103#endif104#ifndef _PATH_TTY105#define _PATH_TTY "/dev/tty"106#endif107#ifndef _PATH_DEV108#define _PATH_DEV "/dev/"109#endif110#ifndef _PATH_WTMP111#ifdef WTMP_FILE112#define _PATH_WTMP WTMP_FILE113#else114#define _PATH_WTMP "/var/adm/wtmp"115#endif116#endif117#ifndef _PATH_UTMP118#ifdef UTMP_FILE119#define _PATH_UTMP UTMP_FILE120#else121#define _PATH_UTMP "/var/adm/utmp"122#endif123#endif124125/* if cygwin doesnt have WTMPX_FILE, it uses wtmp for wtmpx126* http://www.cygwin.com/ml/cygwin/2006-12/msg00630.html */127#ifdef __CYGWIN__128#ifndef WTMPX_FILE129#define WTMPX_FILE WTMP_FILE130#endif131#endif132133#ifndef _PATH_LOGACCESS134#define _PATH_LOGACCESS SYSCONFDIR "/login.access"135#endif /* _PATH_LOGACCESS */136137#ifndef _PATH_LOGIN_CONF138#define _PATH_LOGIN_CONF SYSCONFDIR "/login.conf"139#endif /* _PATH_LOGIN_CONF */140141#ifndef _PATH_DEFPATH142#define _PATH_DEFPATH "/usr/bin:/bin"143#endif144145#include "loginpaths.h"146147struct spwd;148149extern char **env;150extern int num_env;151152#include "login-protos.h"153154#endif /* __LOGIN_LOCL_H__ */155156157