subrata_modak | bf61856 | 2009-10-26 16:02:46 +0000 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * Copyright (c) Red Hat Inc., 2009 |
| 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 Gao | 4548c6c | 2012-10-19 18:03:36 +0800 | [diff] [blame] | 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
subrata_modak | bf61856 | 2009-10-26 16:02:46 +0000 | [diff] [blame] | 18 | */ |
| 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 | |
| 32 | UID_T |
| 33 | GETEUID(void) |
| 34 | { |
Jan Stancek | 359980f | 2013-02-15 10:16:05 +0100 | [diff] [blame^] | 35 | return ltp_syscall(__NR_geteuid); |
subrata_modak | bf61856 | 2009-10-26 16:02:46 +0000 | [diff] [blame] | 36 | } |
| 37 | |
| 38 | #else |
| 39 | |
| 40 | UID_T |
| 41 | GETEUID(void) |
| 42 | { |
| 43 | return geteuid(); |
| 44 | } |
| 45 | |
| 46 | #endif |
| 47 | |
| 48 | #endif /* __GETUID_COMPAT_16_H__ */ |