• R/O
  • SSH
  • HTTPS

akari: Commit


Commit MetaInfo

Revision656 (tree)
Zeit2020-10-24 09:54:15
Autorkumaneko

Log Message

(empty log message)

Ändern Zusammenfassung

Diff

--- trunk/akari/realpath.c (revision 655)
+++ trunk/akari/realpath.c (revision 656)
@@ -379,8 +379,16 @@
379379 if (sb->s_magic == PROC_SUPER_MAGIC && *pos == '/') {
380380 char *ep;
381381 const pid_t pid = (pid_t) simple_strtoul(pos + 1, &ep, 10);
382-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
382+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
383383 if (*ep == '/' && pid && pid ==
384+ task_tgid_nr_ns(current, proc_pid_ns(sb))) {
385+ pos = ep - 5;
386+ if (pos < buffer)
387+ goto out;
388+ memmove(pos, "/self", 5);
389+ }
390+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
391+ if (*ep == '/' && pid && pid ==
384392 task_tgid_nr_ns(current, sb->s_fs_info)) {
385393 pos = ep - 5;
386394 if (pos < buffer)
Show on old repository browser