]> sourceware.org Git - systemtap.git/commitdiff
runtime: linux 3.14 porting: userns: Remove UIDGID_STRICT_TYPE_CHECKS
authorFrank Ch. Eigler <fche@redhat.com>
Sat, 8 Feb 2014 02:50:59 +0000 (21:50 -0500)
committerFrank Ch. Eigler <fche@redhat.com>
Sat, 8 Feb 2014 02:50:59 +0000 (21:50 -0500)
Adapt to linux commit 261000a56b6382f597bcb12000f55c9ff26a1efb
by using CONFIG_USER_NS as trigger for our *id*munged treatment
instead of CONFIG_UIDGID_STRICT_TYPE_CHECKS.

runtime/linux/runtime.h
runtime/linux/task_finder.c
runtime/linux/task_finder2.c
runtime/transport/control.c
runtime/transport/transport.c
tapset/linux/context.stp

index 5e97a83e693ce7b611860f41269a166ea189d064..65afc956723a5e31f0ca66eb9b75a27790d31013 100644 (file)
@@ -1,5 +1,5 @@
 /* main header file for Linux
- * Copyright (C) 2005-2013 Red Hat Inc.
+ * Copyright (C) 2005-2014 Red Hat Inc.
  * Copyright (C) 2005-2006 Intel Corporation.
  *
  * This file is part of systemtap, and is free software.  You can
@@ -87,7 +87,7 @@ static void _stp_exit(void);
 #ifdef STAPCONF_TASK_UID
 #define STP_CURRENT_EUID (current->euid)
 #else
-#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+#ifdef CONFIG_USER_NS
 #define STP_CURRENT_EUID (from_kuid_munged(current_user_ns(), task_euid(current)))
 #else
 #define STP_CURRENT_EUID (task_euid(current))
index a3cc3fb53e7a36bbdc965049d508d513e603e1af..19258e5ea34f8fa4764bb93a3e7cf5a6ff1c37eb 100644 (file)
@@ -846,7 +846,7 @@ __stp_utrace_attach_match_filename(struct task_struct *tsk,
 #ifdef STAPCONF_TASK_UID
        tsk_euid = tsk->euid;
 #else
-#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+#ifdef CONFIG_USER_NS
        tsk_euid = from_kuid_munged(current_user_ns(), task_euid(tsk));
 #else
        tsk_euid = task_euid(tsk);
@@ -1646,7 +1646,7 @@ stap_start_task_finder(void)
 #ifdef STAPCONF_TASK_UID
                tsk_euid = tsk->euid;
 #else
-#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+#ifdef CONFIG_USER_NS
                tsk_euid = from_kuid_munged(current_user_ns(), task_euid(tsk));
 #else
                tsk_euid = task_euid(tsk);
index 737c7adb11e1153e32aa45db6fb9d0e5fe63ce9a..16fda872f3385398e15b1ef64b9ae695320f1165 100644 (file)
@@ -815,7 +815,7 @@ __stp_utrace_attach_match_filename(struct task_struct *tsk,
 #ifdef STAPCONF_TASK_UID
        tsk_euid = tsk->euid;
 #else
-#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+#ifdef CONFIG_USER_NS
        tsk_euid = from_kuid_munged(current_user_ns(), task_euid(tsk));
 #else
        tsk_euid = task_euid(tsk);
@@ -1705,7 +1705,7 @@ stap_start_task_finder(void)
 #ifdef STAPCONF_TASK_UID
                tsk_euid = tsk->euid;
 #else
-#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+#ifdef CONFIG_USER_NS
                tsk_euid = from_kuid_munged(current_user_ns(), task_euid(tsk));
 #else
                tsk_euid = task_euid(tsk);
index 0ddfbb3cd6312fbab641c777422f708a398f7962..2b84c34558856cdd0dc27325d5bafd1109a32abe 100644 (file)
@@ -1,7 +1,7 @@
 /* -*- linux-c -*-
  *
  * control channel
- * Copyright (C) 2007-2011 Red Hat Inc.
+ * Copyright (C) 2007-2014 Red Hat Inc.
  *
  * This file is part of systemtap, and is free software.  You can
  * redistribute it and/or modify it under the terms of the GNU General
@@ -35,7 +35,7 @@ static ssize_t _stp_ctl_write_cmd(struct file *file, const char __user *buf, siz
 #ifdef STAPCONF_TASK_UID
        uid_t euid = current->euid;
 #else
-#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+#ifdef CONFIG_USER_NS
        uid_t euid = from_kuid_munged(current_user_ns(), current_euid());
 #else
        uid_t euid = current_euid();
index e81ac7dcb02b75978591d2ef2ac74a2dad43307f..1800764c39ef3e5dde0844b4e1c9b7822569d61b 100644 (file)
@@ -2,7 +2,7 @@
  * transport.c - stp transport functions
  *
  * Copyright (C) IBM Corporation, 2005
- * Copyright (C) Red Hat Inc, 2005-2011
+ * Copyright (C) Red Hat Inc, 2005-2014
  * Copyright (C) Intel Corporation, 2006
  *
  * This file is part of systemtap, and is free software.  You can
@@ -337,7 +337,7 @@ static int _stp_transport_init(void)
        _stp_uid = current->uid;
        _stp_gid = current->gid;
 #else
-#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+#ifdef CONFIG_USER_NS
        _stp_uid = from_kuid_munged(current_user_ns(), current_uid());
        _stp_gid = from_kgid_munged(current_user_ns(), current_gid());
 #else
index e5b1cb685fd352844fea8a5bd38c411a38c9fa54..a3e94d70b1de015899b9b4936f618e04e06bdb36 100644 (file)
@@ -113,7 +113,7 @@ function gid:long ()
 #ifdef STAPCONF_TASK_UID
        STAP_RETVALUE = current->gid;
 #else
-#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+#ifdef CONFIG_USER_NS
        STAP_RETVALUE = from_kgid_munged(current_user_ns(), current_gid());
 #else
        STAP_RETVALUE = current_gid();
@@ -131,7 +131,7 @@ function egid:long ()
 #ifdef STAPCONF_TASK_UID
        STAP_RETVALUE = current->egid;
 #else
-#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+#ifdef CONFIG_USER_NS
        STAP_RETVALUE = from_kgid_munged(current_user_ns(), current_egid());
 #else
        STAP_RETVALUE = current_egid();
@@ -149,7 +149,7 @@ function uid:long ()
 #ifdef STAPCONF_TASK_UID
        STAP_RETVALUE = current->uid;
 #else
-#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+#ifdef CONFIG_USER_NS
         STAP_RETVALUE = from_kuid_munged(current_user_ns(), current_uid());
 #else
         STAP_RETVALUE = current_uid();
@@ -167,7 +167,7 @@ function euid:long ()
 #ifdef STAPCONF_TASK_UID
        STAP_RETVALUE = current->euid;
 #else
-#ifdef CONFIG_UIDGID_STRICT_TYPE_CHECKS
+#ifdef CONFIG_USER_NS
         STAP_RETVALUE = from_kuid_munged(current_user_ns(), current_euid());
 #else
        STAP_RETVALUE = current_euid();
This page took 0.040191 seconds and 5 git commands to generate.