History log of /external/strace/uid.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
abfa939f57247c9eaa1e8ab2f110495819a51617 27-Dec-2015 Dmitry V. Levin <ldv@altlinux.org> Do not truncate return value of get{,e}[ug]id and setfs[ug]id syscalls

This should not be a user visible change unless the kernel does
something completely unexpected. In the latter case, let user see
what is going on.

* uid.c (SYS_FUNC(getuid), SYS_FUNC(setfsuid)): Do not truncate
tcp->u_rval to uid_t on exiting syscall, return RVAL_DECODED.
/external/strace/uid.c
38a34c9349267c99ce1ddbd0b6e985147415d355 17-Dec-2015 Dmitry V. Levin <ldv@altlinux.org> Add copyright headers to some files which lack them

Before this change, all files that exist since 20th century had
copyright headers, while most files that appeared later didn't. This
change fixes the inconsistency by adding missing copyright headers.

It doesn't mean that copyright headers became maintained. In my view,
git history provides much better information on this subject and is much
more accurate than copyright headers.
/external/strace/uid.c
14278620c9241e3dcd0f8f24ec704d6d12e7a85a 16-Jul-2015 Dmitry V. Levin <ldv@altlinux.org> uid.c: make use of RVAL_DECODED

* uid.c (sys_setuid, sys_setreuid, sys_setresuid, sys_chown, sys_fchown,
sys_setgroups): Update for RVAL_DECODED.
/external/strace/uid.c
288a87049c335c16bab8a4fb25ed60f2d28fe530 16-Jul-2015 Dmitry V. Levin <ldv@altlinux.org> uid.c: use printaddr and umoven_or_printaddr

* uid.c (get_print_uid): Use umoven_or_printaddr.
(sys_getresuid): Do not check for syserror, get_print_uid now does
the right thing.
(sys_setgroups, sys_getgroups): Add const qualifier to local variables
that are assigned once. Use printaddr.
/external/strace/uid.c
a0bd3749fc6fdf6364c1e269a4c02e8c153eb84b 07-Apr-2015 Dmitry V. Levin <ldv@altlinux.org> Declare syscall parsers using SYS_FUNC macro

Introduce SYS_FUNC macro to declare and define all syscall parsers.

* Makefile.am (BUILT_SOURCES, CLEANFILES): Add sys_func.h.
(sys_func.h): New rule.
* defs.h (SYS_FUNC_NAME, SYS_FUNC): New macros.
* linux/syscall.h: Include "sys_func.h".
[NEED_UID16_PARSERS]: Use SYS_FUNC to declare uid16 syscall parsers.
Remove other declarations.
* linux/alpha/syscallent.h (160, 161): Add sys_ prefix to osf_statfs
and osf_fstatfs syscall parsers.
* *.c: Use SYS_FUNC to define syscall parsers.
/external/strace/uid.c
7e69ed98cdd3c8ee0bba783927bc95b895c60160 21-Mar-2015 Denys Vlasenko <dvlasenk@redhat.com> Change last parameter of umoven() from char* to void*

Saves tons of casts.

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
/external/strace/uid.c
530bed0ca8285188ce6cbc9406e817da0ef4828b 14-Dec-2014 Dmitry V. Levin <ldv@altlinux.org> Fix decoding of getgroups, getgroups32, setgroups, and setgroups32 syscalls

Convert parsers of these syscalls to the same scheme as were applied to
parsers of other uid/gid related syscalls.
That is, define two sets of parsers on architectures that support
(either directly or via multiarch) 16-bit and 32-bit gid getgroups
and setgroups syscalls simultaneously, and reuse essentially the same
code by parametrizing uid_t and names of parser functions.

* groups.c: Remove.
(sys_getgroups, sys_setgroups): Move ...
* uid.c: ... here and parametrize their names.
* Makefile.am (strace_SOURCES): Remove groups.c.
* linux/syscall.h (sys_getgroups32, sys_setgroups32): Remove.
[NEED_UID16_PARSERS] (sys_getgroups16, sys_setgroups16): New prototypes.
* linux/arm/syscallent.h: Rename sys_[gs]etgroups to sys_[gs]etgroups16,
rename sys_[gs]etgroups32 to sys_[gs]etgroups.
* linux/bfin/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* tests/uid.c: Test for getgroups.
* tests/uid16.c: Likewise.
* tests/uid32.c: Test for getgroups32.
* tests/uid.awk: Test for getgroups/getgroups32 decoding.
* tests/uid.test: Trace getgroups/getgroups32 syscalls.
/external/strace/uid.c
80f7db1fedefedb01cd2ce3107dfc264eab50601 13-Dec-2014 Dmitry V. Levin <ldv@altlinux.org> Fix decoding of 16-bit *chown and [gs]et*[gu]id syscalls

Define two sets of parsers on architectures that support (either
directly or via multiarch) 16-bit and 32-bit uid/gid syscalls
simultaneously. Since the code in these two sets is essentially
the same and the key difference between them is the size of uid_t,
implement it by parametrizing uid_t and names of parser functions.

* defs.h (NEED_UID16_PARSERS): New macro.
* linux/syscall.h [NEED_UID16_PARSERS] (sys_chown16, sys_fchown16,
sys_getresuid16, sys_getuid16, sys_setfsuid16, sys_setresuid16,
sys_setreuid16, sys_setuid16): New prototypes.
* linux/dummy.h (sys_geteuid16): Alias to sys_getuid16.
(sys_getegid16, sys_getgid16, sys_getresgid16, sys_setfsgid16,
sys_setgid16, sys_setregid16, sys_setresgid16): Alias to corresponding
sys_*uid16 functions.
* uid.c: Stop including <asm/posix_types.h>.
Parametrize uid_t and names of all exported functions.
(get_print_uid): New function.
(sys_getresuid): Use it.
(printuid): Check for (uid_t) -1.
* uid16.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/arm/syscallent.h: Use sys_chown16, sys_fchown16, sys_getegid16,
sys_geteuid16, sys_getgid16, sys_getresgid16, sys_getresuid16,
sys_getuid16, sys_setfsgid16, sys_setfsuid16, sys_setgid16,
sys_setregid16, sys_setresgid16, sys_setresuid16, sys_setreuid16,
and sys_setuid16 parsers for *chown and [gs]et*[gu]id syscall entries.
* linux/bfin/syscallent.h: Likewise.
* linux/i386/syscallent.h: Likewise.
* linux/m68k/syscallent.h: Likewise.
* linux/microblaze/syscallent.h: Likewise.
* linux/s390/syscallent.h: Likewise.
* linux/sparc/syscallent.h: Likewise.
* linux/sh/syscallent.h: Likewise.
* linux/sh64/syscallent.h: Likewise.
* tests/uid16.c: New file.
* tests/uid16.test: New test.
* tests/Makefile.am (CHECK_PROGRAMS): Add uid16.
(TESTS): Add uid16.test.
* tests/.gitignore: Add uid16.
/external/strace/uid.c
2f7d020e2258b8565c3809cfe2dd76668a1c433d 13-Dec-2014 Dmitry V. Levin <ldv@altlinux.org> chown.c: split into separate files

This will make further uid/gid fixes simpler.

* fchownat.c: New file.
* chown.c (sys_fchownat: Move to fchownat.c.
(sys_chown, sys_fchown): Move to uid.c.
* Makefile.am (strace_SOURCES): Remove chown.c, add fchownat.c.
/external/strace/uid.c
25ebe46ce23d6db0dd2623bcc798d2f6a9bc6163 13-Dec-2014 Dmitry V. Levin <ldv@altlinux.org> util.c: move printuid to uid.c

This will make further uid/gid fixes simpler.

* util.c (printuid): Move
* uid.c: ... here.
/external/strace/uid.c
e93ef1eb9d1aea312273337e0775002921273829 11-Dec-2014 Dmitry V. Levin <ldv@altlinux.org> process.c: move get*uid and set*uid parsers to a separate file

* uid.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* process.c (sys_getuid, sys_setfsuid, sys_setuid, sys_getresuid,
sys_setreuid, sys_setresuid): Move to uid.c.
/external/strace/uid.c