summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* * Version: 2.7.6.Colin Watson2016-12-11
|
* Fix systemd tmpfiles group/perms of /var/cache/manColin Watson2016-12-11
| | | | * init/systemd/man-db.conf: Change mode to 0755 and group to man.
* Fix Polish mandb(8) "cannot adjust line" warningsColin Watson2016-12-11
| | | | | * man/man8/mandb.man8 (DATABASE CACHES): Set a width of 20em for the "Type" column.
* Drop documentation of gdbm < 1.6Colin Watson2016-12-11
| | | | | | | | gdbm 1.6 was released in 1993; it's no longer necessary to document mandb's behaviour with older versions. * man/man8/mandb.man8 (DATABASE CACHES): Remove "GNU gdbm v < 1.6" row. Simplify "GNU gdbm v >= 1.6" to "GNU gdbm". Update all translations.
* Fix table rendering with po4a 0.47Colin Watson2016-12-11
| | | | | | | | | | | | * man/po4a/Locale/Po4a/Manext.pm (initialize): Drop unused assignment. (shiftline, pushline): Pass through to superclass if po4a version >= 0.47. (translate): With po4a >= 0.47, don't process text blocks since po4a now does that, but handle @-separation of columns and remove trailing newlines from translatable strings. * man/po4a/po/man-db-manpages.pot, man/po4a/po/*.po: Update (line numbers only). * NEWS: Document this.
* Fix distcheck following cache-owner/setuid changesColin Watson2016-12-11
| | | | | | | | We previously ignored chown failures on "make install", but that's not really correct. Instead, configure with --disable-setuid during distcheck. * Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Add --disable-setuid.
* Update translation filesColin Watson2016-12-11
| | | | | * po/man-db.pot, po/*.po: Update. * man/po4a/po/man-db-manpages.pot, man/po4a/po/*.po: Update.
* * NEWS: Document changes since 2.7.5.Colin Watson2016-12-11
|
* src/tests: Use /tmp for temporary directoriesMihail Konev2016-12-11
| | | | | | Reduces disk reads/writes made by 'make check -C src'. Fall back to ./tmp-* if 'mktemp -d' fails.
* Eliminate dangerous setgid-root directoriesColin Watson2016-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | man-db has created its cache directories as setgid root for nearly 20 years. This seems to have originated in https://bugs.debian.org/26002. However, this has some dangerous consequences, such as: http://www.halfdog.net/Security/2015/SetgidDirectoryPrivilegeEscalation/ It seems best to arrange for cache files and directories to be man:man rather than man:root. To do this reliably, as well as adjusting various chown and chmod calls, we make man and mandb be setgid man as well as setuid man (except in the --disable-setuid case). This is a much simpler and safer solution to the original problem, and doesn't introduce any interesting new privilege since the man group's only real purpose is to be the man user's primary group and nothing in cache directories is group-writeable. * configure.ac (AC_CHECK_FUNCS): Add lchown. * lib/security.c (init_security): Record initial real and effective group IDs as well as user IDs. (drop_effective_privs, regain_effective_privs): Update gid. * lib/xchown.c (xlchown) [HAVE_LCHOWN]: New function. * lib/xchown.c (xlchown) [HAVE_LCHOWN]: Add prototype. * m4/man-arg-setuid.m4: Set man_mode to 6755 rather than 4755 in the --enable-setuid case. * src/Makefile.am (install-exec-hook): Check for man_mode being 6755 rather than 4755. Set the group of man and mandb as well as their owner. * src/check_mandirs.c (chown_if_possible): New function. This is somewhat more careful than previous implementations, changes the group as well as the user if possible, and prefers lchown if it is available. (mkcatdirs): Drop S_ISGID from cat directories. Use chown_if_possible. (fix_permissions, fix_permissions_tree): New functions to remove setgid bit from existing cat directories. (testmandirs): Call fix_permissions_tree. * src/check_mandirs.h (chown_if_possible): Add prototype. * src/man.c (commit_tmp_cat): Set cat file group as well as owner. * src/mandb.c (check_chown): Remove. (do_chown): Stop taking a uid parameter. Use chown_if_possible. (mandb): Use chown_if_possible for CACHEDIR.TAG. Set ownership and permissions of CACHEDIR.TAG even if it already exists. (process_manpath): Set ownership of database files even if they have not been changed.
* Make --disable-cache-owner imply --disable-setuidColin Watson2016-12-10
| | | | | * m4/man-arg-setuid.m4: Set man_mode="755" if --disable-cache-owner was given and neither --enable-setuid nor --disable-setuid was given.
* Update manual for cache-owner/setuid changesColin Watson2016-12-10
| | | | | | | | | | * manual/intro.me (Arguments to configure): Add --enable-cache-owner and --disable-cache-owner. Remove --enable-setuid[=ARG]. Adjust description of --disable-setuid. * manual/misc.me (Modes of operation): Add --disable-cache-owner to the non-setuid modes. Mention --enable-setuid rather than --enable-setuid=USER. * README (Non-generic arguments to configure): Update.
* Allocate dbpaths on the heap rather than the stackColin Watson2016-12-10
| | | | | | | | process_manpath's stack may have gone out of scope by the time cleanup functions are called. * src/mandb.c (cleanup): Free dbpaths. (process_manpath): Allocate dbpaths on the heap.
* Handle cleanup stack more safelyColin Watson2016-12-10
| | | | | | | | | | | If push_cleanup was called unexpectedly between a push_cleanup/pop_cleanup pair, then the pop_cleanup would remove the wrong cleanup function and chaos could ensue. Avoid this by being more precise about which cleanup function should be popped. * lib/cleanup.c (pop_cleanup): Take "fun" and "arg" arguments. Pop the topmost matching function from the stack, rather than just the topmost function. Update all callers and prototypes.
* Upgrade config.guess/config.subColin Watson2016-12-09
| | | | | * build-aux/config.guess: Upgrade to 2016-10-02. * build-aux/config.sub: Upgrade to 2016-11-04.
* Separate cache owner from --enable-setuid optionColin Watson2016-12-09
| | | | | | | | | | | | | | It's useful to have a notion of the cache owner even when man is not installed setuid. --enable-setuid no longer takes an argument, and the owner is now set by the --enable-cache-owner option instead. * m4/man-arg-cache-owner.m4: New file. * m4/man-arg-setuid.m4: Stop accepting an argument. Only set man_mode, not man_owner. * configure.ac: Call MAN_ARG_CACHE_OWNER. * src/Makefile.am (install-exec-hook): Only chown man and mandb if man_mode is 4755 (as well as the existing test for man_owner being non-empty).
* Restore ylwrap to distributionColin Watson2016-11-21
| | | | | * Makefile.in (am__DIST_COMMON): Regenerate to add build-aux/ylwrap back again, since it mysteriously went missing in the last regeneration.
* Update translation filesColin Watson2016-11-21
| | | | * po/man-db.pot, po/*.po: Update.
* Upgrade to Libtool 2.4.6-2 (from Debian)Colin Watson2016-11-21
|
* Upgrade config.guess/config.subColin Watson2016-11-21
| | | | | * build-aux/config.guess: Upgrade to 2016-04-02. * build-aux/config.sub: Upgrade to 2016-03-30.
* src/tests: Fix testsuiteMihail Konev2016-11-20
| | | | * src/tests/man-9: Set MANPATH.
* man(1): Fix gcc warningsMihail Konev2016-11-20
| | | | | | | | | * lib/xchown.c: New file. * lib/xchown.h: New file. * lib/Makefile.am (libman_la_SOURCES): Add xchown.c and xchown.h. * po/POTFILES.in: Add lib/xchown.c. * src/check_mandirs.c (mkcatdirs): Call xchown instead of chown. * src/man.c (format_display): Ignore errors from chdir ("/").
* Make split_page_name allocate its own memoryColin Watson2016-11-20
| | | | | | * src/man.c (split_page_name): Allocate *ret_name and *ret_section here. Simplify using xstrdup and xstrndup. (man): Remove allocation of page_name and page_section.
* man(1): add .N namesMihail Konev2016-11-20
| | | | | | | | | | | | | `man chmod.2` is now the same as `man 2 chmod` * src/man.c (split_page_name): New function. (locate_page_in_manpath): New function. (man): Factor out common locate_page loop into locate_page_in_manpath. Add name/section splitting logic. * src/tests/man-11: New file. * src/tests/Makefile.am (ALL_TESTS): Add man-11. * man/man1/man.man1 (SYNOPSIS): Document <page>.<section> form. (EXAMPLES): Likewise.
* Fix formatting error in Swedish translationColin Watson2016-10-04
| | | | * man/po4a/po/sv.po: Translate "\\(rq" as itself rather than as "\\(".
* Rename some anomalous x* functionsColin Watson2016-10-04
| | | | | | | | | | | | | | | The usual (though not universal) pattern in gnulib is for xfoo to mean "foo or exit". Rename x* to check_* so that they don't conflict with this. * src/mandb.c (xremove): Rename to ... (check_remove): ... this. (xrename): Rename to ... (check_rename): ... this. (xchmod): Rename to ... (check_chmod): ... this. (xchown): Rename to ... (check_chown): ... this.
* man(1): Fix incorrect fontColin Watson2016-05-16
| | | | | | | * man/man1/man.man1 (SYNOPSIS): Make "--regex" bold. Thanks to Paul Townsend. * man/po4a/po/man-db-manpages.pot, man/po4a/po/*.po: Update; unfuzzy all translations.
* * man/po4a/po/man-db-manpages.pot, man/po4a/po/*.po: Update.Colin Watson2016-05-16
|
* Note caveat with "man -K"Colin Watson2016-02-04
| | | | | * man/man1/man.man1 (Main modes of operation): Note that -K searches page source. Fixes Debian bug #813665.
* * po/sv.po: Add missing translator credit comment.Sebastian Rasmussen2016-01-02
|
* Fix warnings with Perl 5.22Colin Watson2016-01-02
| | | | | * man/po4a/Locale/Po4a/Manext.pm (shiftline, translate): Escape braces in regular expressions.
* Add Swedish manual page translationColin Watson2016-01-02
| | | | | | | | | | | | | * man/po4a/po/sv.po: New from Translation Project (thanks, Sebastian Rasmussen). * configure.ac (AC_CONFIG_FILES): Add man/sv/Makefile. * man/LINGUAS.po4a: Add sv. * man/Makefile.am (DIST_SUBDIRS): Add sv. * man/sv/Makefile.am, man/sv/translator.add: New files. * man/po4a/Makefile.am (POFILES): Add po/sv.po. * man/po4a/po4a.cfg (po4a_langs): Add sv. * man/THANKS: Add translator credit. * .gitignore: Add man/sv/man1, man/sv/man5, and man/sv/man8.
* Upgrade to pkg-config 0.29.Colin Watson2015-12-31
|
* Update Swedish translationSebastian Rasmussen2015-12-26
| | | | | * po/sv.po: Update from Translation Project. * man/THANKS: Add translator credit.
* Simplify database path handling in mandbColin Watson2015-12-07
| | | | | | | | | | * src/mandb.c (struct dbpaths): Unconstify xtmpfile. (finish_up): Free dbpaths->xtmpfile. (cleanup): Update header comment. Remove unnecessary checks before frees. Free all database paths for all database types, not just GDBM. Free dbpaths->xtmpfile. (mandb): Copy content of database to dbpaths->xtmpfile rather than just copying the pointer.
* Move some database paths out of global variablesColin Watson2015-12-07
| | | | | | | | * src/mandb.c (struct dbpaths): New structure. (finish_up, do_chown, cleanup_sigsafe, cleanup, mandb): Take dbpaths argument. (process_manpath): Allocate dbpaths on the stack, zero it, and pass it to functions that need it.
* Remove lots of unnecessary inline qualifiersColin Watson2015-12-07
| | | | | | | | | | | | | | | | | | It's 2015. The compiler almost certainly knows better than we do. * lib/security.c (gripe_set_euid): Remove inline qualifier. * libdb/db_btree.c (btree_findkey): Likewise. * libdb/mydbm.h (gdbm_exists): Likewise. * src/catman.c (catman): Remove obsolete comment. (add_arg, check_access): Remove inline qualifier. * src/check_mandirs.c (add_dir_entries): Likewise. * src/man.c (gripe_system, gripe_no_man, manopt_to_env, escape_less, is_section, do_prompt, gripe_converting_name): Likewise. * src/mandb.c (xremove, xrename, xchmod, finish_up, xchown, do_chown, update_db_wrapper): Likewise. * src/manp.c (gripe_reading_mp_config, gripe_stat_file, gripe_not_directory, has_mandir, fsstnd): Likewise. * src/whatis.c (do_whatis_section): Likewise.
* Belatedly update NEWS date.Colin Watson2015-11-06
|
* * Version: 2.7.5.Colin Watson2015-11-06
|
* * NEWS: Document changes since 2.7.4.Colin Watson2015-11-06
|
* Build text manual with LC_ALL=CColin Watson2015-11-06
| | | | | | | nroff's UTF-8 output is a bit wonky in this case, but ASCII will do fine. * manual/Makefile.am (.pp.cat): Set LC_ALL=C.
* Disable roff input insertion with --recodeColin Watson2015-11-05
| | | | | | | Reported by Bjarni Ingi Gislason. Fixes Debian bug #751795. * src/man.c (display): Don't insert roff input for --no-hyphenation, --no-justification, or locale macros when the --recode option is used.
* Adjust line number when inserting extra roff inputColin Watson2015-11-05
| | | | | | | | | Reported by Bjarni Ingi Gislason. Fixes Debian bug #789219. * src/man.c (heirloom_line_length, disable_hyphenation, disable_justification, locale_macros): Emit ".lf 1" after inserted roff input. * src/zsoelim.l: Accept .lf without a file name argument.
* Make a mandb error message clearerColin Watson2015-10-19
| | | | * src/mandb.c (xcopy): Say which file name we failed to fopen.
* Fix Plural-Forms header in Catalan translationColin Watson2015-10-08
| | | | * po/ca.po (Plural-Forms): Add missing semicolon.
* * Version: 2.7.4.Colin Watson2015-10-08
|
* man: Honour MANWIDTH in conjunction with -ZColin Watson2015-10-08
| | | | | | | | | | * src/man.c (get_roff_line_length): Also consider line_length if ditroff is set. (make_roff_command): Try add_roff_line_length regardless of troff. The line length is passed to the macro package, not to the output device, although get_roff_line_length will still sometimes not use it (e.g. if using the "ps" device). Fixes Debian bug #801241. * NEWS: Document this.
* man: Exit 3 if formatter exits non-zeroColin Watson2015-10-08
| | | | | | | * src/man.c (format_display): Keep track of exit statuses from both format_cmd and disp_cmd, and exit CHILD_FAIL if either is non-zero and non-SIGPIPE. Fixes Debian bug #801261. * NEWS: Document this.
* Fix replace.sed prerequisite syntaxColin Watson2015-09-22
| | | | | | | | | Suffix rules may not have prerequisites. Thanks to Nikola Forró; fixes Fedora bug #1263930. * man/Rules.man: Declare dependency of $(MANS) on replace.sed separately rather than trying to do so in suffix rules. * NEWS: Document this.
* Fix crash in manpath deduplicationColin Watson2015-09-22
| | | | | | * src/manp.c (create_pathlist): Handle NULL return from canonicalize_file_name. * NEWS: Document this.