From patchwork Mon Mar 27 14:47:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 96077 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp1261683qgd; Mon, 27 Mar 2017 07:48:50 -0700 (PDT) X-Received: by 10.99.141.67 with SMTP id z64mr5963381pgd.118.1490626130170; Mon, 27 Mar 2017 07:48:50 -0700 (PDT) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id m23si894397plk.130.2017.03.27.07.48.49 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Mar 2017 07:48:50 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-78261-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-78261-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-78261-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=wJksBxe7uzgNkVAfx+sJ5d2YiSi/+E3Yht7F5CDrTIUlM04usvmo1 KdJ0wMb9o5inFNWfKyTC84Kdw7r9WtZNlQWucyu7r01BrGpnTM7xsjjnTzDjWgqR NpFTDxsI+ZG0Z27QG+D0xmVGYrSO8rf5gL/FBT34Ua1d/cod/Mhpuk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; s=default; bh=6MoEqn7GXbDUIXJKsVNc5+n+uHE=; b=TMpfp/OwVtVIlavBCtXmTgr35vCa c02wQp/DJ9GkuDDMUpqKyB6m4nToQnZGh2buhpNFh8r749r1E6Gv2NCpiE+KsgFb bJSm3W+gGw98FI6/x1SCwjpBx3jB/Jjdjk7eU0WK+w+l2e9GqcLItcZpg/Ksqoiu aptq+UGVqYfON78= Received: (qmail 111069 invoked by alias); 27 Mar 2017 14:48:28 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 110865 invoked by uid 89); 27 Mar 2017 14:48:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=ham version=3.3.2 spammy=gid, euid, 137 X-HELO: mail-qk0-f169.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=K24wTOaIY1fQudRcM6ADnNghILEiyvBj9Kzfy8UNS50=; b=GlE6oxCDIruRsEp15iCLpZCNsKlNTQ88GbANh/UNKjFwKvrppSyQgc5kRNOpHnFtc5 X2bLnZS3syx1SesZQOnzqSKladVt1ReIiJDi+K8IkF5Ec3DYgzlSIvY8E+kZZq1dJHbZ SFB1kSEeSetAHR897OCuWE9OvU0V/25fTykZkW7N8SkJQDCYrkovjNMFRhXR60nYD03q zDZ1N5cbJk/O6vLyoew3j3l6vcsl3J5PZStmcU8uGDTqY38Ot3OacapJ9mzaTT7qVNtZ Vai06I6B4arEnmp+iaTBim3F0ULhIBHlnvOltlWEigtw/fB420NWRezRzduO211VyCEa Qh1w== X-Gm-Message-State: AFeK/H08S+htfbY3vgmcTQBlsig27C2bJFnsQPB+mjJTrAX6Oom3e6DSszg2x//KAajsX5nf X-Received: by 10.55.68.66 with SMTP id r63mr19867740qka.116.1490626080622; Mon, 27 Mar 2017 07:48:00 -0700 (PDT) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH] Consolidate set* Linux implementation Date: Mon, 27 Mar 2017 11:47:53 -0300 Message-Id: <1490626073-29171-1-git-send-email-adhemerval.zanella@linaro.org> This patch consolidates the Linux setegid, seteuid, setgid, setgroups, setregid, setresgid, setresuid, setreuid, and setuid implementation on default sysdeps/unix/sysv/linux/sh/set*.c implementation. It basically removes all the architecture define implementations and add support for __NR_set*32 syscall on Linux default implementation. Checked on i686-linux-gnu, x86_64-linux-gnu, x86_64-linux-gnux32, aarch64-linux-gnu, arm-linux-gnueabihf, and powerpc64le-linux-gnu. * sysdeps/unix/sysv/linux/arm/setegid.c: Remove file. * sysdeps/unix/sysv/linux/arm/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/arm/setgid.c: Likewise. * sysdeps/unix/sysv/linux/arm/setgroups.c: Likewise. * sysdeps/unix/sysv/linux/arm/setregid.c: Likewise. * sysdeps/unix/sysv/linux/arm/setresgid.c: Likewise. * sysdeps/unix/sysv/linux/arm/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/arm/setreuid.c: Likewise. * sysdeps/unix/sysv/linux/arm/setuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setegid.c: Likewise. * sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setgroups.c: Likewise. * sysdeps/unix/sysv/linux/i386/setregid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/setegid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/setgid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/setgroups.c: Likewise. * sysdeps/unix/sysv/linux/m68k/setregid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/setresgid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/setreuid.c: Likewise. * sysdeps/unix/sysv/linux/m68k/setuid.c: Likewise. * sysdeps/unix/sysv/linux/microblaze/setgroups.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/setegid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/setgid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/setgroups.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/setregid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/setresgid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/setreuid.c: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/setuid.c: Likewise. * sysdeps/unix/sysv/linux/sh/setegid.c: Likewise. * sysdeps/unix/sysv/linux/sh/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/sh/setgid.c: Likewise. * sysdeps/unix/sysv/linux/sh/setgroups.c: Likewise. * sysdeps/unix/sysv/linux/sh/setregid.c: Likewise. * sysdeps/unix/sysv/linux/sh/setresgid.c: Likewise. * sysdeps/unix/sysv/linux/sh/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/sh/setreuid.c: Likewise. * sysdeps/unix/sysv/linux/sh/setuid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setgid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setgroups.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setregid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setreuid.c: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/setuid.c: Likewise. * sysdeps/unix/sysv/linux/setegid.c (setegid): Use INLINE_SYSCALL_ERROR_RETURN_VALUE. * sysdeps/unix/sysv/linux/seteuid.c (seteuid): Likewise. * sysdeps/unix/sysv/linux/setgid.c (setgid): Use __NR_setgid32 if defined. * sysdeps/unix/sysv/linux/setgroups.c (setgroups): Use __NR_setgroups32 if defined. * sysdeps/unix/sysv/linux/setregid.c (__setregid): Use __NR_setregid32 if defined. * sysdeps/unix/sysv/linux/setresgid.c (__setresgid): Use __NR_setresgid32 is defined. * sysdeps/unix/sysv/linux/setresuid.c (__setresuid): Use __NR_setresuid32 if defined. * sysdeps/unix/sysv/linux/setreuid.c (__setreuid): Use __NR_setreuid32 if defined. * sysdeps/unix/sysv/linux/setuid.c (__setuid): Use __NR_setuid32 if defined. --- ChangeLog | 147 ++++++++++++++++++++++ sysdeps/unix/sysv/linux/arm/setegid.c | 1 - sysdeps/unix/sysv/linux/arm/seteuid.c | 1 - sysdeps/unix/sysv/linux/arm/setgid.c | 1 - sysdeps/unix/sysv/linux/arm/setgroups.c | 2 - sysdeps/unix/sysv/linux/arm/setregid.c | 1 - sysdeps/unix/sysv/linux/arm/setresgid.c | 1 - sysdeps/unix/sysv/linux/arm/setresuid.c | 1 - sysdeps/unix/sysv/linux/arm/setreuid.c | 1 - sysdeps/unix/sysv/linux/arm/setuid.c | 1 - sysdeps/unix/sysv/linux/i386/setegid.c | 35 ------ sysdeps/unix/sysv/linux/i386/seteuid.c | 35 ------ sysdeps/unix/sysv/linux/i386/setgid.c | 34 ----- sysdeps/unix/sysv/linux/i386/setgroups.c | 37 ------ sysdeps/unix/sysv/linux/i386/setregid.c | 34 ----- sysdeps/unix/sysv/linux/i386/setresgid.c | 36 ------ sysdeps/unix/sysv/linux/i386/setresuid.c | 36 ------ sysdeps/unix/sysv/linux/i386/setreuid.c | 35 ------ sysdeps/unix/sysv/linux/i386/setuid.c | 35 ------ sysdeps/unix/sysv/linux/m68k/setegid.c | 1 - sysdeps/unix/sysv/linux/m68k/seteuid.c | 1 - sysdeps/unix/sysv/linux/m68k/setgid.c | 1 - sysdeps/unix/sysv/linux/m68k/setgroups.c | 2 - sysdeps/unix/sysv/linux/m68k/setregid.c | 1 - sysdeps/unix/sysv/linux/m68k/setresgid.c | 1 - sysdeps/unix/sysv/linux/m68k/setresuid.c | 1 - sysdeps/unix/sysv/linux/m68k/setreuid.c | 1 - sysdeps/unix/sysv/linux/m68k/setuid.c | 1 - sysdeps/unix/sysv/linux/microblaze/setgroups.c | 1 - sysdeps/unix/sysv/linux/s390/s390-32/setegid.c | 1 - sysdeps/unix/sysv/linux/s390/s390-32/seteuid.c | 1 - sysdeps/unix/sysv/linux/s390/s390-32/setgid.c | 1 - sysdeps/unix/sysv/linux/s390/s390-32/setgroups.c | 2 - sysdeps/unix/sysv/linux/s390/s390-32/setregid.c | 1 - sysdeps/unix/sysv/linux/s390/s390-32/setresgid.c | 1 - sysdeps/unix/sysv/linux/s390/s390-32/setresuid.c | 1 - sysdeps/unix/sysv/linux/s390/s390-32/setreuid.c | 1 - sysdeps/unix/sysv/linux/s390/s390-32/setuid.c | 2 - sysdeps/unix/sysv/linux/setegid.c | 5 +- sysdeps/unix/sysv/linux/seteuid.c | 5 +- sysdeps/unix/sysv/linux/setgid.c | 4 + sysdeps/unix/sysv/linux/setgroups.c | 5 +- sysdeps/unix/sysv/linux/setregid.c | 4 + sysdeps/unix/sysv/linux/setresgid.c | 4 + sysdeps/unix/sysv/linux/setresuid.c | 4 + sysdeps/unix/sysv/linux/setreuid.c | 4 + sysdeps/unix/sysv/linux/setuid.c | 4 + sysdeps/unix/sysv/linux/sh/setegid.c | 1 - sysdeps/unix/sysv/linux/sh/seteuid.c | 1 - sysdeps/unix/sysv/linux/sh/setgid.c | 1 - sysdeps/unix/sysv/linux/sh/setgroups.c | 2 - sysdeps/unix/sysv/linux/sh/setregid.c | 1 - sysdeps/unix/sysv/linux/sh/setresgid.c | 1 - sysdeps/unix/sysv/linux/sh/setresuid.c | 1 - sysdeps/unix/sysv/linux/sh/setreuid.c | 1 - sysdeps/unix/sysv/linux/sh/setuid.c | 1 - sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c | 1 - sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c | 1 - sysdeps/unix/sysv/linux/sparc/sparc32/setgid.c | 1 - sysdeps/unix/sysv/linux/sparc/sparc32/setgroups.c | 2 - sysdeps/unix/sysv/linux/sparc/sparc32/setregid.c | 1 - sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c | 1 - sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c | 1 - sysdeps/unix/sysv/linux/sparc/sparc32/setreuid.c | 1 - sysdeps/unix/sysv/linux/sparc/sparc32/setuid.c | 1 - 65 files changed, 176 insertions(+), 379 deletions(-) delete mode 100644 sysdeps/unix/sysv/linux/arm/setegid.c delete mode 100644 sysdeps/unix/sysv/linux/arm/seteuid.c delete mode 100644 sysdeps/unix/sysv/linux/arm/setgid.c delete mode 100644 sysdeps/unix/sysv/linux/arm/setgroups.c delete mode 100644 sysdeps/unix/sysv/linux/arm/setregid.c delete mode 100644 sysdeps/unix/sysv/linux/arm/setresgid.c delete mode 100644 sysdeps/unix/sysv/linux/arm/setresuid.c delete mode 100644 sysdeps/unix/sysv/linux/arm/setreuid.c delete mode 100644 sysdeps/unix/sysv/linux/arm/setuid.c delete mode 100644 sysdeps/unix/sysv/linux/i386/setegid.c delete mode 100644 sysdeps/unix/sysv/linux/i386/seteuid.c delete mode 100644 sysdeps/unix/sysv/linux/i386/setgid.c delete mode 100644 sysdeps/unix/sysv/linux/i386/setgroups.c delete mode 100644 sysdeps/unix/sysv/linux/i386/setregid.c delete mode 100644 sysdeps/unix/sysv/linux/i386/setresgid.c delete mode 100644 sysdeps/unix/sysv/linux/i386/setresuid.c delete mode 100644 sysdeps/unix/sysv/linux/i386/setreuid.c delete mode 100644 sysdeps/unix/sysv/linux/i386/setuid.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/setegid.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/seteuid.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/setgid.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/setgroups.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/setregid.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/setresgid.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/setresuid.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/setreuid.c delete mode 100644 sysdeps/unix/sysv/linux/m68k/setuid.c delete mode 100644 sysdeps/unix/sysv/linux/microblaze/setgroups.c delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/setegid.c delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/seteuid.c delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/setgid.c delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/setgroups.c delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/setregid.c delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/setresgid.c delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/setresuid.c delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/setreuid.c delete mode 100644 sysdeps/unix/sysv/linux/s390/s390-32/setuid.c delete mode 100644 sysdeps/unix/sysv/linux/sh/setegid.c delete mode 100644 sysdeps/unix/sysv/linux/sh/seteuid.c delete mode 100644 sysdeps/unix/sysv/linux/sh/setgid.c delete mode 100644 sysdeps/unix/sysv/linux/sh/setgroups.c delete mode 100644 sysdeps/unix/sysv/linux/sh/setregid.c delete mode 100644 sysdeps/unix/sysv/linux/sh/setresgid.c delete mode 100644 sysdeps/unix/sysv/linux/sh/setresuid.c delete mode 100644 sysdeps/unix/sysv/linux/sh/setreuid.c delete mode 100644 sysdeps/unix/sysv/linux/sh/setuid.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/setgid.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/setgroups.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/setregid.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/setreuid.c delete mode 100644 sysdeps/unix/sysv/linux/sparc/sparc32/setuid.c -- 2.7.4 diff --git a/ChangeLog b/ChangeLog index a48150a..0470b65 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,150 @@ +2017-03-27 Adhemerval Zanella + + * sysdeps/unix/sysv/linux/arm/setegid.c: Remove file. + * sysdeps/unix/sysv/linux/arm/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/arm/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/arm/setgroups.c: Likewise. + * sysdeps/unix/sysv/linux/arm/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/arm/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/arm/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/arm/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/arm/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setgroups.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setgroups.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/microblaze/setgroups.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setgroups.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setgroups.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setgroups.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/setegid.c (setegid): Use + INLINE_SYSCALL_ERROR_RETURN_VALUE. + * sysdeps/unix/sysv/linux/seteuid.c (seteuid): Likewise. + * sysdeps/unix/sysv/linux/setgid.c (setgid): Use __NR_setgid32 if + defined. + * sysdeps/unix/sysv/linux/setgroups.c (setgroups): Use + __NR_setgroups32 if defined. + * sysdeps/unix/sysv/linux/setregid.c (__setregid): Use __NR_setregid32 + if defined. + * sysdeps/unix/sysv/linux/setresgid.c (__setresgid): Use + __NR_setresgid32 is defined. + * sysdeps/unix/sysv/linux/setresuid.c (__setresuid): Use + __NR_setresuid32 if defined. + * sysdeps/unix/sysv/linux/setreuid.c (__setreuid): Use + __NR_setreuid32 if defined. + * sysdeps/unix/sysv/linux/setuid.c (__setuid): Use __NR_setuid32 if + defined. + * sysdeps/unix/sysv/linux/arm/setegid.c: Remove file. + * sysdeps/unix/sysv/linux/arm/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/arm/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/arm/setgroups.c: Likewise. + * sysdeps/unix/sysv/linux/arm/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/arm/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/arm/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/arm/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/arm/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setgroups.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/i386/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setgroups.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/m68k/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/microblaze/setgroups.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setgroups.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/s390/s390-32/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setgroups.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/sh/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setgid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setgroups.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setregid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setreuid.c: Likewise. + * sysdeps/unix/sysv/linux/sparc/sparc32/setuid.c: Likewise. + * sysdeps/unix/sysv/linux/setegid.c (setegid): Use + INLINE_SYSCALL_ERROR_RETURN_VALUE. + * sysdeps/unix/sysv/linux/seteuid.c (seteuid): Likewise. + * sysdeps/unix/sysv/linux/setgid.c (setgid): Use __NR_setgid32 if + defined. + * sysdeps/unix/sysv/linux/setgroups.c (setgroups): Use + __NR_setgroups32 if defined. + * sysdeps/unix/sysv/linux/setregid.c (__setregid): Use __NR_setregid32 + if defined. + * sysdeps/unix/sysv/linux/setresgid.c (__setresgid): Use + __NR_setresgid32 is defined. + * sysdeps/unix/sysv/linux/setresuid.c (__setresuid): Use + __NR_setresuid32 if defined. + * sysdeps/unix/sysv/linux/setreuid.c (__setreuid): Use + __NR_setreuid32 if defined. + * sysdeps/unix/sysv/linux/setuid.c (__setuid): Use __NR_setuid32 if + defined. + 2017-03-27 Szabolcs Nagy * sysdeps/aarch64/libm-test-ulps: Update. diff --git a/sysdeps/unix/sysv/linux/arm/setegid.c b/sysdeps/unix/sysv/linux/arm/setegid.c deleted file mode 100644 index 2e3a54c..0000000 --- a/sysdeps/unix/sysv/linux/arm/setegid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/seteuid.c b/sysdeps/unix/sysv/linux/arm/seteuid.c deleted file mode 100644 index 18e41d0..0000000 --- a/sysdeps/unix/sysv/linux/arm/seteuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/setgid.c b/sysdeps/unix/sysv/linux/arm/setgid.c deleted file mode 100644 index 377021d..0000000 --- a/sysdeps/unix/sysv/linux/arm/setgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/setgroups.c b/sysdeps/unix/sysv/linux/arm/setgroups.c deleted file mode 100644 index 0e70862..0000000 --- a/sysdeps/unix/sysv/linux/arm/setgroups.c +++ /dev/null @@ -1,2 +0,0 @@ -/* We also have to rewrite the kernel gid_t to the user land type. */ -#include diff --git a/sysdeps/unix/sysv/linux/arm/setregid.c b/sysdeps/unix/sysv/linux/arm/setregid.c deleted file mode 100644 index 99c57ad..0000000 --- a/sysdeps/unix/sysv/linux/arm/setregid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/setresgid.c b/sysdeps/unix/sysv/linux/arm/setresgid.c deleted file mode 100644 index daca1a4..0000000 --- a/sysdeps/unix/sysv/linux/arm/setresgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/setresuid.c b/sysdeps/unix/sysv/linux/arm/setresuid.c deleted file mode 100644 index 3aeabe9..0000000 --- a/sysdeps/unix/sysv/linux/arm/setresuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/setreuid.c b/sysdeps/unix/sysv/linux/arm/setreuid.c deleted file mode 100644 index 8ad6122..0000000 --- a/sysdeps/unix/sysv/linux/arm/setreuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/arm/setuid.c b/sysdeps/unix/sysv/linux/arm/setuid.c deleted file mode 100644 index de39437..0000000 --- a/sysdeps/unix/sysv/linux/arm/setuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/i386/setegid.c b/sysdeps/unix/sysv/linux/i386/setegid.c deleted file mode 100644 index 5a009e7..0000000 --- a/sysdeps/unix/sysv/linux/i386/setegid.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1995-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -int -setegid (gid_t gid) -{ - int result; - - if (gid == (gid_t) ~0) - return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL); - - result = INLINE_SETXID_SYSCALL (setresgid32, 3, -1, gid, -1); - - return result; -} -libc_hidden_def (setegid) diff --git a/sysdeps/unix/sysv/linux/i386/seteuid.c b/sysdeps/unix/sysv/linux/i386/seteuid.c deleted file mode 100644 index 7f5b84c..0000000 --- a/sysdeps/unix/sysv/linux/i386/seteuid.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1998-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include - - -int -seteuid (uid_t uid) -{ - int result; - - if (uid == (uid_t) ~0) - return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL); - - result = INLINE_SETXID_SYSCALL (setresuid32, 3, -1, uid, -1); - - return result; -} -libc_hidden_def (seteuid) diff --git a/sysdeps/unix/sysv/linux/i386/setgid.c b/sysdeps/unix/sysv/linux/i386/setgid.c deleted file mode 100644 index 9b58e7b..0000000 --- a/sysdeps/unix/sysv/linux/i386/setgid.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1998-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include -#include - -int -__setgid (gid_t gid) -{ - int result; - - result = INLINE_SETXID_SYSCALL (setgid32, 1, gid); - - return result; -} -#ifndef __setgid -weak_alias (__setgid, setgid) -#endif diff --git a/sysdeps/unix/sysv/linux/i386/setgroups.c b/sysdeps/unix/sysv/linux/i386/setgroups.c deleted file mode 100644 index 13ab4fd..0000000 --- a/sysdeps/unix/sysv/linux/i386/setgroups.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Copyright (C) 1997-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include -#include - -#include -#include - -#include -#include - -/* Set the group set for the current user to GROUPS (N of them). For - Linux we must convert the array of groups into the format that the - kernel expects. */ -int -setgroups (size_t n, const gid_t *groups) -{ - return INLINE_SETXID_SYSCALL (setgroups32, 2, n, groups); -} -libc_hidden_def (setgroups) diff --git a/sysdeps/unix/sysv/linux/i386/setregid.c b/sysdeps/unix/sysv/linux/i386/setregid.c deleted file mode 100644 index 3314f55..0000000 --- a/sysdeps/unix/sysv/linux/i386/setregid.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 1998-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include -#include - -int -__setregid (gid_t rgid, gid_t egid) -{ - int result; - - result = INLINE_SETXID_SYSCALL (setregid32, 2, rgid, egid); - - return result; -} -#ifndef __setregid -weak_alias (__setregid, setregid) -#endif diff --git a/sysdeps/unix/sysv/linux/i386/setresgid.c b/sysdeps/unix/sysv/linux/i386/setresgid.c deleted file mode 100644 index 45d6769..0000000 --- a/sysdeps/unix/sysv/linux/i386/setresgid.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 1998-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include -#include - - -int -__setresgid (gid_t rgid, gid_t egid, gid_t sgid) -{ - int result; - - result = INLINE_SETXID_SYSCALL (setresgid32, 3, rgid, egid, sgid); - - return result; -} -libc_hidden_def (__setresgid) -#ifndef __setresgid -weak_alias (__setresgid, setresgid) -#endif diff --git a/sysdeps/unix/sysv/linux/i386/setresuid.c b/sysdeps/unix/sysv/linux/i386/setresuid.c deleted file mode 100644 index 94a117e..0000000 --- a/sysdeps/unix/sysv/linux/i386/setresuid.c +++ /dev/null @@ -1,36 +0,0 @@ -/* Copyright (C) 1998-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include -#include - - -int -__setresuid (uid_t ruid, uid_t euid, uid_t suid) -{ - int result; - - result = INLINE_SETXID_SYSCALL (setresuid32, 3, ruid, euid, suid); - - return result; -} -libc_hidden_def (__setresuid) -#ifndef __setresuid -weak_alias (__setresuid, setresuid) -#endif diff --git a/sysdeps/unix/sysv/linux/i386/setreuid.c b/sysdeps/unix/sysv/linux/i386/setreuid.c deleted file mode 100644 index ad18330..0000000 --- a/sysdeps/unix/sysv/linux/i386/setreuid.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1998-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include -#include - - -int -__setreuid (uid_t ruid, uid_t euid) -{ - int result; - - result = INLINE_SETXID_SYSCALL (setreuid32, 2, ruid, euid); - - return result; -} -#ifndef __setreuid -weak_alias (__setreuid, setreuid) -#endif diff --git a/sysdeps/unix/sysv/linux/i386/setuid.c b/sysdeps/unix/sysv/linux/i386/setuid.c deleted file mode 100644 index b1fc9aa..0000000 --- a/sysdeps/unix/sysv/linux/i386/setuid.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Copyright (C) 1998-2017 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ - -#include -#include -#include -#include - - -int -__setuid (uid_t uid) -{ - int result; - - result = INLINE_SETXID_SYSCALL (setuid32, 1, uid); - - return result; -} -#ifndef __setuid -weak_alias (__setuid, setuid) -#endif diff --git a/sysdeps/unix/sysv/linux/m68k/setegid.c b/sysdeps/unix/sysv/linux/m68k/setegid.c deleted file mode 100644 index 2e3a54c..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setegid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/m68k/seteuid.c b/sysdeps/unix/sysv/linux/m68k/seteuid.c deleted file mode 100644 index 18e41d0..0000000 --- a/sysdeps/unix/sysv/linux/m68k/seteuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/m68k/setgid.c b/sysdeps/unix/sysv/linux/m68k/setgid.c deleted file mode 100644 index 377021d..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/m68k/setgroups.c b/sysdeps/unix/sysv/linux/m68k/setgroups.c deleted file mode 100644 index 0e70862..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setgroups.c +++ /dev/null @@ -1,2 +0,0 @@ -/* We also have to rewrite the kernel gid_t to the user land type. */ -#include diff --git a/sysdeps/unix/sysv/linux/m68k/setregid.c b/sysdeps/unix/sysv/linux/m68k/setregid.c deleted file mode 100644 index 99c57ad..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setregid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/m68k/setresgid.c b/sysdeps/unix/sysv/linux/m68k/setresgid.c deleted file mode 100644 index daca1a4..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setresgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/m68k/setresuid.c b/sysdeps/unix/sysv/linux/m68k/setresuid.c deleted file mode 100644 index 3aeabe9..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setresuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/m68k/setreuid.c b/sysdeps/unix/sysv/linux/m68k/setreuid.c deleted file mode 100644 index 8ad6122..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setreuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/m68k/setuid.c b/sysdeps/unix/sysv/linux/m68k/setuid.c deleted file mode 100644 index de39437..0000000 --- a/sysdeps/unix/sysv/linux/m68k/setuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/microblaze/setgroups.c b/sysdeps/unix/sysv/linux/microblaze/setgroups.c deleted file mode 100644 index cb9a770..0000000 --- a/sysdeps/unix/sysv/linux/microblaze/setgroups.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/setegid.c b/sysdeps/unix/sysv/linux/s390/s390-32/setegid.c deleted file mode 100644 index 2e3a54c..0000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/setegid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/seteuid.c b/sysdeps/unix/sysv/linux/s390/s390-32/seteuid.c deleted file mode 100644 index 18e41d0..0000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/seteuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/setgid.c b/sysdeps/unix/sysv/linux/s390/s390-32/setgid.c deleted file mode 100644 index 377021d..0000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/setgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/setgroups.c b/sysdeps/unix/sysv/linux/s390/s390-32/setgroups.c deleted file mode 100644 index 0e70862..0000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/setgroups.c +++ /dev/null @@ -1,2 +0,0 @@ -/* We also have to rewrite the kernel gid_t to the user land type. */ -#include diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/setregid.c b/sysdeps/unix/sysv/linux/s390/s390-32/setregid.c deleted file mode 100644 index 99c57ad..0000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/setregid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/setresgid.c b/sysdeps/unix/sysv/linux/s390/s390-32/setresgid.c deleted file mode 100644 index daca1a4..0000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/setresgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/setresuid.c b/sysdeps/unix/sysv/linux/s390/s390-32/setresuid.c deleted file mode 100644 index 3aeabe9..0000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/setresuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/setreuid.c b/sysdeps/unix/sysv/linux/s390/s390-32/setreuid.c deleted file mode 100644 index 8ad6122..0000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/setreuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/setuid.c b/sysdeps/unix/sysv/linux/s390/s390-32/setuid.c deleted file mode 100644 index c8fa23e..0000000 --- a/sysdeps/unix/sysv/linux/s390/s390-32/setuid.c +++ /dev/null @@ -1,2 +0,0 @@ -#include - diff --git a/sysdeps/unix/sysv/linux/setegid.c b/sysdeps/unix/sysv/linux/setegid.c index 62ca4ef..7d08027 100644 --- a/sysdeps/unix/sysv/linux/setegid.c +++ b/sysdeps/unix/sysv/linux/setegid.c @@ -26,10 +26,7 @@ setegid (gid_t gid) int result; if (gid == (gid_t) ~0) - { - __set_errno (EINVAL); - return -1; - } + return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL); #ifdef __NR_setresgid32 result = INLINE_SETXID_SYSCALL (setresgid32, 3, -1, gid, -1); diff --git a/sysdeps/unix/sysv/linux/seteuid.c b/sysdeps/unix/sysv/linux/seteuid.c index 469bc9a..ece0f45 100644 --- a/sysdeps/unix/sysv/linux/seteuid.c +++ b/sysdeps/unix/sysv/linux/seteuid.c @@ -26,10 +26,7 @@ seteuid (uid_t uid) int result; if (uid == (uid_t) ~0) - { - __set_errno (EINVAL); - return -1; - } + return INLINE_SYSCALL_ERROR_RETURN_VALUE (EINVAL); #ifdef __NR_setresuid32 result = INLINE_SETXID_SYSCALL (setresuid32, 3, -1, uid, -1); diff --git a/sysdeps/unix/sysv/linux/setgid.c b/sysdeps/unix/sysv/linux/setgid.c index 401f998..59aaa10 100644 --- a/sysdeps/unix/sysv/linux/setgid.c +++ b/sysdeps/unix/sysv/linux/setgid.c @@ -23,7 +23,11 @@ int __setgid (gid_t gid) { +#ifdef __NR_setgid32 + return INLINE_SETXID_SYSCALL (setgid32, 1, gid); +#else return INLINE_SETXID_SYSCALL (setgid, 1, gid); +#endif } #ifndef __setgid weak_alias (__setgid, setgid) diff --git a/sysdeps/unix/sysv/linux/setgroups.c b/sysdeps/unix/sysv/linux/setgroups.c index 25fad17..c556ebb 100644 --- a/sysdeps/unix/sysv/linux/setgroups.c +++ b/sysdeps/unix/sysv/linux/setgroups.c @@ -28,8 +28,9 @@ int setgroups (size_t n, const gid_t *groups) { #ifdef __NR_setgroups32 -# error "wrong setgroups.c file used" -#endif + return INLINE_SETXID_SYSCALL (setgroups32, 2, n, groups); +#else return INLINE_SETXID_SYSCALL (setgroups, 2, n, groups); +#endif } libc_hidden_def (setgroups) diff --git a/sysdeps/unix/sysv/linux/setregid.c b/sysdeps/unix/sysv/linux/setregid.c index c48e524..b50842b 100644 --- a/sysdeps/unix/sysv/linux/setregid.c +++ b/sysdeps/unix/sysv/linux/setregid.c @@ -23,7 +23,11 @@ int __setregid (gid_t rgid, gid_t egid) { +#ifdef __NR_setregid32 + return INLINE_SETXID_SYSCALL (setregid32, 2, rgid, egid); +#else return INLINE_SETXID_SYSCALL (setregid, 2, rgid, egid); +#endif } #ifndef __setregid weak_alias (__setregid, setregid) diff --git a/sysdeps/unix/sysv/linux/setresgid.c b/sysdeps/unix/sysv/linux/setresgid.c index d3496c2..1e9a9b7 100644 --- a/sysdeps/unix/sysv/linux/setresgid.c +++ b/sysdeps/unix/sysv/linux/setresgid.c @@ -23,7 +23,11 @@ int __setresgid (gid_t rgid, gid_t egid, gid_t sgid) { +#ifdef __NR_setresgid32 + return INLINE_SETXID_SYSCALL (setresgid32, 3, rgid, egid, sgid); +#else return INLINE_SETXID_SYSCALL (setresgid, 3, rgid, egid, sgid); +#endif } libc_hidden_def (__setresgid) #ifndef __setresgid diff --git a/sysdeps/unix/sysv/linux/setresuid.c b/sysdeps/unix/sysv/linux/setresuid.c index 0f582f4..3d3faa9 100644 --- a/sysdeps/unix/sysv/linux/setresuid.c +++ b/sysdeps/unix/sysv/linux/setresuid.c @@ -23,7 +23,11 @@ int __setresuid (uid_t ruid, uid_t euid, uid_t suid) { +#ifdef __NR_setresuid32 + return INLINE_SETXID_SYSCALL (setresuid32, 3, ruid, euid, suid); +#else return INLINE_SETXID_SYSCALL (setresuid, 3, ruid, euid, suid); +#endif } libc_hidden_def (__setresuid) #ifndef __setresuid diff --git a/sysdeps/unix/sysv/linux/setreuid.c b/sysdeps/unix/sysv/linux/setreuid.c index 377f5e5..5cc68ae 100644 --- a/sysdeps/unix/sysv/linux/setreuid.c +++ b/sysdeps/unix/sysv/linux/setreuid.c @@ -23,7 +23,11 @@ int __setreuid (uid_t ruid, uid_t euid) { +#ifdef __NR_setreuid32 + return INLINE_SETXID_SYSCALL (setreuid32, 2, ruid, euid); +#else return INLINE_SETXID_SYSCALL (setreuid, 2, ruid, euid); +#endif } #ifndef __setreuid weak_alias (__setreuid, setreuid) diff --git a/sysdeps/unix/sysv/linux/setuid.c b/sysdeps/unix/sysv/linux/setuid.c index 6308e1a..2d07752 100644 --- a/sysdeps/unix/sysv/linux/setuid.c +++ b/sysdeps/unix/sysv/linux/setuid.c @@ -22,7 +22,11 @@ int __setuid (uid_t uid) { +#ifdef __NR_setuid32 + return INLINE_SETXID_SYSCALL (setuid32, 1, uid); +#else return INLINE_SETXID_SYSCALL (setuid, 1, uid); +#endif } #ifndef __setuid weak_alias (__setuid, setuid) diff --git a/sysdeps/unix/sysv/linux/sh/setegid.c b/sysdeps/unix/sysv/linux/sh/setegid.c deleted file mode 100644 index 2e3a54c..0000000 --- a/sysdeps/unix/sysv/linux/sh/setegid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sh/seteuid.c b/sysdeps/unix/sysv/linux/sh/seteuid.c deleted file mode 100644 index 18e41d0..0000000 --- a/sysdeps/unix/sysv/linux/sh/seteuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sh/setgid.c b/sysdeps/unix/sysv/linux/sh/setgid.c deleted file mode 100644 index 377021d..0000000 --- a/sysdeps/unix/sysv/linux/sh/setgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sh/setgroups.c b/sysdeps/unix/sysv/linux/sh/setgroups.c deleted file mode 100644 index 0e70862..0000000 --- a/sysdeps/unix/sysv/linux/sh/setgroups.c +++ /dev/null @@ -1,2 +0,0 @@ -/* We also have to rewrite the kernel gid_t to the user land type. */ -#include diff --git a/sysdeps/unix/sysv/linux/sh/setregid.c b/sysdeps/unix/sysv/linux/sh/setregid.c deleted file mode 100644 index 99c57ad..0000000 --- a/sysdeps/unix/sysv/linux/sh/setregid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sh/setresgid.c b/sysdeps/unix/sysv/linux/sh/setresgid.c deleted file mode 100644 index daca1a4..0000000 --- a/sysdeps/unix/sysv/linux/sh/setresgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sh/setresuid.c b/sysdeps/unix/sysv/linux/sh/setresuid.c deleted file mode 100644 index 3aeabe9..0000000 --- a/sysdeps/unix/sysv/linux/sh/setresuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sh/setreuid.c b/sysdeps/unix/sysv/linux/sh/setreuid.c deleted file mode 100644 index 8ad6122..0000000 --- a/sysdeps/unix/sysv/linux/sh/setreuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sh/setuid.c b/sysdeps/unix/sysv/linux/sh/setuid.c deleted file mode 100644 index de39437..0000000 --- a/sysdeps/unix/sysv/linux/sh/setuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c b/sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c deleted file mode 100644 index 2e3a54c..0000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/setegid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c b/sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c deleted file mode 100644 index 18e41d0..0000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/seteuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/setgid.c b/sysdeps/unix/sysv/linux/sparc/sparc32/setgid.c deleted file mode 100644 index 377021d..0000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/setgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/setgroups.c b/sysdeps/unix/sysv/linux/sparc/sparc32/setgroups.c deleted file mode 100644 index 0e70862..0000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/setgroups.c +++ /dev/null @@ -1,2 +0,0 @@ -/* We also have to rewrite the kernel gid_t to the user land type. */ -#include diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/setregid.c b/sysdeps/unix/sysv/linux/sparc/sparc32/setregid.c deleted file mode 100644 index 99c57ad..0000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/setregid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c b/sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c deleted file mode 100644 index daca1a4..0000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/setresgid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c b/sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c deleted file mode 100644 index 3aeabe9..0000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/setresuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/setreuid.c b/sysdeps/unix/sysv/linux/sparc/sparc32/setreuid.c deleted file mode 100644 index 8ad6122..0000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/setreuid.c +++ /dev/null @@ -1 +0,0 @@ -#include diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/setuid.c b/sysdeps/unix/sysv/linux/sparc/sparc32/setuid.c deleted file mode 100644 index de39437..0000000 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/setuid.c +++ /dev/null @@ -1 +0,0 @@ -#include