From: guenther Date: Thu, 13 Apr 2017 04:06:46 +0000 (+0000) Subject: Delete the getlogin59 syscall, which was last used one year, two releases, X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c591d593a5f2f6b2fa0f14a67ce492cccd04432e;p=openbsd Delete the getlogin59 syscall, which was last used one year, two releases, and four libc major versions ago ok sthen@ jsing@ deraadt@ jca@ --- diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 78ae2fa98e8..406fbfee3fa 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.202 2017/04/11 15:55:41 bluhm Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.203 2017/04/13 04:06:46 guenther Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -121,7 +121,6 @@ const uint64_t pledge_syscalls[SYS_MAXSYSCALL] = { [SYS_getegid] = PLEDGE_STDIO, [SYS_getresgid] = PLEDGE_STDIO, [SYS_getgroups] = PLEDGE_STDIO, - [SYS_getlogin59] = PLEDGE_STDIO, [SYS_getlogin_r] = PLEDGE_STDIO, [SYS_getpgrp] = PLEDGE_STDIO, [SYS_getpgid] = PLEDGE_STDIO, diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 7907f0a5830..d3bd45a185c 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_prot.c,v 1.68 2017/04/13 03:52:25 guenther Exp $ */ +/* $OpenBSD: kern_prot.c,v 1.69 2017/04/13 04:06:46 guenther Exp $ */ /* $NetBSD: kern_prot.c,v 1.33 1996/02/09 18:59:42 christos Exp $ */ /* @@ -1000,24 +1000,6 @@ crfromxucred(struct ucred *cr, const struct xucred *xcr) return (0); } -/* - * Get login name, if available. - */ -int -sys_getlogin59(struct proc *p, void *v, register_t *retval) -{ - struct sys_getlogin59_args /* { - syscallarg(char *) namebuf; - syscallarg(u_int) namelen; - } */ *uap = v; - struct session *s = p->p_p->ps_pgrp->pg_session; - - if (SCARG(uap, namelen) > sizeof(s->s_login)) - SCARG(uap, namelen) = sizeof(s->s_login); - return (copyout((caddr_t)s->s_login, - (caddr_t)SCARG(uap, namebuf), SCARG(uap, namelen))); -} - /* * Get login name, if available. */ diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 5f5606bc4f7..0ce9ba5238a 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ -; $OpenBSD: syscalls.master,v 1.174 2016/09/04 17:22:40 jsing Exp $ +; $OpenBSD: syscalls.master,v 1.175 2017/04/13 04:06:46 guenther Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -126,7 +126,7 @@ struct sigaction *osa); } 47 STD NOLOCK { gid_t sys_getgid(void); } 48 STD NOLOCK { int sys_sigprocmask(int how, sigset_t mask); } -49 STD { int sys_getlogin59(char *namebuf, u_int namelen); } +49 OBSOL ogetlogin 50 STD { int sys_setlogin(const char *namebuf); } #ifdef ACCOUNTING 51 STD { int sys_acct(const char *path); }