]> git.ipfire.org Git - thirdparty/glibc.git/blame - io/euidaccess.c
Fix BRE typos in check-safety.sh
[thirdparty/glibc.git] / io / euidaccess.c
CommitLineData
22a1292a 1/* Test for access to FILE using effective UID and GID. Stub version.
581c785b 2 Copyright (C) 1991-2022 Free Software Foundation, Inc.
f166d865 3 This file is part of the GNU C Library.
22a1292a 4
f166d865 5 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
22a1292a 9
f166d865
UD
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 13 Lesser General Public License for more details.
22a1292a 14
41bdb6e2 15 You should have received a copy of the GNU Lesser General Public
59ba27a6 16 License along with the GNU C Library; if not, see
5a82c748 17 <https://www.gnu.org/licenses/>. */
22a1292a
RM
18
19#include <errno.h>
20#include <stddef.h>
21#include <unistd.h>
22
23int
9d46370c 24__euidaccess (const char *file, int type)
22a1292a
RM
25{
26 if (file == NULL || (type & ~(R_OK|W_OK|X_OK|F_OK)) != 0)
27 {
c4029823 28 __set_errno (EINVAL);
22a1292a
RM
29 return -1;
30 }
31
c4029823 32 __set_errno (ENOSYS);
22a1292a
RM
33 return -1;
34}
f166d865 35weak_alias (__euidaccess, euidaccess)
cb483e04 36weak_alias (__euidaccess, eaccess)
22a1292a 37stub_warning (euidaccess)
cb483e04 38stub_warning (eaccess)