rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / editor / emacs / patches / 03-socket_owner.patch
blob35f6ded9a36b76ff7a8902f151efabfdbc94842f
1 There seems to be a bug in our fstat() implementation when called on a socket.
2 The st_uid member always seems to be 0.
3 NetBSD seems to have a similar problem see
4 https://gnu.emacs.bug.narkive.com/cAVl8Cff/bug-43002-27-1-emacsclient-does-not-like-owner-of-socket-on-netbsd
6 --- emacs-28.1/lib-src/emacsclient.c.orig 2022-03-11 08:04:21.000000000 +0000
7 +++ emacs-28.1/lib-src/emacsclient.c 2022-04-05 10:48:23.309671173 +0000
8 @@ -1168,7 +1168,7 @@
9 struct stat st;
10 if (fstat (dirfd, &st) != 0)
11 return errno;
12 - if (st.st_uid != uid || (st.st_mode & (S_IWGRP | S_IWOTH)))
13 + if (st.st_uid != uid || (st.st_uid == (uid_t)0) || (st.st_mode & (S_IWGRP | S_IWOTH)))
14 return -1;
16 if (wdfd == -1)