diff options
author | 2013-06-05 17:48:14 +0000 | |
---|---|---|
committer | 2013-06-05 17:48:14 +0000 | |
commit | 8e4a0843a98aff5640c1b35c131853a039780b5f (patch) | |
tree | 3dc67e7c35183b95914f362595a67df3fe9b1d0b /compat_strlcpy.c | |
parent | 8400486b39e9f57a03d2efe49cf8eab233476669 (diff) | |
download | mandoc-8e4a0843a98aff5640c1b35c131853a039780b5f.tar.gz mandoc-8e4a0843a98aff5640c1b35c131853a039780b5f.tar.zst mandoc-8e4a0843a98aff5640c1b35c131853a039780b5f.zip |
Add back the realpath() checks that got lost during the change from
db to sqlite; they are needed to prevent corruption of the database
when paths containing dot, dotdot, or symlinks are given on the
command line. Also make sure the exit-code is really non-zero on
system errors and use mandoc(1) exit codes.
To make all this simpler,
* Drop the "basedir" argument from almost every function and make it
global because it is really state info used all over the place.
* Move "startdir" and "fd" as local vars into set_basedir() because they
are only used for this one purpose, i.e. to move out of basedir again.
While here,
* Clarify the name of path_arg in the main program; in the -C case,
it is not a dir, and anyway there are lots of different dirs around.
* Include missing <stdio.h> needed for perror().
Diffstat (limited to 'compat_strlcpy.c')
0 files changed, 0 insertions, 0 deletions