From 27053aa14ba234a0d5e1b4affd272a5c7b01aa1b Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 6 Jan 2009 17:06:30 -0500 Subject: PR9699: build fixes for kernel 2.6.28 --- runtime/ChangeLog | 5 +++++ runtime/autoconf-task-uid.c | 5 +++++ runtime/transport/ChangeLog | 5 +++++ runtime/transport/transport.c | 7 ++++++- 4 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 runtime/autoconf-task-uid.c (limited to 'runtime') diff --git a/runtime/ChangeLog b/runtime/ChangeLog index ca852d53..fad46be1 100644 --- a/runtime/ChangeLog +++ b/runtime/ChangeLog @@ -1,3 +1,8 @@ +2009-01-06 Frank Ch. Eigler + + PR9699. + * autoconf-task-uid.c: New test. + 2008-12-21 Stan Cox * sduprobes.h (STAP_PROBE): Put block around probe point. diff --git a/runtime/autoconf-task-uid.c b/runtime/autoconf-task-uid.c new file mode 100644 index 00000000..5f5a321c --- /dev/null +++ b/runtime/autoconf-task-uid.c @@ -0,0 +1,5 @@ +#include + +struct task_struct *foo; +void bar () { foo->uid = 0; } +/* as opposed to linux/cred.h wrappers current_uid() etc. */ diff --git a/runtime/transport/ChangeLog b/runtime/transport/ChangeLog index c6dfa005..e8e2a047 100644 --- a/runtime/transport/ChangeLog +++ b/runtime/transport/ChangeLog @@ -1,3 +1,8 @@ +2009-01-06 Frank Ch. Eigler + + PR9699. + * transport.c (_stp_transport_init): Adapt to task_struct cred switch. + 2008-11-28 Frank Ch. Eigler PR5947: make code -Wpointer-arith clean diff --git a/runtime/transport/transport.c b/runtime/transport/transport.c index 9f7a25f2..f5ee2c36 100644 --- a/runtime/transport/transport.c +++ b/runtime/transport/transport.c @@ -2,7 +2,7 @@ * transport.c - stp transport functions * * Copyright (C) IBM Corporation, 2005 - * Copyright (C) Red Hat Inc, 2005-2008 + * Copyright (C) Red Hat Inc, 2005-2009 * Copyright (C) Intel Corporation, 2006 * * This file is part of systemtap, and is free software. You can @@ -211,8 +211,13 @@ int _stp_transport_init(void) dbug_trans(1, "transport_init\n"); _stp_init_pid = current->pid; +#ifdef STAPCONF_TASK_UID _stp_uid = current->uid; _stp_gid = current->gid; +#else + _stp_uid = current_uid(); + _stp_gid = current_gid(); +#endif #ifdef RELAY_GUEST /* Guest scripts use relay only for reporting warnings and errors */ -- cgit From ec77429d7f3b6e5bc6bb8a93beb8dac6c6dd99b1 Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Tue, 6 Jan 2009 19:30:17 -0500 Subject: PR9699: tweak autoconf file for Strict C Language Standards Compliance (tm) --- runtime/autoconf-task-uid.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'runtime') diff --git a/runtime/autoconf-task-uid.c b/runtime/autoconf-task-uid.c index 5f5a321c..8e40f831 100644 --- a/runtime/autoconf-task-uid.c +++ b/runtime/autoconf-task-uid.c @@ -1,5 +1,6 @@ #include -struct task_struct *foo; -void bar () { foo->uid = 0; } +int bar (struct task_struct *foo) { + return (foo->uid = 0); +} /* as opposed to linux/cred.h wrappers current_uid() etc. */ -- cgit