<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/lib, branch features/user-directory</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>New function num-processors</title>
<updated>2021-10-10T21:00:26+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2021-10-10T20:59:16+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=96278de8ac2166c37925f2dfbc0eeb6d368142b9'/>
<id>96278de8ac2166c37925f2dfbc0eeb6d368142b9</id>
<content type='text'>
This addresses a FIXME comment in lisp/emacs-lisp/comp.el,
relating to the number of subsidiary processes used by
comp-run-async-workers in native compilation.
* admin/merge-gnulib (GNULIB_MODULES): Add nproc.
* doc/lispref/processes.texi (Process Information), etc/NEWS:
Document num-processors.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/nproc.c, lib/nproc.h, m4/nproc.m4:
New files, copied from Gnulib by admin/merge-gnulib.
* lisp/emacs-lisp/comp.el (w32-get-nproc): Remove decl.
(comp-effective-async-max-jobs): Use num-processors.
* src/process.c: Include nproc.h.
(Fnum_processors): New function.
(syms_of_process): Define ‘all’, ‘current’, ‘num-processors’.
* src/w32proc.c (Fw32_get_nproc): Add FIXME comment.
* test/src/process-tests.el (process-num-processors): New test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This addresses a FIXME comment in lisp/emacs-lisp/comp.el,
relating to the number of subsidiary processes used by
comp-run-async-workers in native compilation.
* admin/merge-gnulib (GNULIB_MODULES): Add nproc.
* doc/lispref/processes.texi (Process Information), etc/NEWS:
Document num-processors.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib/nproc.c, lib/nproc.h, m4/nproc.m4:
New files, copied from Gnulib by admin/merge-gnulib.
* lisp/emacs-lisp/comp.el (w32-get-nproc): Remove decl.
(comp-effective-async-max-jobs): Use num-processors.
* src/process.c: Include nproc.h.
(Fnum_processors): New function.
(syms_of_process): Define ‘all’, ‘current’, ‘num-processors’.
* src/w32proc.c (Fw32_get_nproc): Add FIXME comment.
* test/src/process-tests.el (process-num-processors): New test.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix md5 issue in recent Gnulib merge</title>
<updated>2021-10-05T16:09:23+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2021-10-05T16:08:02+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=4d76765b6c8a3117c436ccc93572cddfd8d17d7c'/>
<id>4d76765b6c8a3117c436ccc93572cddfd8d17d7c</id>
<content type='text'>
When configured --with-native-compilation, Emacs needs md5_stream.
Problem reported by Andy Moreton (Bug#50985#23).
* admin/merge-gnulib (GNULIB_MODULES): Add crypto/md5,
needed for --with-native-compilation.
(AVOIDED_MODULES): Avoid crypto/af_alg, since Emacs doesn’t
need to bother with kernel-supported cryptography algorithms.
* lib/gnulib.mk.in, m4/gnulib-comp.m4:
Regenerate by running admin/merge-gnulib.
* lib/md5-stream.c: New file, copied from Gnulib.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When configured --with-native-compilation, Emacs needs md5_stream.
Problem reported by Andy Moreton (Bug#50985#23).
* admin/merge-gnulib (GNULIB_MODULES): Add crypto/md5,
needed for --with-native-compilation.
(AVOIDED_MODULES): Avoid crypto/af_alg, since Emacs doesn’t
need to bother with kernel-supported cryptography algorithms.
* lib/gnulib.mk.in, m4/gnulib-comp.m4:
Regenerate by running admin/merge-gnulib.
* lib/md5-stream.c: New file, copied from Gnulib.
</pre>
</div>
</content>
</entry>
<entry>
<title>Unbreak the build after Gnulib update</title>
<updated>2021-10-05T12:55:18+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2021-10-05T12:55:18+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=984eafeb9890d8a6e4fa401d38f5e6de9d720f2b'/>
<id>984eafeb9890d8a6e4fa401d38f5e6de9d720f2b</id>
<content type='text'>
* lib/gnulib.mk.in (GNULIBHEADERS_OVERRIDE_WINT_T): Rename from
GNULIB_OVERRIDES_WINT_T.
* configure.ac (GNULIBHEADERS_OVERRIDE_WINT_T): Define.
(Bug#50985)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lib/gnulib.mk.in (GNULIBHEADERS_OVERRIDE_WINT_T): Rename from
GNULIB_OVERRIDES_WINT_T.
* configure.ac (GNULIBHEADERS_OVERRIDE_WINT_T): Define.
(Bug#50985)
</pre>
</div>
</content>
</entry>
<entry>
<title>Update from Gnulib</title>
<updated>2021-10-04T22:21:31+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2021-10-04T19:11:39+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=68a256c89270ef9e97bca6097967a9ed2b050f4a'/>
<id>68a256c89270ef9e97bca6097967a9ed2b050f4a</id>
<content type='text'>
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove.  These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make the following changes by hand, and run 'admin/merge-gnulib'.
* .gitignore: Add lib/malloc/*.gl.h.
* admin/merge-gnulib: Copy lib/af_alg.h and lib/save-cwd.h
directly from Gnulib, without worrying about Gnulib modules,
as these files are special cases.
(AVOIDED_MODULES): Remove malloc-posix.
* lib/malloc.c, lib/realloc.c, m4/malloc.m4, m4/realloc.m4:
* m4/year2038.m4: New files, copied from Gnulib.
* lib/malloca.c, lib/malloca.h:
* m4/close-stream.m4, m4/glibc21.m4, m4/malloca.m4:
Remove.  These are either no longer present in Gnulib, or are no
longer needed by modules that Emacs uses.
* oldXMenu/AddPane.c, oldXmenu/Addsel.c: Include XmenuInt.h first;
needed for new Gnulib.
* src/xmenu.c: Call emacs_abort, not abort.
</pre>
</div>
</content>
</entry>
<entry>
<title>Redo emacsclient socket symlink-attack checking</title>
<updated>2021-07-23T11:33:37+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2021-07-23T11:33:21+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=007744dd0404d6febca88b00c22981cc630fb8c0'/>
<id>007744dd0404d6febca88b00c22981cc630fb8c0</id>
<content type='text'>
* admin/merge-gnulib (GNULIB_MODULES): Add file-has-acl.
* lib/file-has-acl.c: New file, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib-src/emacsclient.c: Include acl.h, for file_has_acl.
(O_PATH): Default to O_SEARCH, which is good enough here.
(union local_sockaddr): New type.
(socket_status): Remove, replacing with ...
(connect_socket): New function.  All callers changed.
This function checks for ownership and permissions issues with the
parent directory of the socket file, instead of checking the
owner of the socket (which does not help security).
(socknamesize): Move to file scope.
(local_sockname): New arg S.  No need to pass socknamesize.
UID arg is now uid_t.  All callers changed.  Get file descriptor
of parent directory of socket, to foil some symlink attacks.
Do not follow symlinks to that directory.
(set_local_socket): Create the socket here instead of on
each attempt to connect it.  Fall back from XDG_RUNTIME_DIR
to /tmp only if the former fails due to ENOENT.  Adjust
permission-failure diagnostic to match changed behavior.

This addresses Bug#33847, which complained about emacsclient in a
safer XDG environment not connecting to an Emacs server running in
a less-safe enviroment outside XDG.  The patch fixes a
longstanding issue with emacsclient permission checking.
It’s ineffective to look at the permission of the socket file
itself; on some platforms, these permissions are ignored anyway.
What matters are the permissions on the parent directory of the
socket file, as these are what make symlink attacks possible.
Change the permissions check accordingly, and also refuse to
follow symlinks to that parent directory.  These changes make it
OK for emacsclient to fall back from XDG_RUNTIME_DIR to the
traditionally less-safe /tmp/emacsNNNN directories, since /tmp is
universally sticky nowadays.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* admin/merge-gnulib (GNULIB_MODULES): Add file-has-acl.
* lib/file-has-acl.c: New file, copied from Gnulib.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
* lib-src/emacsclient.c: Include acl.h, for file_has_acl.
(O_PATH): Default to O_SEARCH, which is good enough here.
(union local_sockaddr): New type.
(socket_status): Remove, replacing with ...
(connect_socket): New function.  All callers changed.
This function checks for ownership and permissions issues with the
parent directory of the socket file, instead of checking the
owner of the socket (which does not help security).
(socknamesize): Move to file scope.
(local_sockname): New arg S.  No need to pass socknamesize.
UID arg is now uid_t.  All callers changed.  Get file descriptor
of parent directory of socket, to foil some symlink attacks.
Do not follow symlinks to that directory.
(set_local_socket): Create the socket here instead of on
each attempt to connect it.  Fall back from XDG_RUNTIME_DIR
to /tmp only if the former fails due to ENOENT.  Adjust
permission-failure diagnostic to match changed behavior.

This addresses Bug#33847, which complained about emacsclient in a
safer XDG environment not connecting to an Emacs server running in
a less-safe enviroment outside XDG.  The patch fixes a
longstanding issue with emacsclient permission checking.
It’s ineffective to look at the permission of the socket file
itself; on some platforms, these permissions are ignored anyway.
What matters are the permissions on the parent directory of the
socket file, as these are what make symlink attacks possible.
Change the permissions check accordingly, and also refuse to
follow symlinks to that parent directory.  These changes make it
OK for emacsclient to fall back from XDG_RUNTIME_DIR to the
traditionally less-safe /tmp/emacsNNNN directories, since /tmp is
universally sticky nowadays.
</pre>
</div>
</content>
</entry>
<entry>
<title>* lib/Makefile.in (Makefile): Fix typo.</title>
<updated>2021-06-09T16:51:45+00:00</updated>
<author>
<name>Glenn Morris</name>
</author>
<published>2021-06-09T16:51:18+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5b68e7b48805bd3d19c67591c28b140a4ed4a937'/>
<id>5b68e7b48805bd3d19c67591c28b140a4ed4a937</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix the unexec build on GNU/Linux</title>
<updated>2021-05-19T14:42:50+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2021-05-19T14:42:50+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5e1a8d5654d97d2631ad67ebb88be4d2eec7d408'/>
<id>5e1a8d5654d97d2631ad67ebb88be4d2eec7d408</id>
<content type='text'>
The unexec build on GNU/Linux must use HYBRID_MALLOC (gmalloc.c) and
sheap.c.  This was inadvertently disabled because a configure-time
test for 'sbrk' was moved as side effect of an unrelated change.

* configure.ac: Test for 'sbrk' before using the result in the
decision about SYSTEM_MALLOC and HYBRID_MALLOC.
(HYBRID_MALLOC): Prevent Gnulib from redirecting 'free' to its
replacement 'rpl_free'.

* lib/Makefile.in (not_emacs_OBJECTS): Add mallooc/%.o and free.o.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The unexec build on GNU/Linux must use HYBRID_MALLOC (gmalloc.c) and
sheap.c.  This was inadvertently disabled because a configure-time
test for 'sbrk' was moved as side effect of an unrelated change.

* configure.ac: Test for 'sbrk' before using the result in the
decision about SYSTEM_MALLOC and HYBRID_MALLOC.
(HYBRID_MALLOC): Prevent Gnulib from redirecting 'free' to its
replacement 'rpl_free'.

* lib/Makefile.in (not_emacs_OBJECTS): Add mallooc/%.o and free.o.
</pre>
</div>
</content>
</entry>
<entry>
<title>* lib/Makefile.in (maintainer-clean): Fully ignore rmdir errors.</title>
<updated>2021-05-10T20:31:08+00:00</updated>
<author>
<name>Glenn Morris</name>
</author>
<published>2021-05-10T20:31:08+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=28bed069a7cc0f9d6937276b5a1eec949abc280a'/>
<id>28bed069a7cc0f9d6937276b5a1eec949abc280a</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Base the "extraclean" Make rule on "maintainer-clean"</title>
<updated>2021-05-10T01:14:12+00:00</updated>
<author>
<name>Glenn Morris</name>
</author>
<published>2021-05-10T01:14:12+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=305e4807a42075dca2447c82499cbc2584700fe2'/>
<id>305e4807a42075dca2447c82499cbc2584700fe2</id>
<content type='text'>
* Makefile.in (FIND_DELETE): New, set by configure.
(extraclean_dirs): Remove.
(extraclean): Make it just a small variation on maintainer-clean.
* admin/charsets/Makefile.in (extraclean):
* admin/grammars/Makefile.in (extraclean):
* admin/unidata/Makefile.in (extraclean):
* leim/Makefile.in (extraclean):
* lib-src/Makefile.in (extraclean):
* lisp/Makefile.in (extraclean):
* lwlib/Makefile.in (extraclean):
* nt/Makefile.in (extraclean):
* src/Makefile.in (extraclean): Remove target.
* lib/Makefile.in (extraclean): Merge into maintainer-clean.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* Makefile.in (FIND_DELETE): New, set by configure.
(extraclean_dirs): Remove.
(extraclean): Make it just a small variation on maintainer-clean.
* admin/charsets/Makefile.in (extraclean):
* admin/grammars/Makefile.in (extraclean):
* admin/unidata/Makefile.in (extraclean):
* leim/Makefile.in (extraclean):
* lib-src/Makefile.in (extraclean):
* lisp/Makefile.in (extraclean):
* lwlib/Makefile.in (extraclean):
* nt/Makefile.in (extraclean):
* src/Makefile.in (extraclean): Remove target.
* lib/Makefile.in (extraclean): Merge into maintainer-clean.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'savannah/master' into native-comp</title>
<updated>2021-03-25T15:29:07+00:00</updated>
<author>
<name>Andrea Corallo</name>
</author>
<published>2021-03-25T15:29:07+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c6c7b30e4b46bf0c8ac5e77546d3938e79f14d56'/>
<id>c6c7b30e4b46bf0c8ac5e77546d3938e79f14d56</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
