1*b9fc9a72Sderaadt /* $OpenBSD: common_vars.c,v 1.5 2015/01/16 06:40:17 deraadt Exp $ */ 2a7643117Smillert /* $NetBSD: common.c,v 1.15 1999/09/26 10:32:27 mrg Exp $ */ 3a7643117Smillert 4a7643117Smillert /* 5a7643117Smillert * Copyright (c) 1983, 1993 6a7643117Smillert * The Regents of the University of California. All rights reserved. 7a7643117Smillert * (c) UNIX System Laboratories, Inc. 8a7643117Smillert * All or some portions of this file are derived from material licensed 9a7643117Smillert * to the University of California by American Telephone and Telegraph 10a7643117Smillert * Co. or Unix System Laboratories, Inc. and are reproduced herein with 11a7643117Smillert * the permission of UNIX System Laboratories, Inc. 12a7643117Smillert * 13a7643117Smillert * Redistribution and use in source and binary forms, with or without 14a7643117Smillert * modification, are permitted provided that the following conditions 15a7643117Smillert * are met: 16a7643117Smillert * 1. Redistributions of source code must retain the above copyright 17a7643117Smillert * notice, this list of conditions and the following disclaimer. 18a7643117Smillert * 2. Redistributions in binary form must reproduce the above copyright 19a7643117Smillert * notice, this list of conditions and the following disclaimer in the 20a7643117Smillert * documentation and/or other materials provided with the distribution. 2129295d1cSmillert * 3. Neither the name of the University nor the names of its contributors 22a7643117Smillert * may be used to endorse or promote products derived from this software 23a7643117Smillert * without specific prior written permission. 24a7643117Smillert * 25a7643117Smillert * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 26a7643117Smillert * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27a7643117Smillert * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28a7643117Smillert * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 29a7643117Smillert * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30a7643117Smillert * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31a7643117Smillert * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32a7643117Smillert * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33a7643117Smillert * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34a7643117Smillert * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35a7643117Smillert * SUCH DAMAGE. 36a7643117Smillert */ 37a7643117Smillert 38*b9fc9a72Sderaadt #include <sys/types.h> 39*b9fc9a72Sderaadt #include <limits.h> 40a7643117Smillert 41a7643117Smillert #include "pathnames.h" 42a7643117Smillert 43a7643117Smillert char *name; /* program name */ 44a7643117Smillert char *printer; /* printer name */ 45*b9fc9a72Sderaadt char host[HOST_NAME_MAX+1 + 1]; /* host machine name */ 46a7643117Smillert char *from = host; /* client's machine name */ 47a7643117Smillert char *printcapdb[2] = { _PATH_PRINTCAP, 0 }; 48a7643117Smillert char *bp; /* pointer into printcap buffer. */ 49a7643117Smillert u_int wait_time = 300; /* time out after 5 minutes by default */ 506468ba68Smillert uid_t real_uid, effective_uid; 516468ba68Smillert gid_t real_gid, effective_gid; 52