Skip to contentSkip to conversation

Re: [[email protected]: Undelivered Mail Returned to Sender]

[email protected]: Undelivered Mail Returned to Sender Serge E. Hallyn 1 participant 1 message Nov 10, 2011 2 messages not in the archive

lore
Share & tools
lore
#2 lore raw
In reply to a message not in the archive

...

Quoted 21 lines
Quoted 21 lines

 Would you prefer something like:

(quoted diff) +18 -0
+#ifdef CONFIG_USER_NS
+static inline void fixup_uid(struct siginfo *info, struct task_struct *t)
+{
+       if (current_user_ns() == task_cred_xxx(t, user_ns))
+               return;
+
+       if (SI_FROMKERNEL(info))
+               return;
+
+       info->si_uid = user_ns_map_uid(task_cred_xxx(t, user_ns),
+                                       current_cred(), info->si_uid);
+}
+#else
+static inline void fixup_uid(struct siginfo *info, struct task_struct *t)
+{
+               return;
+}
+#endif
Quoted 3 lines
Quoted 1 line

?  It's less sneaky at least.

Very much. The current version looks like a bug.

Thanks, I'll switch to that and hopefully resend the set soon.

-serge