bonic: libc: cpuacct support for setuid functions

Any of the setuid functions now updates /acct/uid/ with its own tid
before changing users. This is so we can properly account for cpu time
per uid.

Change-Id: I34186cf4d5228cac8439e582a9e26c01ef3011e4
Signed-off-by: Mike Chan <mike@android.com>
This commit is contained in:
Mike Chan
2010-03-02 10:55:58 -08:00
parent bd9a90c443
commit 9f6915631b
21 changed files with 219 additions and 43 deletions

View File

@@ -1,23 +0,0 @@
/* autogenerated by gensyscalls.py */
#include <sys/linux-syscalls.h>
.text
.type setuid, @function
.globl setuid
.align 4
setuid:
pushl %ebx
mov 8(%esp), %ebx
movl $__NR_setuid32, %eax
int $0x80
cmpl $-129, %eax
jb 1f
negl %eax
pushl %eax
call __set_errno
addl $4, %esp
orl $-1, %eax
1:
popl %ebx
ret