-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathChangeLog
12025 lines (8165 loc) · 424 KB
/
ChangeLog
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
2006-05-11 Erez Zadok <[email protected]>
*******************************************************************
*** Released am-utils-6.1.5 ***
*******************************************************************
2006-05-10 Erez Zadok <[email protected]>
* Minor new ports: i386-unknown-freebsd6.1 (RELEASE)
powerpc-apple-darwin8.6.0, and i386-unknown-openbsd3.9.
* libamu/mount_fs.c (compute_nfs_attrcache_flags): fix signedness
problems on IRIX-6.5.
* conf/autofs/autofs_solaris_v1.c (xdr_umntrequest): fix
signedness problems on IRIX-6.5.
2006-05-01 Erez Zadok <[email protected]>
* configure.in: check if libc already includes dbm functionality
(as in FreeBSD 6), then don't bother to check specific libraries
such as libdbm, gdbm, etc.
2006-04-21 Erez Zadok <[email protected]>
* configure.in: detect G/DBM support via gdbm_compat library
(Debian 3.1).
* minor new port: powerpc-apple-darwin8.5.0
2006-04-20 Erez Zadok <[email protected]>
* scripts/amd.conf-sample, scripts/amd.conf.5, doc/am-utils.texi,
NEWS: document new nfs_allow_any_interface parameter.
* include/am_compat.h (INADDR_LOOPBACK): define INADDR_LOOPBACK if
not defined, since some systems don't have it.
2006-04-20 Nick Williams <[email protected]>
* libamu/wire.c (is_interface_local): new boolena function to
determine if address represents any of the local interfaces.
(getwire): more properly check if address equals INADDR_LOOPBACK,
not if IFF_LOOPBACK is not (the latter isn't as correct).
* include/am_utils.h: extern for new is_interface_local() function.
* conf/transp/transp_{sockets,tli}.c: don't define INADDR_LOOPBACK
here but in am_compat.h
* amd/nfs_prot_svc.c (nfs_program_2): if
nfs_allow_any_interface=yes, then allow NFS packets from any local
interface (not just 127.0.0.1).
* amd/conf.c (gopt_nfs_allow_any_interface): implement the new
amd.conf parameter nfs_allow_any_interface.
* amd/amd.h (CFM_NFS_ANY_INTERFACE): define new global flag when
al interfaces are acceptable for local NFS packets.
2006-04-18 Christos Zoulas <[email protected]>
* amd/opts.c: Add support for optionally specifying the hostname
to match against the netgroup in the netgrp and netgrpd selectors.
2006-04-16 Erez Zadok <[email protected]>
* libamu/mtab.c (hasmntval): fix inverted meaning of error from
hasmntvalerr().
2006-04-14 Erez Zadok <[email protected]>
* libamu/mount_fs.c (compute_nfs_attrcache_flags): use new
hasmntvalerr() function to set attribute cache values only if they
were set (regardless whether they were set to zero or a non-zero
value). Before, we were unable to distinguish between an error to
parse an option, and a user who actually wanted to set an
attribute-cache value to 0. This now fixes an important
performance bug that Amd was turning off the attribute caches even
for regular (non-automounter) NFS mounts.
* libamu/mtab.c (hasmntvalerr): new function to set the value of
an option into an integer, but ONLY if that options was set and
parsed correctly. This function returns 1 on error, 0 on success
(instead of always setting the option value to 0).
(hasmntval): wrapper function around hasmntvalerr, which maintains
backwards compatibility (always sets option value to 0, even on
error to parse the option).
* amd/nfs_subr.c (fh_to_mp3): use long int printf format for
fhh_pid.
2006-04-05 Christos Zoulas <[email protected]>
* amd/amfs_generic.c (amfs_lookup_mntfs): fix use-after-free bug
(Coverity).
2006-03-27 Erez Zadok <[email protected]>
* doc/am-utils.texi, scripts/{amd.conf.5,amd.conf-sample}:
document new nfs_retransmit_counter_toplvl and
nfs_retry_interval_toplvl global amd.conf parameters.
* amd/conf.c (gopt_nfs_retransmit_counter_toplvl,
(gopt_nfs_retry_interval_toplvl): parse amd.conf
nfs_retransmit_counter_toplvl and nfs_retry_interval_toplvl global
parameters.
* amd/amfs_toplvl.c (amfs_toplvl_mount): support setting toplvl
timeo/retrans parameters for Amd's toplvl mounts, separately from
all other UDP or NFS mounts.
* amd/amd.h: define a new timeo/retrans parameter for toplvl
mounts.
2006-03-22 Erez Zadok <[email protected]>
* minor new port: i386-pc-linux-suse10.1 (beta 8).
2006-03-21 Christos Zoulas <[email protected]>
* amd/am_ops.c (merge_opts): Remove useless check found by
Coverity; xmalloc never returns NULL.
2006-03-21 Erez Zadok <[email protected]>
* minor new ports: i386-pc-linux-fc5.
* amd/info_ldap.c: as of Linux Fedora Core 5 (which comes with
openldap-2.3.9), the ldap.h headers deprecate several functions
used in this file, such as ldap_unbind. You get compile errors
about missing extern definitions. Those externs are still in
<ldap.h>, but surrounded by an ifdef LDAP_DEPRECATED. I am
turning on that ifdef at the top of info_ldap.c, under the
assumption that the functions may be deprecated, but they still
work for this (older?) version of the LDAP API. It gets am-utils
to compile, but it is not clear if it will work perfectly.
* libamu/xdr_func.c (xdr_am_mountres3_ok), amq/amq_xdr.c
(xdr_amq_mount_tree, xdr_amq_mount_tree_p,
xdr_amq_mount_info_list, xdr_amq_mount_tree_list), amq/amq.c
(show_mti), amd/amq_subr.c (xdr_amq_setopt, xdr_amq_mount_subtree,
xdr_amq_mount_tree, xdr_amq_mount_tree_list, xdr_amq_mount_tree),
libamu/xdr_func.c (xdr_am_mountres3_ok): use casing magic to stop
GCC-4.1 from complaining about "dereferencing type-punned pointer
will break strict-aliasing rules" here (but not elsewhere).
2006-03-20 Christos Zoulas <[email protected]>
* libamu/wire.c: avoid potential dereferencing of a NULL pointer
(Coverity).
* hlfsd/homedir.c (delay): remove unnecessary check for NULL
pointer (Coverity).
* fsinfo/fsi_analyze.c (analyze_dkmounts, analyze_mounts,
analyze_mounts): avoid potential dereferencing of a NULL pointer
(Coverity).
* conf/transp/transp_sockets.c (create_amq_service): avoid
potential dereferencing of a NULL pointer (Coverity).
* amd/sched.c (sigchld): properly check for the end of the waiting
process list (Coverity).
* amd/mapc.c (mapc_create): initialize 'modify' to zero (Coverity).
* amd/autil.c (amfs_mkcacheref, am_unmounted): avoid potential
dereferencing of a NULL pointer (Coverity).
* amd/amfs_generic.c (amfs_lookup_mntfs): free def_opts before
reusing it (memory leak bug detected by Coverity).
(amfs_bgmount): avoid potential dereferencing of a NULL pointer
(Coverity).
* amd/am_ops.c (merge_opts): no need to check if newstr is NULL
(bug detected by Coverity).
2006-03-08 Ion Badulescu <[email protected]>
* amd/nfs_subr.c (mp_to_fh): fixed old-style filehandles--the pid
comparison was failing.
2006-03-08 Erez Zadok <[email protected]>
* configure.in: properly test for either <gdbm/ndbm.h> or
<gdbm-ndbm.h> (unfortunately, Autoconf will map both names to the
same $ac_cv_* variable name). Some systems support one header or
another. Patch inspired by work Debian did.
2006-02-10 Erez Zadok <[email protected]>
*******************************************************************
*** Released am-utils-6.1.4 ***
*******************************************************************
2006-01-04 Erez Zadok <[email protected]>
* doc/am-utils.texi (auto_attrcache Parameter): revise discussion
to mention pros and cons of turning on/off this parameter,
including impact on Amd's performance, and ways to improve
performance while minimizing the window of vulnerability in which
kernel may return the wrong (cached) attributes.
2006-01-02 Erez Zadok <[email protected]>
* updated copyright year to 2006 on all files.
2005-12-20 Erez Zadok <[email protected]>
* include/am_utils.h, conf/transp/transp_tli.c (amu_svc_register,
register_autofs_service): use a consistent prototype for the
dispatch function of the autofs service de/registration functions.
2005-12-03 Erez Zadok <[email protected]>
* minor new ports: i386-unknown-netbsdelf2.1,
i386-unknown-netbsdelf3.0 (RELEASE), and i386-unknown-openbsd3.8.
2005-12-02 Erez Zadok <[email protected]>
* m4/macros/check_field.m4: remove double inclusion of msdosfs
headers, which are included in mount_header1.h (netbsd 2.1 doesn't
protect <msdosfs/msdosfsmount.h> which causes compile errors).
2005-11-08 Erez Zadok <[email protected]>
* minor new port: i386-unknown-freebsd6.0 (RELEASE)
2005-10-26 Erez Zadok <[email protected]>
* 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.
2005-10-25 Erez Zadok <[email protected]>
* 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.
2005-10-19 Erez Zadok <[email protected]>
* doc/am-utils.texi (opts Option): document new pcfs options
longname, nowin95, shortname, user=N, group=N, mask=N, and
dirmask=N.
* amd/ops_pcfs.c (mount_pcfs): process new pcfs options longname,
nowin95, shortname, user=N, group=N, mask=N, and dirmask=N.
* include/am_compat.h: provide compatibility mnttab string names,
if needed, for pcfs mount options longname, nowin95, shortname,
user=N, group=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.
2005-10-18 Erez Zadok <[email protected]>
* 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.
2005-10-11 Erez Zadok <[email protected]>
* doc/am-utils.texi (nfs_vers, nfs_proto parameters): clarify and
correct mistaken description of nfs_proto.
2005-10-10 Erez Zadok <[email protected]>
*******************************************************************
*** Released am-utils-6.1.3 ***
*******************************************************************
2005-10-07 Erez Zadok <[email protected]>
* 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.
* 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).
* 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.
* 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.
* m4/macros/header_templates.m4: add missing templates for
HAVE_EXTERN_GETDTABLESIZE, HAVE_EXTERN_GETWD, and
HAVE_EXTERN_UALARM.
* amd/info_exec.c (exec_map_open): break assignment from inside
conditional, to work around an IRIX-6.5 cc bug.
* 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.
* 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).
* 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.
2005-10-06 Erez Zadok <[email protected]>
* ltmain.sh, m4/macros/libtool.m4: update to libtool-1.5.20.
Fixes Tru64 bugs when using ksh.
* 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).
* 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.
* 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.
* 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)
* 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.
2005-10-06 Rainer Orth <[email protected]>
* 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.
2005-10-05 Erez Zadok <[email protected]>
* 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.
* 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.
* 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.
2005-10-04 Erez Zadok <[email protected]>
* 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*().
* 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().
2005-10-02 Erez Zadok <[email protected]>
* include/am_utils.h: extern for xvsnprintf().
* amd/autil.c: move strsplit() to libamu/strutil.c.
* 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. Sync up with 6.2 version of file.
* libamu/xutil.c: explain purpose of file. Move mkdirs/rmdirs
code from old util.c.
2005-10-01 Erez Zadok <[email protected]>
* 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).
* 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.
2005-09-30 Christos Zoulas <[email protected]>
* 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.
2005-09-29 Erez Zadok <[email protected]>
* 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
* 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.
2005-09-26 Erez Zadok <[email protected]>
* libamu/xutil.c (unregister_amq): repair broken meaning of D_AMQ,
which was reversed in am-utils-6.2. Bug fix from Steve Plite
<splite-amutils at sigint.cs.purdue.edu>.
* 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.
2005-09-18 Erez Zadok <[email protected]>
*******************************************************************
*** Released am-utils-6.1.2.1 ***
*******************************************************************
* README.attrcache: Update status of freebsd and openbsd.
Document netbsd's patchs to support noac.
* 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.
*******************************************************************
*** Released am-utils-6.1.2 ***
*******************************************************************
* 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.
2005-09-17 Erez Zadok <[email protected]>
* 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().
2005-09-07 Erez Zadok <[email protected]>
* 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.
* minor new port: i386-pc-linux-deb3.1.
2005-09-02 Erez Zadok <[email protected]>
* 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.
2005-08-27 Erez Zadok <[email protected]>
* 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".
2005-08-24 Erez Zadok <[email protected]>
* configure.in: wrap all LDAP and HESIOD tests in test whether
--with-OPT was used.
2005-08-16 Erez Zadok <[email protected]>
* 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.
2005-08-11 Erez Zadok <[email protected]>
* configure.in: keep AC_INIT on same line, for nightly snapshot
build script.
2005-08-06 Erez Zadok <[email protected]>
* scripts/amd.conf.5: selectors_in_defaults is a common parameter,
not just [global]. Use consistent capitalization of Amd/Amq.
* scripts/amd.conf-sample: properly list all of the parameters
which are common to both the [global] and the per-map sections.
* doc/am-utils.texi (Common Parameters): selectors_in_defaults is
a common parameter, not just [global].
* scripts/amd.conf-sample (sun_map_syntax): example of new flag.
* cvs-server.txt: update instructions after branching 6.1-stable.
2005-08-02 Erez Zadok <[email protected]>
*******************************************************************
*** Released am-utils-6.1.1 ***
*******************************************************************
* libamu/xutil.c (xsnprintf): "unsafe" alternative to vsnprintf is
vsprintf, not sprintf.
* conf/umount/umount_osf.c (umount_fs): refer to proper formal
parameter name.
(umount2_fs): pass second arg to umount().
* ALL: remove CVS ID and put actual file name in source.
* conf/autofs/*.[hc]: proper copyright headers.
* whitespace reformatting. Remove remaining '%W%' SCCS IDs.
* amd/mntfs.c (free_mntfs): don't discard the last reference to an
mntfs that had been mounted already. It won't have the
MFF_RESTARTED flag on, as it gets turned off after the entry is
mounted, but it will have the MFF_RSTKEEP flag on.
* amd/autil.c (mf_mounted), amd/restart.c (restart_fake_mntfs):
show the mntfs's flags.
2005-08-01 Erez Zadok <[email protected]>
* conf/mtab/mtab_linux.c: removed unused code. Cleanup.
(handler): removed this bad signal handler.
(lock_mtab): Redhat's original code set a signal handler called
"handler()" for all non-ALRM signals. The handler called
unlock_mntlist(), plog'ed the signal name, and then exit(1)!
Never, ever, exit() from inside a utility function. This messed
up Amd's careful signal-handling code, and caused Amd to abort
uncleanly only any other "innocent" signal
(even simple SIGUSR1), leaving behind a hung Amd mnt point. That
code should have at least restored the signal handlers' states
upon a successful mtab unlocking. Anyway, that handler was
unnecessary, because will call unlock_mntlist() properly anyway on
exit.
* conf/mtab/mtab_{file,isc3,mach3,linux}.c (unlock_mntlist): dlog
message that we're inside the unlock_mntlist function.
* amd/amd.c (main): use new setup_sighandler() for Amd's four main
signals (INT, TERM, HUP, and CHLD).
(main) Add SIGINT and SIGTERM to masked_sigs, used in
nfs_start.c:do_select() for setjmp/longjmp code; the MASK was set
to all four signals if !HAVE_SIGACTION, but only to HUP+CHLD if we
HAVE_SIGACTION. So this change makes Amd behave consistently.
* include/am_utils.h: extern for new setup_sighandler().
* libamu/xutil.c (setup_sighandler): new utility function to setup
a single signal-handler regardless of what method is supported by
this OS.
(going_down): call unlock_mntlist() when exiting, to ensure that
Amd will remove any leftover mtab lock files, if any.
* amd/restart.c (restart_automounter_nodes): cleanup function.
* minor new port: i386-pc-linuxoldld-deb3.1.
* configure.in: include <sys/types.h> before <linux/socket.h> to
get the definition of size_t on Debian-3.1r0a.
2005-07-29 Erez Zadok <[email protected]>
* amd/srvr_nfs.c (find_nfs_srvr): don't blindly copy the hostent
IP address. First check if it differs from the existing one of
the fserver, and copy only if it changed. If it did change, flush
the fhandle cache to avoid a stale fhandle being reused. This
allows Amd to detect IP address changes even for an fserver that
lost one or more NFS pings, but not enough to be declared totally
down. We handle the "totally down" fserver case in
check_fs_addr_change().
* amd/ops_nfs.c (nfs_umount), amd/sched.c (sched_task),
amd/nfs_subr.c (nfs_quick_reply): code clarity.
* conf/mount/mount_linux.c (linux_nfs_error): dlog mappings of
errnos to NFS errors.
* conf/umount/umount_linux.c (umount2_fs): cleanup code. Trying
stat() seems doomed to hang at times, so don't try stat at all,
because umount2() appears to be clever enough to never hang.
2005-07-25 Erez Zadok <[email protected]>
* amd/amd.h (FSF_FORCE_UNMOUNT): new flag used to indicate that a
particular fserver may need forced/lazy unmounts when it's mntfs's
are unmounted.
* amd/ops_nfs.c (nfs_umount): a simple unmount returned EBUSY, and
the user specified forced_unmounts=yes in amd.conf, and this
fserver was flagged with FSF_FORCE_UNMOUNT, and the OS supports
forced/lazy unmounts, then try forced/lazy unmounts. This should
allow a hung mount point to be removed.
* amd/srvr_nfs.c (find_nfs_srvr): move away IP-address change
detection code to its own function.
(check_fs_addr_change): new function to detect if the IP address
of a downed host has changed, and do various cleanups and fixups
to try and recover as best from that situation (e.g., flushing
various caches). Also set the FSF_FORCE_UNMOUNT flag for the
fserver in question.
(flush_srvr_nfs_cache): pass fserver as argument, so we can
selectively flush the NFS cache for a single fserver (or all of
them, if you pass NULL).
* libamu/xutil.c (switch_to_logfile): truncate a regular-file log
file if user passed non-zero "truncate_log" flag.
* include/am_utils.h: switch_to_logfile() now takes a 3rd arg.
* amd/get_args.c (get_args): pass "truncate_log" flag as per
amd.conf global settings.
* amd/conf.c (gopt_truncate_log): store global value of
truncate_log flag.
* amd/amq_subr.c (amqproc_setopt_1_svc), hlfsd/hlfsd.c (main,
reload): don't truncate log file when calling switch_to_logfile().
* amd/amd.h (CFM_TRUNCATE_LOG): new flag. Fix comment typo.
* NEWS, doc/am-utils.texi (truncate_log Parameter),
scripts/amd.conf.5, scripts/amd.conf-sample (log_file): document
new truncate_log amd.conf parameter.
* amd/conf.c (gopt_forced_unmounts): check Linux kernel version
and alert if your version may be too old for MNT_FORCE to work
(before 2.4.0) or for MNT_DETACH to work (before 2.6.0).
Otherwise it may be impossible to pin down the exact kernel
version in which we should enable this feature.
* conf/umount/umount_linux.c (umount2_fs): if MNT_FORCE returned
EBUSY, then don't try to stat(2) before MNT_DETACH because it
could hang.
2005-07-21 Erez Zadok <[email protected]>
* conf/umount/umount_linux.c (umount_fs): cleanup this function,
breaking long "if" statements using "goto out".
* conf/umount/umount_{aix,bsd44,osf,default,linux}.c (umount_fs):
call new utility function umount2_fs() as needed (EBUSY, EIO, or
ESTALE).
* conf/umount/umount_{aix,bsd44,osf,default,linux}.c (umount2_fs):
define a new utility function to invoke forcible/lazy unmounts
without touching any mtab files. This separate utility function
is useful because it can be called from elsewhere.
* amd/amfs_toplvl.c (amfs_toplvl_init): new function, called
before Amd mounts toplvl mounts, which gives us a hook for cleanup
of a previously dead Amd. In our case, if the user asked for
forced_unmounts, and the OS supports it, then we try forced/lazy
unmounts on any previous toplvl mounts. This is useful if a
previous Amd died and left behind toplvl mount points (this Amd
will clean them up!). WARNING: Don't use forced/lazy unmounts if
you have another valid Amd running, because this code WILL force
those valid toplvl mount points to be detached as well!
* amd/amfs_toplvl.c (amfs_toplvl_umount): don't unconditionally
try forced/lazy unmounts because it will prevent a normal Amd from
terminating and cleaning up properly (self-deadlocking: detached
mounts hang the parent Amd on a stat). Since we already do
unmounts in the background, then try a safer policy: after trying
the normal unmounts a few times (5 sec), escalate and try forced
unmounts a few times (5 more seconds), and if even that failed,
then try the ultimate -- detached unmounts (which always succeed).
This allows Amd to first try and shutdown cleanly, and gradually
try more forcible ways to shutdown. On Linux, this procedure will
cleanly shutdown Amd even if there are processes with their CWD on
Amd's mount points (which normally result in EBUSY).
2005-07-20 Erez Zadok <[email protected]>
* Makefile.am (EXTRA_DIST_CONF): add new umount_aix.c to distro.
* conf/umount/umount_aix.c: easier if AIX has its own unmount
helper file.
* m4/macros/check_umount_style.m4: AIX needs its own unmount style
file.
* doc/am-utils.texi (forced_unmounts Parameter): @xref -> @pxref.
2005-07-19 Erez Zadok <[email protected]>
* conf/nfs_prot/nfs_prot_aix5_2.h: define compatible
forced-unmount flag.
* conf/umount/umount_default.c (umount_fs): if regular umount got
EBUSY, EIO, or ESTALE, then try forced unmount, if supported. Try
umount2 (Solaris) or uvmount (AIX).
* conf/umount/umount_{bsd44,osf}.c (umount_fs): if default
umount() failed with EIO or ESTALE, also try forced unmount.
2005-07-18 Erez Zadok <[email protected]>
* amd/autil.c (amfs_mount), amd/amfs_toplvl.c
(amfs_toplvl_umount): enable forced/lazy unmounts only if user
asked for it (and dlog it).
* scripts/amd.conf.5: document new force_unmount global parameter.
* doc/am-utils.texi (forced_unmounts Parameter): document new
global parameter.
* amd/conf.c (gopt_forced_unmounts): process forced_unmounts
option (default "no"). Exit with an error if user specified the
option as "yes" but configure couldn't find support for either the
MNT_FORCE or MNT_DETACH flags.
* scripts/amd.conf-sample (forced_unmounts): example usage of new
option.
* amd/amd.h (CFM_FORCED_UNMOUNTS): new flag for forced_unmounts
option.
* m4/macros/header_templates.m4: templates for _DETACH and _FORCE.
* configure.in: check for generic u/mount options "detach" and
"force".
* include/am_utils.h (UMOUNT_FS, umount_fs): new prototypes.
Define AMU_UMOUNT flags for force, detach, and autofs.
* amd/amfs_toplvl.c (amfs_toplvl_umount): pass _FORCE and _DETACH
unmount flags unconditionally. Pass them to UMOUNT_FS().
* conf/nfs_prot/nfs_prot_linux.h: define MNT_FORCE and MNT_DETACH
if needed, because some Linux systems don't define them
(presumably because it would be too dangerous to expose these
flags to users).
* amd/autil.c (amfs_mount): if mount(2) failed with ESTALE or EIO,
then assume that we're in trouble, possibly because a previous
mount is hung. So, first try to force a lazy unmount of the old
mount. If the forced unmount worked, then try again to mount the
desired file system. If the forced unmount failed, then don't
retry: just return an error.
* amd/amfs_generic.c (amfs_generic_umount), amd/amfs_host.c
(amfs_host_umount), amd/ops_cachefs.c (cachefs_umount),
amd/ops_cdfs.c (cdfs_umount), amd/ops_efs.c (efs_umount),
amd/ops_lofs.c (lofs_umount), amd/ops_nfs.c (nfs_umount),
amd/ops_pcfs.c (pcfs_umount), amd/ops_ufs.c (ufs_umount),
amd/ops_xfs.c (xfs_umount), conf/umount/umount_bsd44.c
(umount_fs), conf/umount/umount_default.c (umount_fs),
conf/umount/umount_linux.c (umount_fs), conf/umount/umount_osf.c
(umount_fs): compute and use unmount specific flags.
2005-07-16 Erez Zadok <[email protected]>
* configure.in: better help for users, if nfs_args can't be found.
2005-07-15 Erez Zadok <[email protected]>
* BUGS: more details on AIX's need to install bos.net.nfs.adt
before configuring am-utils (else configure cannot find struct
nfs_args on AIX).
2005-07-10 Erez Zadok <[email protected]>
* amd/srvr_nfs.c (find_nfs_srvr): flush NFS handle cache if the IP