am-utils-6.1.git
19 years ago* amd/amq_subr.c (amqproc_pawd_1_svc): repeatedly resolve path in
Erez Zadok [Wed, 26 Oct 2005 14:59:19 +0000 (14:59 +0000)]
* amd/amq_subr.c (amqproc_pawd_1_svc): repeatedly resolve path in
Amd, not in pawd (to avoid repeated network RPCs).

* amq/pawd.c (transform_dir): move repeated path resolution into Amd.

19 years ago* amq/pawd.c (transform_dir): resolve path repeatedly until
Erez Zadok [Wed, 26 Oct 2005 03:35:50 +0000 (03:35 +0000)]
* amq/pawd.c (transform_dir): resolve path repeatedly until
finished.  Bug fix from Jonathan Chen <jon+amd-at-spock.org>.
Added safety check to prevent infinite loops.

19 years agolongname, nowin95, shortname, user=N, group=N, mask=N, and
Erez Zadok [Thu, 20 Oct 2005 20:26:16 +0000 (20:26 +0000)]
longname, nowin95, shortname, user=N, group=N, mask=N, and
dirmask=N.
nowin95, shortname, user=N, group=N, mask=N, and dirmask=N.
user=N, group=N, mask=N, and dirmask=N.

19 years ago* doc/am-utils.texi (opts Option): document new pcfs options
Erez Zadok [Wed, 19 Oct 2005 23:54:35 +0000 (23:54 +0000)]
* doc/am-utils.texi (opts Option): document new pcfs options
longname, nowin95, shortname, uid=N, gid=N, mask=N, and dirmask=N.

* amd/ops_pcfs.c (mount_pcfs): process new pcfs options longname,
nowin95, shortname, uid=N, gid=N, mask=N, and dirmask=N.

* include/am_compat.h: provide compatibility mnttab string names,
if needed, for pcfs mount options longname, nowin95, shortname,
uid=N, gid=N, mask=N, and dirmask=N.

* include/am_utils.h: extern for hasmntstr().

* libamu/mtab.c (hasmntstr): new function to return the string
value following a mount option, up to the next comma-delimited
options.

* configure.in: check for mnttab and pcfs options longname,
nowin95, and shortname.

* Makefile.am (EXTRA_DIST_M4): distribute new macro
check_mnt2_pcfs_opt.m4.

* m4/macros/check_mnt2_pcfs_opt.m4: new macro to check for pcfs
mnttab and mount options.

19 years ago* libamu/mount_fs.c (print_nfs_args): print nfs_args->addr
Erez Zadok [Tue, 18 Oct 2005 18:11:34 +0000 (18:11 +0000)]
* libamu/mount_fs.c (print_nfs_args): print nfs_args->addr
correctly, depending if it's a pointer or not.

* conf/sa_dref/sa_dref_*.h: for each NFS_SA_DREF macro, also
#define NFS_ARGS_T_ADDR_IS_POINTER if nfs_args->addr is a pointer
or an embedded structure, so we can tell how to print it.

* libamu/mount_fs.c (print_nfs_args): print nfs_args->addrlen
field, if it exists.

* configure.in: check for nfs_args->addrlen field.

* wire-test/wire-test.c (main), libamu/mount_fs.c
(print_nfs_args), fixmount/fixmount.c (inetresport,
clnt_create_timeout), amq/pawd.c (transform_dir), amq/amq.c
(main), amd/srvr_nfs.c (find_nfs_srvr), amd/autil.c
(amfs_mount): document that as per POSIX, we don't need to set the
sa_len/sin_len fields in struct sockaddr/sockaddr_in.  The field
is used only internally in the kernel.  See
www.awprofessional.com/articles/article.asp?p=169505&seqNum=2&rl=1

* fixmount/fixmount.c (inetresport): initialize sockaddr_in
structure before filling in some fields.

19 years ago* doc/am-utils.texi (nfs_vers, nfs_proto parameters): clarify and
Erez Zadok [Tue, 11 Oct 2005 16:50:19 +0000 (16:50 +0000)]
* doc/am-utils.texi (nfs_vers, nfs_proto parameters): clarify and
correct mistaken description of nfs_proto.

19 years agoreorg NEWS a bit
Erez Zadok [Mon, 10 Oct 2005 18:27:48 +0000 (18:27 +0000)]
reorg NEWS a bit

19 years agoinstall sun2amd.txt am-utils-6_2a1
Erez Zadok [Mon, 10 Oct 2005 17:29:17 +0000 (17:29 +0000)]
install sun2amd.txt

19 years ago*******************************************************************
Erez Zadok [Mon, 10 Oct 2005 17:15:48 +0000 (17:15 +0000)]
*******************************************************************
*** Released am-utils-6.1a1 ***
*******************************************************************

* README.sun2amd: revised.

19 years agonuke trailing spaces
Erez Zadok [Mon, 10 Oct 2005 16:46:59 +0000 (16:46 +0000)]
nuke trailing spaces

19 years agothe sun2amd feature.
Daniel Ottavio [Mon, 10 Oct 2005 01:40:16 +0000 (01:40 +0000)]
the sun2amd feature.
Moved the date.

19 years ago* README.sun2amd: Made a first pass at describing the status of
Daniel Ottavio [Mon, 10 Oct 2005 01:33:16 +0000 (01:33 +0000)]
* README.sun2amd: Made a first pass at describing the status of
the sun2amd feature.

19 years agospacing
Erez Zadok [Sun, 9 Oct 2005 23:37:12 +0000 (23:37 +0000)]
spacing

19 years ago* amd/info_nis.c (nis_search): Bug fix for bugzilla #428; make
Daniel Ottavio [Sun, 9 Oct 2005 22:24:12 +0000 (22:24 +0000)]
* amd/info_nis.c (nis_search): Bug fix for bugzilla #428; make
sure that sun_entry2amd() is not called when yp_match() returns an
error, this is done by checking that 'res' is 0.  Bug fix (same
BZ#); free the output allocated by yp_match() instead of freeing
the return value of sun_entry2amd().

* amd/sun_map.c (sun_entry2amd): Fix a comment.

19 years ago* README.sun2amd: place holder.
Erez Zadok [Sun, 9 Oct 2005 20:18:50 +0000 (20:18 +0000)]
* README.sun2amd: place holder.

* Makefile.am (EXTRA_DIST): distribute new README.sun2amd file.

19 years ago* m4/macros/check_mnttab_type.m4: move the test for MOUNT_* to the
Erez Zadok [Sat, 8 Oct 2005 02:58:01 +0000 (02:58 +0000)]
* m4/macros/check_mnttab_type.m4: move the test for MOUNT_* to the
very end, after the test using getvfsbyname().

* m4/macros/expand_run_string.m4: if the string value returned is
empty, consider it invalid.

19 years ago* m4/macros/check_varargs_macros.m4: rewrite macro so it'll
Erez Zadok [Fri, 7 Oct 2005 23:17:31 +0000 (23:17 +0000)]
* m4/macros/check_varargs_macros.m4: rewrite macro so it'll
try and compile the varargs test, not just cpp it.  Some systems
pass the old cpp test, but not when you actually try to compile
the code (Tru64's cc).

19 years ago* conf/autofs/autofs_solaris_v1.h: redefine
Erez Zadok [Fri, 7 Oct 2005 22:28:12 +0000 (22:28 +0000)]
* conf/autofs/autofs_solaris_v1.h: redefine
autofs_strdup_space_hack as a macro to str3cat(NULL,(s)," ","").
This works everywhere and we avoid linking problems, inline
functions, etc.

* conf/autofs/autofs_solaris_v1.c (autofs_mount_fs): remove
autofs_strdup_space_hack() function altogether.

19 years ago* m4/macros/os_cflags.m4: remove hack that hardcodes pte_t=u_int.
Erez Zadok [Fri, 7 Oct 2005 21:25:01 +0000 (21:25 +0000)]
* m4/macros/os_cflags.m4: remove hack that hardcodes pte_t=u_int.

* configure.in: test for <sys/immu.h> header.
Test for pte_t, but only on IRIX6 systems.

* Makefile.am (EXTRA_DIST_M4): distribute new type_pte_t.m4 file.

* m4/macros/type_pte_t.m4: new test for existence of pte_t
typedef, needed on some IRIX-6.5/gcc systems.

19 years ago* m4/macros/header_templates.m4: add missing templates for
Erez Zadok [Fri, 7 Oct 2005 20:34:19 +0000 (20:34 +0000)]
* m4/macros/header_templates.m4: add missing templates for
HAVE_EXTERN_GETDTABLESIZE, HAVE_EXTERN_GETWD, and
HAVE_EXTERN_UALARM.

19 years ago* amd/Makefile.am (amd_LDADD, sun2amd_LDADD): put libaminfo.a
Erez Zadok [Fri, 7 Oct 2005 20:16:29 +0000 (20:16 +0000)]
* amd/Makefile.am (amd_LDADD, sun2amd_LDADD): put libaminfo.a
before libamu.la.  Some linkers (e.g., IRIX-6.5) incorrectly
complain about undefined symbols.

19 years ago* amd/info_exec.c (exec_map_open): break assignment from inside
Erez Zadok [Fri, 7 Oct 2005 20:05:21 +0000 (20:05 +0000)]
* amd/info_exec.c (exec_map_open): break assignment from inside
conditional, to work around an IRIX-6.5 cc bug.

* amd/Makefile.am (amd_LDADD): put libaminfo.a before libamu.la.
Some linkers (e.g., IRIX-6.5) incorrectly complain about undefined
symbols.

19 years ago* fsinfo/fsi_util.c (set_ether_if), amd/map.c (unmount_mp),
Erez Zadok [Fri, 7 Oct 2005 18:55:29 +0000 (18:55 +0000)]
* fsinfo/fsi_util.c (set_ether_if), amd/map.c (unmount_mp),
libamu/xutil.c (expand_error), libamu/strutil.c (xsnprintf): avoid
comparison between signed and unsigned integers.

19 years agostandard usage and formatting
Erez Zadok [Fri, 7 Oct 2005 17:24:16 +0000 (17:24 +0000)]
standard usage and formatting

19 years ago* conf/autofs/autofs_solaris_v1.h, conf/autofs/autofs_solaris_v1.c
Erez Zadok [Fri, 7 Oct 2005 17:15:36 +0000 (17:15 +0000)]
* conf/autofs/autofs_solaris_v1.h, conf/autofs/autofs_solaris_v1.c
(autofs_strdup_space_hack): move "space_hack" function from static
inline in header, into the only source file that needs it.  This
is cleaner and also prevents linking problem with some compilers
that won't apply CPP macros inside static inline functions (for
the strl* functions).

19 years ago* amq/pawd.c (find_mt, find_mlp): remove obsolete, inefficient
Erez Zadok [Fri, 7 Oct 2005 16:39:12 +0000 (16:39 +0000)]
* amq/pawd.c (find_mt, find_mlp): remove obsolete, inefficient
code.
(transform_dir): call the new, efficient amqproc_pawd_1() routine.

* amq/amq_clnt.c (amqproc_pawd_1): AMQPROC_PAWD wrapper routine.

* amq/amq.h (amqproc_pawd_1): extern for amq's AMQPROC_PAWD
wrapper routine.

* amd/amq_svc.c (amq_program_1): dispatch point for
amqproc_pawd_1_svc.

* amd/amq_subr.c (amqproc_pawd_1_svc): moved pawd's path-matching
functionality into Amd, where it can be done a lot more
efficiently.  We don't have to construct and ship a whole export
tree from Amd to pawd.  We just get a variable-length
xdr_wrapstring for the user's path, iterate over the entire export
list inside Amd, and return only a matched string if found
(otherwise we return "" to indicate that there was no match, and
let pawd printf the same string it sent over).

* amd/amd.h: extern for amqproc_pawd_1_svc, amd's service routine
the AMQPROC_PAWD RPC.

* amq/pawd.c (transform_dir): was using UDP only.  Now will also
try TCP if UDP failed.  Destroy client after use to avoid leftover
TCP sockets in the kernel.

19 years ago* ltmain.sh, m4/macros/libtool.m4: update to libtool-1.5.20.
Erez Zadok [Fri, 7 Oct 2005 03:53:16 +0000 (03:53 +0000)]
* ltmain.sh, m4/macros/libtool.m4: update to libtool-1.5.20.
Fixes Tru64 bugs when using ksh.

19 years ago* amd/amfs_toplvl.c (amfs_toplvl_mount): break complex ifdef macro
Erez Zadok [Fri, 7 Oct 2005 03:44:59 +0000 (03:44 +0000)]
* amd/amfs_toplvl.c (amfs_toplvl_mount): break complex ifdef macro
into two sections, to workaround a C99 varargs-macro bug in
gcc-3.2.2 (RH9).

19 years ago* libamu/wire.c (print_wires): convert argument-less xsnprintf to
Erez Zadok [Fri, 7 Oct 2005 01:40:03 +0000 (01:40 +0000)]
* libamu/wire.c (print_wires): convert argument-less xsnprintf to
xstrlcpy.

* include/am_utils.h: use new HAVE_C99_VARARGS_MACROS or
HAVE_GCC_VARARGS_MACROS to pass file name and line number to
xsnprintf/xvsnprintf.

* libamu/strutil.c (xsnprintf, xvsnprintf): if debugging is on,
then also print the source file name and line number that called
xsnprintf/xvsnprintf with a buffer that wasn't large enough (most
likely an am-utils bug).

* Makefile.am (EXTRA_DIST_M4): distribute new
check_varargs_macros.m4 file.

* configure.in: execute new AMU_VARARGS_MACROS test.

* m4/macros/check_varargs_macros.m4: new test to check what style
of variable-length argument macros, if any, does the
compiler/pre-processor supports.

19 years ago* conf/autofs/autofs_solaris_v2_v3.c (autofs_lookup_2_req)
Erez Zadok [Fri, 7 Oct 2005 00:20:13 +0000 (00:20 +0000)]
* conf/autofs/autofs_solaris_v2_v3.c (autofs_lookup_2_req)
conf/autofs/autofs_solaris_v1.c (autofs_mount_1_req), amd/opts.c,
amd/nfs_subr.c (nfsproc_lookup_2_svc), amd/nfs_start.c
(mount_automounter), amd/get_args.c (get_args), amd/amfs_toplvl.c,
amd/amfs_auto.c (amfs_auto_mount), amd/amd.h, amd/amd.c (main):
use sizeof() instead of fixed SIZEOF_* macros.

19 years ago* libamu/strutil.c (xstrlcat, xstrlcpy), include/am_utils.h
Erez Zadok [Thu, 6 Oct 2005 21:11:54 +0000 (21:11 +0000)]
* libamu/strutil.c (xstrlcat, xstrlcpy), include/am_utils.h
(DEBUG): if debugging is on, then also print the source file name
and line number that called xstrl* with a buffer that wasn't large
enough (most likely an am-utils bug)

19 years agotypo that hpux-cc caught
Erez Zadok [Thu, 6 Oct 2005 20:33:42 +0000 (20:33 +0000)]
typo that hpux-cc caught

19 years ago* include/am_compat.h (INADDR_NONE): define in a common location,
Erez Zadok [Thu, 6 Oct 2005 20:18:15 +0000 (20:18 +0000)]
* include/am_compat.h (INADDR_NONE): define in a common location,
if OS doesn't have it, use 0xffffffffU which should work with any
ANSI compiler.

* fixmount/fixmount.c, libamu/wire.c: remove local definition of
INADDR_NONE.

* amd/amfs_toplvl.c (amfs_toplvl_mount), amd/amfs_auto.c
(amfs_auto_mount): use common SIZEOF_OPTS in definition and call
to autofs_get_opts.

* amd/amd.h (SIZEOF_OPTS): moved #define to common header.

* amd/opts.c (expand_op): Need to check BUFSPACE for env for
vlen+1.  Likewise for cp and strlen(cp)+1.

* amd/amfs_toplvl.c (amfs_toplvl_mount) [HAVE_FS_AUTOFS]: Pass new
size argument to autofs_get_opts.

19 years ago* amq/pawd.c (transform_dir): use TCP first, else UDP. Destroy
Erez Zadok [Thu, 6 Oct 2005 01:06:51 +0000 (01:06 +0000)]
* amq/pawd.c (transform_dir): use TCP first, else UDP.  Destroy
client after use to avoid leftover TCP sockets in the kernel.

19 years ago* libamu/hasmntopt.c (amu_hasmntopt): increase size of MNTMAXSTR
Erez Zadok [Wed, 5 Oct 2005 23:33:01 +0000 (23:33 +0000)]
* libamu/hasmntopt.c (amu_hasmntopt): increase size of MNTMAXSTR
from 128 to to 256, because some users have really long option
strings.  Suggestion from jon+amd-at-spock.org.

19 years ago* amd/opts.c (expand_op): should check BUFSPACE for vlen+1, not
Erez Zadok [Wed, 5 Oct 2005 07:52:25 +0000 (07:52 +0000)]
* amd/opts.c (expand_op): should check BUFSPACE for vlen+1, not
just vlen.  Bug discovered when started using xstrlcpy().

* ALL: convert from using strcat to the safer xstrlcat, and from
strcpy to safer xstrlcpy.

* hlfsd/hlfsd.h: remove old fatalerror() and ERRM macros.

* hlfsd/hlfsd.c (fatalerror): new function instead of macro.
Easier to use xstrlcat in this new function.

* amd/amd.h, include/am_utils.h, amd/amd.c: moved 'hostd' extern
from am_utils.h to amd.h, and define its size as a macro that
could be passed to xstrl*().

19 years ago* ALL: convert from using sprintf to the safer xsnprintf.
Erez Zadok [Wed, 5 Oct 2005 01:13:45 +0000 (01:13 +0000)]
* ALL: convert from using sprintf to the safer xsnprintf.

* mk-amd-map/Makefile.am (LDADD): link with libamu to get
xsnprintf().

* amd/amd.h, amd/amd.c, include/am_utils.h: moved pid_fsname
extern from am_utils.h to amd.h, and define its size as a macro
that could be passed to xsnprintf().

19 years ago* libamu/Makefile.am: use strutil.c, not util.c. before-xstr
Erez Zadok [Mon, 3 Oct 2005 01:01:10 +0000 (01:01 +0000)]
* libamu/Makefile.am: use strutil.c, not util.c.

* libamu/strutil.c: rename from util.c to explain better purpose
of file.  Move xvsnprintf and xsnprintf from xutil.c to this file.

* libamu/xutil.c: explain purpose of file.  Move mkdirs/rmdirs
code from old util.c.

19 years ago* m4/macros/header_templates.m4: templates for FFS.
Erez Zadok [Sat, 1 Oct 2005 06:48:08 +0000 (06:48 +0000)]
* m4/macros/header_templates.m4: templates for FFS.

* m4/macros/check_mnttab_type.m4: on BSD44 systems, check for file
system mount table name via the MOUNT_* mount(2) macros (because
BSD44 keeps the mount table in the kernel).

* configure.in: synchronise order of searching for mnttab entries
and mount names.  The new order is "ext3 ext2 ffs ufs 4.2 4.3 4.4
efs xfs jfs ultrix" (which would prefer ffs on BSD44 instead of
ufs, and ext3 instead of ext2 on Linux).

19 years ago* fsinfo/fsi_util.c (set_ether_if): use INADDR_NONE instead of
Erez Zadok [Sat, 1 Oct 2005 05:43:38 +0000 (05:43 +0000)]
* fsinfo/fsi_util.c (set_ether_if): use INADDR_NONE instead of
hard-coded value of -1.

* include/amq_defs.h (AMQ_STRLEN): increase default size from 2KB
to 16KB.  We can afford it these days.

* libamu/strcasecmp.c (strcasecmp): use unsigned chars in
tolower() to avoid sign/size promotion bugs.

* libamu/xutil.c (switch_to_logfile): don't output to LOG_CONS by
default (it's unfriendly).  If user really wants to, they can set
it in /etc/syslog.conf.

19 years ago* include/am_defs.h: include <sys/statvfs.h> if it exists.
Erez Zadok [Sat, 1 Oct 2005 05:26:55 +0000 (05:26 +0000)]
* include/am_defs.h: include <sys/statvfs.h> if it exists.

* conf/nfs_prot/nfs_prot_netbsd1_4.h: NetBSD 3 has both statfs()
and statvfs(), but the latter is preferred, so #define to use
statvfs.

* configure.in: check for statfs(), statvfs(), and
<sys/statvfs.h>.

* config.guess.long: strip trailing '.' on "netbsdelf3.0."
(Beta).  Workaround for bug in config.guess.

* config.{guess,sub}: update to latest versions.

19 years agoupdates from latest GNU versions
Erez Zadok [Sat, 1 Oct 2005 05:17:00 +0000 (05:17 +0000)]
updates from latest GNU versions

19 years ago* amq/pawd.c (find_mt): if the auto mount type is used, pawd could
Erez Zadok [Fri, 30 Sep 2005 03:41:54 +0000 (03:41 +0000)]
* amq/pawd.c (find_mt): if the auto mount type is used, pawd could
go into an infinite loop since the mt_directory and mt_mountpoint
fields are the same for auto mounts.  Solution: ignore type auto
mounts, similar to toplvl.  Bug fix from Jonathan Chen
<jon+amd@spock.org>.

19 years ago* README.attrcache: document test-attrcache script.
Erez Zadok [Fri, 30 Sep 2005 02:50:26 +0000 (02:50 +0000)]
* README.attrcache: document test-attrcache script.

* scripts/Makefile.am (noinst_SCRIPTS): build test-attrcache
script.

* configure.in: build scripts/test-attrcache script and chmod it
so it can be executed in place.

* scripts/test-attrcache.in: script to test the NFS attribute
cache using Amd.

19 years agocomment space
Erez Zadok [Mon, 26 Sep 2005 06:02:56 +0000 (06:02 +0000)]
comment space

19 years ago* hlfsd/stubs.c (nfsproc_getattr_2_svc, nfsproc_lookup_2_svc,
Erez Zadok [Mon, 26 Sep 2005 05:17:11 +0000 (05:17 +0000)]
* hlfsd/stubs.c (nfsproc_getattr_2_svc, nfsproc_lookup_2_svc,
nfsproc_readlink_2_svc, nfsproc_readdir_2_svc), hlfsd/hlfsd.c
(hlfsd_init): use new clocktime() function.

19 years agoNEWS update
Erez Zadok [Mon, 19 Sep 2005 04:46:14 +0000 (04:46 +0000)]
NEWS update

19 years ago* README.attrcache: document netbsd's patchs to support noac.
Erez Zadok [Mon, 19 Sep 2005 04:00:57 +0000 (04:00 +0000)]
* README.attrcache: document netbsd's patchs to support noac.

19 years ago* README.attrcache: document netbsd's patch to support noac.
Erez Zadok [Mon, 19 Sep 2005 03:36:21 +0000 (03:36 +0000)]
* README.attrcache: document netbsd's patch to support noac.

19 years ago* libamu/mount_fs.c (compute_nfs_attrcache_flags): cleanup the
Erez Zadok [Mon, 19 Sep 2005 02:53:30 +0000 (02:53 +0000)]
* libamu/mount_fs.c (compute_nfs_attrcache_flags): cleanup the
code that sets the ac{reg,dir}{min,max} fields so it also sets the
appropriate nfs_args->flags such as MNT2_NFS_OPT_ACREGMIN.

* configure.in: check for nfs_args fields acregmax and acdirmax.

Update status of freebsd and openbsd.

19 years agofreebsd version typo
Erez Zadok [Sun, 18 Sep 2005 23:22:44 +0000 (23:22 +0000)]
freebsd version typo

19 years agotypos
Erez Zadok [Sun, 18 Sep 2005 22:51:47 +0000 (22:51 +0000)]
typos

19 years agotypos
Erez Zadok [Sun, 18 Sep 2005 22:44:12 +0000 (22:44 +0000)]
typos

19 years ago* README.attrcache: new file documenting in detail OS bugs
Erez Zadok [Sun, 18 Sep 2005 21:56:55 +0000 (21:56 +0000)]
* README.attrcache: new file documenting in detail OS bugs
relating to attribute caching, which can affect Amd's reliability
under heavy load.

* doc/Makefile.am: install README.attrcache file as attrache.txt
file on am-utils Web site.

* Makefile.am (EXTRA_DIST): include README.attrcache in distro.

* BUGS, NEWS, doc/am-utils.texi (auto_attrcache Parameter),
scripts/amd.conf.5, scripts/amd.conf-sample: document attribute
cache bugs on some OSs.

19 years ago* libamu/xutil.c (clocktime): newly implemented routine. Uses after-clocktime-fixes
Erez Zadok [Sat, 17 Sep 2005 22:16:36 +0000 (22:16 +0000)]
* libamu/xutil.c (clocktime): newly implemented routine.  Uses
gettimeofday() each time to return a high-resolution clock time,
and does not "cache" the last time.  Returns time in seconds, just
like the old implementation.  If passed a non-null argument, will
fill it in with the current time in seconds+microseconds.

* libamu/xutil.c: remove actual declaration of clock_valid, and
another never-used declaration for xclock_valid.

* include/am_utils.h: remove defunct definition of clocktime()
macro and clock_valid variable.  Add extern for new definition.

* libamu/mount_fs.c (mount_fs), hlfsd/homedir.c (homedir,
hlfsd_diskspace, hlfsd_getpwent, plt_reset, table_add),
hlfsd/hlfsd.c (main, hlfsd_init, reload, cleanup),
conf/mtab/mtab_mach3.c (open_locked_mtab), conf/mtab/mtab_file.c
(open_locked_mtab), amd/nfs_start.c (do_select, run_rpc),
amd/autil.c (host_normalize): remove defunct clock_valid.

* amd/nfs_subr.c (nfsproc_getattr_2_svc): Print microseconds for
node's mtime.
(fh_to_mp3): use new clocktime() to update mtime and get a better
time resolution.

* amd/mapc.c (mapc_reload_map): change prototype from returning
void to returning an int.  If reloading was needed and succeeded,
return 1; else return 0.
(mapc_sync): update mtime of parent node if needed.  This is a
CRITICAL FIX, to ensure that the kernel flushes its DNLC/dcache
when we run "amq -f" manually or when a map is reloaded.

* amd/map.c (new_ttl): update am_ttl and na_atime in one shot.
(init_map): use new clocktime().
(unmount_mp): if the OS doesn't support a "symttl" option, then
update the mtime of the parent node using the clocktime(); but if
the time hasn't gotten changed because of rapid Amd accesses on
systems that don't have a micro-second NFS-client resolution, then
increment mtime by one arbitrarily (this could, on some systems
and under pathological cases, result in mtime's that are in the
future).

* amd/autil.c (forcibly_timeout_mp): MAJOR BUG FIX: force mtime
update of parent dir, to prevent DNLC/dcache from caching the old
entry, which could result in ESTALE errors, bad symlinks, and
more.
(am_mounted): record mount time, and update am_stats at the same
time, using the double-action redone clocktime() routine.
(am_mounted): update parent's mtime from that of the child.
(am_unmounted): when unmounting an entry, update mtime of parent
node.

* amd/amfs_generic.c (amfs_bgmount): now that clocktime() doesn't
remember it's last non-zero value, save it in a temporary variable
to avoid a TOCTOU problem (between an "if" and a "dlog").

* libamu/xutil.c (show_time_host_and_name),
conf/autofs/autofs_linux.c (autofs_mounted, autofs_timeout_mp),
amd/srvr_nfs.c (nfs_keepalive_callback, nfs_keepalive_timeout)
(find_nfs_srvr), amd/rpc_fwd.c (fwd_alloc), amd/nfs_subr.c
(nfsproc_getattr_2_svc), amd/nfs_start.c (do_select, run_rpc),
amd/mapc.c (root_init), amd/map.c(map_flush_srvr, timeout_mp),
amd/info_ndbm.c (ndbm_init), amd/info_ldap.c (amu_ldap_rebind),
amd/info_file.c (file_open), amd/info_exec.c (fgets_timed,
exec_search), amd/clock.c (timeout, softclock), amd/autil.c
(forcibly_timeout_mp), amd/amfs_generic.c (amfs_retry,
amfs_bgmount, amfs_generic_mount_child), amd/amd.c (main): pass
NULL to clocktime().

19 years ago* amd/nfs_subr.c (nfsproc_getattr_2_svc): initialize 'retry', just before-clocktime-fixes
Erez Zadok [Thu, 15 Sep 2005 23:12:56 +0000 (23:12 +0000)]
* amd/nfs_subr.c (nfsproc_getattr_2_svc): initialize 'retry', just
in case.
(fh_to_mp3): increment amd_stats.d_stale counter only if we are
actually returning ESTALE.

* amd/info_exec.c (exec_parse_qanswer), amd/info_file.c
(file_search_or_reload), amd/info_hesiod.c (hesiod_search),
amd/info_ldap.c (amu_ldap_search), amd/info_ndbm.c (search_ndbm),
amd/info_nis.c (nis_search), amd/info_nisplus.c (nisplus_search,
nisplus_search): don't dereference mnt_map->cfm which may be null
if we're not using an amd.conf file.

* libamu/xutil.c (unregister_amq): if failed to de-register Amd
from portmapper, report it under dlog (debugging), not as an
annoying plog that always shows up.

19 years agocast fixes for isFOO
Erez Zadok [Wed, 14 Sep 2005 14:14:37 +0000 (14:14 +0000)]
cast fixes for isFOO

19 years ago* mk-amd-map/mk-amd-map.c (read_file_file), libamu/util.c
Erez Zadok [Wed, 14 Sep 2005 02:53:09 +0000 (02:53 +0000)]
* mk-amd-map/mk-amd-map.c (read_file_file), libamu/util.c
(strsplit), libamu/hasmntopt.c (nextmntopt), amd/sun_map.c
(sun_entry2amd), amd/sun2amd.c (sun2amd_convert_convert),
amd/mapc.c (mapc_add_kv), amd/info_file.c (file_search_or_reload),
amd/info_exec.c (exec_parse_qanswer): cast isspace() arg to
unsigned char, which is safer as per Christos.

19 years agono trailing whitespaces
Erez Zadok [Wed, 14 Sep 2005 00:27:55 +0000 (00:27 +0000)]
no trailing whitespaces

19 years ago* amd/sun_map.c (sun_entry2amd): isspace takes an int, not a char.
Erez Zadok [Wed, 14 Sep 2005 00:26:42 +0000 (00:26 +0000)]
* amd/sun_map.c (sun_entry2amd): isspace takes an int, not a char.

* configure.in: keep a dummy unused AM_PROG_LEX, because old
Automake (1.6.3) looks for it if you refer to LEX in your
Makefile.am files.  Silly thing, fixed in newer versions of
Automake (1.9.2).

19 years ago* Makefile.am (EXTRA_DIST_M4): add prog_{lex,yacc}.m4 to distro.
Erez Zadok [Sun, 11 Sep 2005 19:06:40 +0000 (19:06 +0000)]
* Makefile.am (EXTRA_DIST_M4): add prog_{lex,yacc}.m4 to distro.

* configure.in: use new macros AMU_PROG_YACC and AMU_PROG_LEX.

* m4/macros/prog_yacc.m4: new macro to check if bison/yacc/byacc
exist, but exist with an error if none found.

* m4/macros/prog_lex.m4: new macro to check if f/lex exist, but
exit with an error if not found (am-utils requires f/lex).

19 years ago* minor new port: powerpc-apple-darwin8.2.0.
Erez Zadok [Thu, 8 Sep 2005 02:36:55 +0000 (02:36 +0000)]
* minor new port: powerpc-apple-darwin8.2.0.

* m4/macros/type_auth_create_gidlist.m4: Old macosx used "gid_t"
but all newer ones (10.4+) use int.

* m4/macros/type_recvfrom_fromlen.m4: Old macosx used "int" for
6th arg of recvfrom(), but all newer ones (10.4+) use socklen_t.

19 years ago* minor new port: i386-pc-linux-deb3.1.
Erez Zadok [Wed, 7 Sep 2005 23:39:30 +0000 (23:39 +0000)]
* minor new port: i386-pc-linux-deb3.1.

* conf/mount/mount_linux.c: If autoconf didn't find any disk-based
file system on this system (probably because /proc isn't mounted),
then provide some default definition for this file to compile.

19 years ago* amd/amd.h : oops, reverting bad changes
Daniel Ottavio [Mon, 29 Aug 2005 03:42:31 +0000 (03:42 +0000)]
* amd/amd.h : oops, reverting bad changes

* amd/info_file.c : oops, reverting bad changes

* amd/mapc.c : oops, reverting bad changes

* amd/sun_map_parse.y : oops, reverting bad changes

19 years ago* amd/sun_map.c (sun_entry2amd) : Wipe out any trailing white
Daniel Ottavio [Mon, 29 Aug 2005 03:24:25 +0000 (03:24 +0000)]
* amd/sun_map.c (sun_entry2amd) : Wipe out any trailing white
spaces or 'n' before passing strings to the parser.

19 years ago* libamu/xutil.c: amd_program_number is a u_long now.
Erez Zadok [Sun, 28 Aug 2005 00:37:17 +0000 (00:37 +0000)]
* libamu/xutil.c: amd_program_number is a u_long now.
(unregister_amq): if pmap_unset failed to de-register Amd from the
portmapper, print an error message.
(get_amd_program_number): returns a u_long now.
(set_amd_program_number): take a u_long now.

* include/am_utils.h: get_amd_program_number() returns u_long now.
set_amd_program_number() takes a u_long now.

* amq/amq.c: amd_program_number is a u_long, not int.

* amd/nfs_start.c (mount_automounter): when registering Amd with
the portmapper (for Amq service), don't fail if just one of TCP or
UDP failed to register, but only if both transports failed.  That
way Amq can still contact Amd using the transport that did
register correctly.  However, now, if both transports failed to
register, then set amd_state to "Done" so it would shutdown
cleanly.

* conf/transp/transp_{sockets,tli{}.c (amu_svc_register): better
comments.

19 years ago* libamu/xutil.c: debug_flags should always be initialized to
Erez Zadok [Sun, 28 Aug 2005 00:18:43 +0000 (00:18 +0000)]
* libamu/xutil.c: debug_flags should always be initialized to
D_CONTROL (amq,daemon,fork).
(debug_option): allow setting initial immutable debug_flags via
amd.conf; afterward, prevent it (i.e., one tries it via "amq -D").

19 years ago* Makefile.am (DISTCLEANFILES): also remove amu_autofs_prot.h,
Erez Zadok [Sun, 28 Aug 2005 00:15:44 +0000 (00:15 +0000)]
* Makefile.am (DISTCLEANFILES): also remove amu_autofs_prot.h,
config.cache.old, and dbgcf.h on "make distclean".
(CLEANFILES): remove dbgcf on plain "make clean".

* amd/Makefile.am (DISTCLEANFILES): also remove ops_autofs.c on
"make distclean".

19 years agono trailing spaces
Erez Zadok [Sun, 28 Aug 2005 00:06:28 +0000 (00:06 +0000)]
no trailing spaces

19 years ago* amd/info_file.c (file_search_or_reload): Changed the key
Daniel Ottavio [Sat, 27 Aug 2005 19:14:18 +0000 (19:14 +0000)]
* amd/info_file.c (file_search_or_reload): Changed the key
variable that is passed to the sun_entry2amd.

* amd/mapc.c (mapc_add_kv): Add support for multiple entries
packed into one line.  This is a workaround for handling Sun style
mounts that contains multiple entries on one line "multi-mount
entries".  The sun2amd conversion tools will convert such entries
into type:=auto and pack each of the auto-entries into one line
separated by 'n'.  The mapc_add_kv function will now recognize
such entries and add then.

* amd/sun2amd.c (sun2amd_convert): Add print statement that
includes the line number during a parser failure.

* sun_map.c: Fix the AMD_MAP_PREF_KW definition.  Fix spelling.
(sun_mountpts2amd): removed this function
(sun_hsfs2amd): added some more comments
(sun_nfs2amd): moved support for multi-mount entries from this
function to sun_multi2amd().
(sun_multi2amd): New function to handle multi-mount entries.  This
function will convert the Sun version to an Amd type:=auto.  Each
extra auto entry will be appended to the same line separated by a
'n'.
(sun_entry2amd): Fixed a bug if-statement.  This function now
checks for multi-mount entries.

* amd/sun_map.h: Add a fstype member to the sun_mountpt struct.

* amd/sun_map_parse.y: Parser now supports fstype for multi-mount
entries.

* amd/sun_map_tok.l: No longer print the line and column number
when parsing.  This is because the parser is handed strings not
files.  Therefore, the line number will always be 1.  It is now up
to the higher level tools to echo line information during error
when they feed the parser.

20 years ago* configure.in: wrap all LDAP and HESIOD tests in test whether
Erez Zadok [Thu, 25 Aug 2005 02:03:29 +0000 (02:03 +0000)]
* configure.in: wrap all LDAP and HESIOD tests in test whether
--with-OPT was used.

Clean up function calls.

20 years ago* amd/sun_map.c: Clean up #defines
Daniel Ottavio [Sat, 20 Aug 2005 19:20:29 +0000 (19:20 +0000)]
* amd/sun_map.c: Clean up #defines
(sun_entry2amd) : Verify that the key and entry values passed are
not NULL.  Free the Sun entry struct when done.

* amd/sun_map.h: Add some "not implemented yet" comments to the
map and mmap structures.

* amd/sun_map_parse.y: Removed automap include functionality, it
will need to be re-implemented using a pre-processor.
Clean up fucntion calls.

20 years agoundo dummy
Erez Zadok [Wed, 17 Aug 2005 04:34:08 +0000 (04:34 +0000)]
undo dummy

20 years ago* amd/sun2amd.c (sun2amd_convert): If the input line is too long
Daniel Ottavio [Wed, 17 Aug 2005 04:12:06 +0000 (04:12 +0000)]
* amd/sun2amd.c (sun2amd_convert): If the input line is too long
don't return an error just null terminate and continue.  Fix bug:
the map key was not written.

* amd/sun_map.c: Add a new Amd device, and cdfs constant.
(sun_locations2amd): Write the NFS type keyword
for each host of the mount entry.  Add a space between each mount
location.
(sun_hsfs2amd): New function to support hsfs to
cdfs.
(sun_nfs2amd): Don't write the nfs type here.  Fix
comments.
(sun_entry2amd): Change function parameter var for
clarity.  Add support for hsfs.

* amd/sun_map_parse.y (sun_map_parse_read): Reset the entry list
after it has been returned.

20 years agodummy
Erez Zadok [Wed, 17 Aug 2005 03:54:10 +0000 (03:54 +0000)]
dummy

20 years agoone-liner vers.m4 file
Erez Zadok [Wed, 17 Aug 2005 03:38:58 +0000 (03:38 +0000)]
one-liner vers.m4 file

20 years agono trailing spaces
Erez Zadok [Tue, 16 Aug 2005 23:45:54 +0000 (23:45 +0000)]
no trailing spaces

20 years ago* amd/get_args.c (get_args): initialize debug_flags if they've
Erez Zadok [Tue, 16 Aug 2005 17:10:39 +0000 (17:10 +0000)]
* amd/get_args.c (get_args): initialize debug_flags if they've
never been set.

20 years ago* amd/mapc.c (mapc_create): mapc find takes 4th arg, the mount
Erez Zadok [Mon, 15 Aug 2005 21:49:44 +0000 (21:49 +0000)]
* amd/mapc.c (mapc_create): mapc find takes 4th arg, the mount
point.  Now, we can properly initialize the cfm structure of the
mnt_map, so we can have access to the flags (e.g., SUN_MAP_SYNTAX)
inside each info_*.c file.
(mapc_find): takes 4rd arg (mntpt) and passes it to calls to
mapc_create.
(root_newmap): pass NULL as 4th arg (mntpt).

* amd/amfs_generic.c (amfs_parse_defaults): remove ugly hack to
initialize map cfm structure (including flags) so late.

* amd/autil.c (amfs_mkcacheref): pass mount point as 4th arg to
mapc_find.

* amd/amfs_root.c (amfs_root_mount): pass NULL as new 4th arg to
mapc_find.

* amd/amd.h: extern for mapc_find changed to pass the mount point.

20 years agoupdate NEWS
Erez Zadok [Mon, 15 Aug 2005 08:20:50 +0000 (08:20 +0000)]
update NEWS

20 years ago* libamu/xutil.c: debug_flags should be unsigned.
Erez Zadok [Mon, 15 Aug 2005 08:05:29 +0000 (08:05 +0000)]
* libamu/xutil.c: debug_flags should be unsigned.
(dbg_opt): fix comments for updated debug_flags, add "defaults".
(debug_option): Don't allow "immutable" (D_IMMUTABLE) flags to be
changed, because they could mess Amd's state and only make sense
to be set once when Amd starts.  Currently these immutable flags
are "daemon," "fork," "amq," and "mtab."  If Amd not compiled with
debugging, set default "control" options (daemon,fork,amq).
(unregister_amq): proper use of D_AMQ.

* include/am_utils.h: define new D_BASIC, D_CONTROL, D_DEFAULT,
D_IMMUTABLE, and D_MASK.  Updated definitions of D_ALL and D_TEST.
debug_flags extern should be unsigned.

* scripts/amd.conf-sample (debug_options): mention new "defaults"
option.

* scripts/amd.conf.5,doc/am-utils.texi: document new debug option
"defaults" and properly explain the corrected meanings of
"daemon," "fork," "amq," and their "no" inversions.  Better
explain "all" and "test" too.  Correct default debug_mtab file to
/tmp/mtab.

* hlfsd/stubs.c (nfsproc_readlink_2_svc): proper use of D_FORK.

* hlfsd/homedir.c (homedir): proper use of D_FORK.

* hlfsd/hlfsd.c (main, hlfsd_init, cleanup): proper use of
D_DAEMON.

* amd/nfs_start.c (mount_automounter): proper use of D_AMQ.

* amd/amd.h (DEBUG_MNTTAB_FILE): change default to /tmp/mtab,
which is more common on more systems (instead of /tmp/mnttab).

* amd/amd.c (main): properly use D_DAEMON.

20 years agoconsistify
Erez Zadok [Mon, 15 Aug 2005 01:57:06 +0000 (01:57 +0000)]
consistify

20 years ago* libamu/xutil.c (xlog_opt): define new pseudo log_option named
Erez Zadok [Mon, 15 Aug 2005 01:54:49 +0000 (01:54 +0000)]
* libamu/xutil.c (xlog_opt): define new pseudo log_option named
"defaults", which is an alias for "fatal,error,user,warning,info".

* scripts/amd.conf.5, doc/am-utils.texi, amd/amd.8: document new
log_option "defaults".

* amq/amq.8: typo.  Arg name for -D is "debug_options" not
"log_options".

20 years agoAdded some comments to sun_map_parse_read().
Daniel Ottavio [Mon, 15 Aug 2005 01:37:33 +0000 (01:37 +0000)]
Added some comments to sun_map_parse_read().

* amd/amd.h: Added an extern from info_file.c called
file_read_line().  Previously this function was static but is now
used in sun2amd.c.

* amd/info_file.c: Changed the static function read_line() to a
public function called file_read_line().  This function is now
used in sun2amd.c

* amd/sun2amd.8: Filled in the contents of this man page.  This is
a conversion utility that converts Sun maps to Amd maps.

* amd/sun2amd.c: Implemented a working version of this utility.

20 years ago* libamu/xutil.c: make xlog_level static, and initialize it to
Erez Zadok [Mon, 15 Aug 2005 01:17:42 +0000 (01:17 +0000)]
* libamu/xutil.c: make xlog_level static, and initialize it to
XLOG_DEFAULT.
(cmdoption): take unsigned int as flags argument, and print any
errors as XLOG_ERROR (which cannot be turned off).
(switch_option): remove old code which disallowed you from turning
off flags that were set when Amd started up.  Now, you can turn
any log option on/off at start time or later on (via amq -x),
other than the two mandatory options (fatal+error).

* include/am_utils.h (XLOG_*): remove unused XLOG_DEFSTR.  Define
XLOG_MASK to mask out unused flag bits.  Define XLOG_DEFAULT to be
what it was before (fatal + error + user + warning + info), but
use the new mask.  Remove extern's for xlog_level and
xlog_level_init.  Change extern for cmdoption() to take an
unsigned flags argument.

* doc/am-utils.texi, amq/amq.8, scripts/amd.conf.5, amd/amd.8:
document mandatory log options
(fatal+error) which cannot be turned off and are always on by
default.  They must be on so that Amd can report crucial errors,
including those related to setting flags on/off.

* hlfsd/hlfsd.c (main): remove hack to initialize log_options.

* wire-test/wire-test.c: remove reference to unused xlog_level.

* amd/mapc.c (mapc_create): 'alloc' flags variable should be
unsigned.

* amd/get_args.c (get_args): no need for hack using
xlog_level_init.

20 years ago* amd/Makefile.am: separate sources common to amd and sun2amd into
Erez Zadok [Mon, 15 Aug 2005 00:22:36 +0000 (00:22 +0000)]
* amd/Makefile.am: separate sources common to amd and sun2amd into
a special, locally-built only, static library called libaminfo.a.

20 years agobetter comment
Erez Zadok [Sun, 14 Aug 2005 23:02:47 +0000 (23:02 +0000)]
better comment

20 years ago* libamu/xutil.c (real_plog, xsnprintf): call new xvsnprintf()
Erez Zadok [Sun, 14 Aug 2005 20:01:13 +0000 (20:01 +0000)]
* libamu/xutil.c (real_plog, xsnprintf): call new xvsnprintf()
wrapper function.
(xvsnprintf): new function which already gets a va_list.  This was
needed to avoid nesting va_list's (which apparently isn't
allowed).

* include/am_utils.h: prototype for new xvsnprintf wrapper.

20 years agoadd vers.m4 file
Erez Zadok [Sun, 14 Aug 2005 19:42:24 +0000 (19:42 +0000)]
add vers.m4 file

20 years ago* configure.in: sinclude([vers.m4]) version number file.
Erez Zadok [Sun, 14 Aug 2005 15:33:15 +0000 (15:33 +0000)]
* configure.in: sinclude([vers.m4]) version number file.

* vers.m4: new file to separate version number out of
configure.in, useful for nightly snapshot script to generate
nightly version string.

* Makefile.am (EXTRA_DIST_M4): include vers.m4 in distro.

The function sun_entry2amd's parameters were expanded to include

20 years ago* amd/info_file.c: add key to sun_entry2amd()'s parameters
Daniel Ottavio [Sun, 14 Aug 2005 04:46:10 +0000 (04:46 +0000)]
* amd/info_file.c: add key to sun_entry2amd()'s parameters

* amd/info_hesiod.c: add key to sun_entry2amd()'s parameters

* amd/info_ldap.c: add key to sun_entry2amd()'s parameters

* amd/info_ndbm.c: add key to sun_entry2amd()'s parameters

* amd/info_nis.c: add key to sun_entry2amd()'s parameters

* amd/info_nisplus.c: add key to sun_entry2amd()'s parameters

* amd/sun_map.c: New functions to support sun translation to amd.
The function sun_entry2amd's parameters where expanded to include
the key value.  sun_entry_2amd() now returns NULL on error.

* amd/sun_map.h: Expand sun_entry2amd's parameters to include key
value.

* amd/sun_map_parse.y: Change how file system types are parsed out
of the list of options for each entry.  The previous way was not
working properly so now we just look for the 'fstype' keyword in
each option.  If it exists we copy its key value.

20 years ago* amd/sun_map_parse.y: instead of using a custom FOO_alloc()
Erez Zadok [Fri, 12 Aug 2005 02:28:38 +0000 (02:28 +0000)]
* amd/sun_map_parse.y: instead of using a custom FOO_alloc()
function, use Amd's CALLOC(struct FOO) macro.

* amd/sun_map.h: remove extern definitions to functions no longer
needed.

* amd/sun_map.c: removed superfluous *_alloc() functions, some of
which caused conflicts with same-named symbols in the parser
(since we rename 'yyalloc' to 'sun_map_alloc').

20 years ago* configure.in: keep AC_INIT on same line, for nightly snapshot
Erez Zadok [Thu, 11 Aug 2005 17:38:37 +0000 (17:38 +0000)]
* configure.in: keep AC_INIT on same line, for nightly snapshot
build script.

20 years ago* amd/Makefile.am: f/lex libraries are incompatible with multiple
Erez Zadok [Thu, 11 Aug 2005 10:44:52 +0000 (10:44 +0000)]
* amd/Makefile.am: f/lex libraries are incompatible with multiple
scanners, so don't link Amd with libl.a/libfl.a.

20 years ago* amd/sun_map_tok.l: Clean up regular expression so HPUX stops
Daniel Ottavio [Thu, 11 Aug 2005 02:21:46 +0000 (02:21 +0000)]
* amd/sun_map_tok.l: Clean up regular expression so HPUX stops
whining.

20 years ago* amd/sun_map_parse.y: Moved license below special yacc bracket to
Daniel Ottavio [Wed, 10 Aug 2005 01:39:19 +0000 (01:39 +0000)]
* amd/sun_map_parse.y: Moved license below special yacc bracket to
be portable with HPUX's yacc.  Clean up externs.

* amd/sun_map_tok.l: Moved license below special lex bracket to be
portable with HPUX's lex.  Fixed definitions to allow for a
non-flex lex to parse strings instead of files.  Added some casts
to strlcpy usage to silence warnings.  Moved the % options because
HPUX was complaining,

20 years ago* amd/sun_map_tok.l: Applied some definition goop to handle the
Daniel Ottavio [Tue, 9 Aug 2005 03:28:00 +0000 (03:28 +0000)]
* amd/sun_map_tok.l: Applied some definition goop to handle the
ECHO symbol that lex defines.  This symbol causes problems on
RedHat-EL-powerPC platforms.  Replaced strncpy with strlcpy.
Renamed the function sun_map_yyinput to sun_map_input.  This
function is a utility function that is not generated by lex.
Therefore, the 'yy' may cause confusion.

 LocalWords:  Erez

20 years ago* amd/sun_map_tok.l: allocate more output slots so lex scanners
Erez Zadok [Mon, 8 Aug 2005 19:36:45 +0000 (19:36 +0000)]
* amd/sun_map_tok.l: allocate more output slots so lex scanners
don't run out of memory.

* amd/sun_map_parse.y: declare extern for sun_map_parse().

* libamu/xutil.c (xsnprintf): ensure proper comparisons between
signed and unsigned quantities.

20 years ago* libamu/util.c, amd/autil.c (strsplit): moved strsplit() function
Erez Zadok [Sun, 7 Aug 2005 03:43:19 +0000 (03:43 +0000)]
* libamu/util.c, amd/autil.c (strsplit): moved strsplit() function
from Amd code to to libamu, so sun2amd could use it.

* amd/Makefile.am (sbin_PROGRAMS): build sun2amd binary and man
page.
(EXTRA_sun2amd_OBJECTS): sun2amd needs to link with all info_*.c files

* amd/sun2amd.8: placeholder for man page.

* amd/sun2amd.c: placeholder for C version of translator from Sun
syntax maps to Amd maps.

* */*.[0-9]: include file name in nroff source comment.

20 years ago* ALL: use '0' properly when assigning or passing it to functions.
Erez Zadok [Sun, 7 Aug 2005 03:03:41 +0000 (03:03 +0000)]
* ALL: use '0' properly when assigning or passing it to functions.
If in the context pointer, use NULL.  If in the context of a
single char (say within a string), the use '0'.  This is just to
make the code clearer.