/* $NetBSD: fullname.c,v 1.11 2003/08/07 16:44:21 agc Exp $ */ /* * Copyright (c) 1981, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #include #ifndef lint #if 0 static char sccsid[] = "@(#)fullname.c 8.1 (Berkeley) 6/4/93"; #else __RCSID("$NetBSD: fullname.c,v 1.11 2003/08/07 16:44:21 agc Exp $"); #endif #endif /* not lint */ #include "curses.h" /* * fullname -- * This routine fills in "def" with the full name of the terminal. * This is assumed to be the last name in the list of aliases. */ char * fullname(const char *bp, char *def) { char *cp; *def = '\0'; /* In case no name. */ while (*bp && *bp != ':') { cp = def; /* Start of answer. */ while (*bp && *bp != ':' && *bp != '|') *cp++ = *bp++; /* Copy name over. */ *cp = '\0'; /* Zero end of name. */ if (*bp == '|') bp++; /* Skip over '|' if that is case. */ } return (def); } /suser
AgeCommit message (Expand)Author
2017-06-14Make the PMC syscalls privileged.maxv
2015-08-17Add kernel code to support intrctl(8).knakahara
2014-02-25Ensure that the top level sysctl nodes (kern, vfs, net, ...) exist beforepooka
2012-11-13kill some -Wunused-but-set-variable warningspooka
2012-03-13Replace the remaining KAUTH_GENERIC_ISSUSER authorization calls withelad
2012-01-17fix secmodel implementation of CPU_UCODE.cegger
2012-01-13Support CPU microcode loading via cpuctl(8).cegger
2011-12-04Implement the register/deregister/evaluation API for secmodel(9). Itjym
2011-11-23Load entropy at system boot (only works at securelevel < 1); savetls
2009-12-29Use the socket credentials, now that we have them, instead of uidinfo.elad
2009-12-24Rename KAUTH_GENERIC_CANSEE to KAUTH_GENERIC_UNUSED1 and remove handling forelad
2009-11-18Fixed security.models.suser.curtain to deny when uid does not match.stacktic
2009-11-14- Move kauth_init() a little bit higher.elad
2009-10-07Extract usermount policy to its own routine.elad
2009-10-06Add a (weak aliased) machdep_init() as a place to do machdep initializationelad
2009-10-06Allow root to do things that the subsystem allows as well (unify).elad
2009-10-05- Add usermount_common_policy() that implements some common (everythingelad
2009-10-03Move KAUTH_NETWORK_BIND::KAUTH_REQ_NETWORK_BIND_PORT policy back to theelad
2009-10-03Move policies for KAUTH_PROCESS_{CANSEE,CORENAME,STOPFLAG,FORK} back toelad
2009-10-03One less include.elad
2009-10-03Make this file a little bit smaller by collapsing cases.elad
2009-10-03Move clockctl policy exception back to the subsystem.elad
2009-10-03secmodel_bsd44_curtain -> secmodel_suser_curtain (static).elad
2009-10-03Move default network interface policy back to the subsystem.elad
2009-10-03Finish moving socket policy to the subsystem.elad
2009-10-03Move sched policy back to the subsystem.elad
2009-10-03Move firewall/NAT policy back to respective subsystems (pf, ipf).elad
2009-10-03Move kevent policy back to the subsystem.elad
2009-10-03Put module loading policy back in the subsystem.elad
2009-10-02Put the tty opening policy back in the subsystem.elad
2009-10-02Move some of the socket policy back to the subsystem.elad
2009-10-02Put signal delivery policy back in the subsystem.elad
2009-10-02Remove includes we don't need.elad
2009-10-02Move routing socket security policy back to the subsystem.elad
2009-10-02- Squeeze function declarations where possible,elad
2009-10-02Put procfs policy back in the subsystem.elad
2009-10-02Stick nice policy in its own subsystem and call the listener "resource"elad
2009-10-02Move rlimit policy back to the subsystem.elad
2009-10-02Move ptrace's security policy back to the subsystem itself.elad
2009-10-02Let the ipkdb subsystem allow operations related to it rather than wronglyelad
2009-10-02Move psets security policy back to the subsystem and keep suser logic onlyelad
2009-10-02Move ktrace's subsystem security policy to the subsystem itself, and keepelad
2009-10-02First part of secmodel cleanup and other misc. changes:elad