blob: db6f332e46fcbcb11b6e055f790dd68fb813db76 [file] [log] [blame]
subrata_modak493f24f2009-10-15 14:30:34 +00001/*
2 *
3 * Copyright (c) Red Hat Inc., 2008
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program 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
13 * the GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
Wanlong Gao4548c6c2012-10-19 18:03:36 +080017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
subrata_modak493f24f2009-10-15 14:30:34 +000018 */
19
20/* Author: Masatake YAMATO <yamato@redhat.com> */
21
22#ifndef __GETUID_COMPAT_16_H__
23#define __GETUID_COMPAT_16_H__
24
25
26#include "linux_syscall_numbers.h"
27#include "compat_uid.h"
28
29
30#ifdef TST_USE_COMPAT16_SYSCALL
31
32UID_T
33GETUID(void)
34{
Jan Stancek359980f2013-02-15 10:16:05 +010035 return ltp_syscall(__NR_getuid);
subrata_modak493f24f2009-10-15 14:30:34 +000036}
37
38UID_T
39GETEUID(void)
40{
Jan Stancek359980f2013-02-15 10:16:05 +010041 return ltp_syscall(__NR_geteuid);
subrata_modak493f24f2009-10-15 14:30:34 +000042}
43
44#else
45
46UID_T
47GETUID(void)
48{
49 return getuid();
50}
51
52UID_T
53GETEUID(void)
54{
55 return geteuid();
56}
57
58#endif
59
60#endif /* __GETUID_COMPAT_16_H__ */