<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/lib-src, branch scratch/so-long</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>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>Pacify gcc 11.1.1 -Wanalyzer-null-argument</title>
<updated>2021-07-12T07:12:20+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2021-07-12T07:00:20+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=2337869fbf8b967eb53ee57f978f3751987e43dc'/>
<id>2337869fbf8b967eb53ee57f978f3751987e43dc</id>
<content type='text'>
* lib-src/etags.c (regexp): Omit member force_explicit_name,
since it’s always true.  All uses removed.  This lets us
remove calls to strlen (name) where GCC isn’t smart enough
to deduce that name must be nonnull.
* lib-src/movemail.c (main): Fix bug that could cause
link (tempname, NULL) to be called.
* src/emacs.c (argmatch): Break check into two ‘if’s,
since GCC doesn’t seem to be smart enough to check the single ‘if’.
* src/gtkutil.c (xg_update_menu_item): Fix bug where strcmp
could be given a NULL arg.
* src/xfont.c (xfont_list_family): Use nonnull value for dummy
initial value.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lib-src/etags.c (regexp): Omit member force_explicit_name,
since it’s always true.  All uses removed.  This lets us
remove calls to strlen (name) where GCC isn’t smart enough
to deduce that name must be nonnull.
* lib-src/movemail.c (main): Fix bug that could cause
link (tempname, NULL) to be called.
* src/emacs.c (argmatch): Break check into two ‘if’s,
since GCC doesn’t seem to be smart enough to check the single ‘if’.
* src/gtkutil.c (xg_update_menu_item): Fix bug where strcmp
could be given a NULL arg.
* src/xfont.c (xfont_list_family): Use nonnull value for dummy
initial value.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve and update the 'etags' test suite</title>
<updated>2021-06-18T11:28:16+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2021-06-18T11:28:16+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=6af9f1f3efc98f3ad736db9e2cf6dfb63bf7e3ff'/>
<id>6af9f1f3efc98f3ad736db9e2cf6dfb63bf7e3ff</id>
<content type='text'>
* lib-src/etags.c (mercury_pr): Remove redundant comment.

* test/manual/etags/merc-src/accumulator.m: Add more complex
declarations.
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6:
* test/manual/etags/CTAGS.good: Adapt to latest changes in 'etags'
and the test suite.  (Bug#47408)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lib-src/etags.c (mercury_pr): Remove redundant comment.

* test/manual/etags/merc-src/accumulator.m: Add more complex
declarations.
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6:
* test/manual/etags/CTAGS.good: Adapt to latest changes in 'etags'
and the test suite.  (Bug#47408)
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix Mercury support, notably qualified procedures.</title>
<updated>2021-06-18T11:18:34+00:00</updated>
<author>
<name>Fabrice Nicol</name>
</author>
<published>2021-06-17T17:59:52+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=0ffcf7479c49ad5e0f9f675124c7cf741197aedd'/>
<id>0ffcf7479c49ad5e0f9f675124c7cf741197aedd</id>
<content type='text'>
    Correct the previous fix (did not correctly handle qualified types).
    Also fix the following issues:
    - remove module name (+ dot) from tags, as prefixing module name is
      often inconsistent in code and may cause tags to be too specific.
    - now tag 0-arity predicates and functions (':- func foo_14.')
    - now tag one-word declarations (':- interface.')

    * lib-src/etags.c (mercury_pr): Pass the correct NAME and NAMELEN
    arguments to 'make_tag'.
    (mercury_decl): Return more information about the declaration or
    definition it finds.  This allows mercury_pr to be smarter.
    (Bug#47408)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
    Correct the previous fix (did not correctly handle qualified types).
    Also fix the following issues:
    - remove module name (+ dot) from tags, as prefixing module name is
      often inconsistent in code and may cause tags to be too specific.
    - now tag 0-arity predicates and functions (':- func foo_14.')
    - now tag one-word declarations (':- interface.')

    * lib-src/etags.c (mercury_pr): Pass the correct NAME and NAMELEN
    arguments to 'make_tag'.
    (mercury_decl): Return more information about the declaration or
    definition it finds.  This allows mercury_pr to be smarter.
    (Bug#47408)
</pre>
</div>
</content>
</entry>
<entry>
<title>Support mercury in 'ctags' as well</title>
<updated>2021-06-10T13:57:03+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2021-06-10T13:55:04+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=af4cccb8d98516ae96a3ebdc9a9eb7d7d8d5c1c5'/>
<id>af4cccb8d98516ae96a3ebdc9a9eb7d7d8d5c1c5</id>
<content type='text'>
The previous lack of support was due to incorrect calls to 'make_tag'
in 'mercury_pr', which caused 'pfnote' to refrain from adding Mercury
tags to the list of recorded tags.

* lib-src/etags.c (mercury_pr): Pass the correct NAME and NAMELEN
arguments to 'make_tag'.

* test/manual/etags/CTAGS.good: Adjust to the above change.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous lack of support was due to incorrect calls to 'make_tag'
in 'mercury_pr', which caused 'pfnote' to refrain from adding Mercury
tags to the list of recorded tags.

* lib-src/etags.c (mercury_pr): Pass the correct NAME and NAMELEN
arguments to 'make_tag'.

* test/manual/etags/CTAGS.good: Adjust to the above change.
</pre>
</div>
</content>
</entry>
<entry>
<title>Minor fixes for last change</title>
<updated>2021-06-06T09:44:49+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2021-06-06T09:44:49+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=6ef5760b1049870068f8e5cad2245692e044d0f7'/>
<id>6ef5760b1049870068f8e5cad2245692e044d0f7</id>
<content type='text'>
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6: Adapt to added Mercury support.

* lib-src/etags.c (find_entries, test_objc_is_mercury):
* etc/NEWS: Fix punctuation and typos in last change.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* test/manual/etags/ETAGS.good_1:
* test/manual/etags/ETAGS.good_2:
* test/manual/etags/ETAGS.good_3:
* test/manual/etags/ETAGS.good_4:
* test/manual/etags/ETAGS.good_5:
* test/manual/etags/ETAGS.good_6: Adapt to added Mercury support.

* lib-src/etags.c (find_entries, test_objc_is_mercury):
* etc/NEWS: Fix punctuation and typos in last change.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for Mercury (https://mercurylang.org) in 'etags'</title>
<updated>2021-06-06T09:29:29+00:00</updated>
<author>
<name>Fabrice Nicol</name>
</author>
<published>2021-06-01T02:15:59+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=5a8a5a990ae25cb65cfee424635f1f3b02b21f6a'/>
<id>5a8a5a990ae25cb65cfee424635f1f3b02b21f6a</id>
<content type='text'>
Tag declarations starting lines with ':-'.
By default, all declarations are tagged.  Optionally, first
predicate or functions in clauses can be tagged as in Prolog
support using '--declarations'.  (Bug#47408).
* lib-src/etags.c (test_objc_is_mercury, Mercury_functions)
(mercury_skip_comment,  mercury_decl, mercury_pr):
Implement Mercury support.  As Mercury and Objective-C have
the same file extension .m, a heuristic test tries to detect
the language.

* doc/man/etags.1: Document the change.  Add Mercury-specific
 behavior for '--declarations'.  This option tags first
predicates or functions in clauses in addition to declarations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Tag declarations starting lines with ':-'.
By default, all declarations are tagged.  Optionally, first
predicate or functions in clauses can be tagged as in Prolog
support using '--declarations'.  (Bug#47408).
* lib-src/etags.c (test_objc_is_mercury, Mercury_functions)
(mercury_skip_comment,  mercury_decl, mercury_pr):
Implement Mercury support.  As Mercury and Objective-C have
the same file extension .m, a heuristic test tries to detect
the language.

* doc/man/etags.1: Document the change.  Add Mercury-specific
 behavior for '--declarations'.  This option tags first
predicates or functions in clauses in addition to declarations.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for Rust in etags</title>
<updated>2021-05-17T15:24:04+00:00</updated>
<author>
<name>Pierre-Antoine Rouby</name>
</author>
<published>2021-05-17T15:14:12+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=ec870f8986aa28b6c09c78095bbd84912471be4d'/>
<id>ec870f8986aa28b6c09c78095bbd84912471be4d</id>
<content type='text'>
* lib-src/etags.c (Rust_functions): New function to make tags for rust
files.
(Rust_help, Rust_suffixes): New constant.
* doc/emacs/maintaining.texi (Tag Syntax): Add Rust item.
* doc/man/etags.1: Add Rust (bug#46055).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lib-src/etags.c (Rust_functions): New function to make tags for rust
files.
(Rust_help, Rust_suffixes): New constant.
* doc/emacs/maintaining.texi (Tag Syntax): Add Rust item.
* doc/man/etags.1: Add Rust (bug#46055).
</pre>
</div>
</content>
</entry>
<entry>
<title>* lib-src/Makefile.in (clean): Tidy up seccomp-filter files.</title>
<updated>2021-05-10T01:46:11+00:00</updated>
<author>
<name>Glenn Morris</name>
</author>
<published>2021-05-10T01:46:11+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=aa354dd55b213b86ee8e3aa0365a6ad915838458'/>
<id>aa354dd55b213b86ee8e3aa0365a6ad915838458</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>
</feed>
