Compare commits

...
Sign in to create a new pull request.

148 commits

Author SHA1 Message Date
Fedora Release Engineering
395ecc79e3 Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild 2026-01-16 03:37:30 +00:00
Fedora Release Engineering
a2bec4d0b4 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 16:56:00 +00:00
Fedora Release Engineering
979241094b Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 10:56:08 +00:00
Miroslav Suchý
e2bc009499 convert license to SPDX
This is part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_4
2024-08-28 07:51:48 +02:00
Ian Kent
30593ae3fd - reinstate the kernel version check and fix configure invocation. 2024-07-30 13:14:01 +08:00
Ian Kent
7afaaebd8f - don't check kernel verion matches kernel-headers version at build. 2024-07-30 12:37:23 +08:00
Ian Kent
a8ea799173 - fix changelog date. 2024-07-30 11:59:15 +08:00
Ian Kent
d69d00c195 - fix Fedora 41 build. 2024-07-30 11:27:45 +08:00
Fedora Release Engineering
e176b0ba74 Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 16:54:21 +00:00
Software Management Team
a2a9955017 Eliminate use of obsolete %patchN syntax (#2283636) 2024-05-30 12:46:46 +02:00
Fedora Release Engineering
bb254c6afe Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-22 22:57:49 +00:00
Fedora Release Engineering
8518c2c5cc Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 12:48:00 +00:00
Fedora Release Engineering
3c402764ff Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 13:11:15 +00:00
Florian Weimer
56ba80bf83 Port configure script to C99 (#2170414)
Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2023-02-16 11:15:41 +01:00
Fedora Release Engineering
bb122e5015 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-18 21:39:12 +00:00
Ian Kent
e056269e13 - ensure NFSv4 is seen as supported on s390x build. 2022-08-15 17:19:54 +08:00
Ian Kent
34382e964f - don't use ifarch macro. 2022-08-15 14:20:46 +08:00
Ian Kent
901c8bab00 - add BuildRequires: kernel-modules for s390x. 2022-08-15 13:50:30 +08:00
Ian Kent
9ba765bc8c - more fixes for bug 2113103 - am-utils: FTBFS in Fedora rawhide/f37 2022-08-15 11:08:08 +08:00
Ian Kent
fa9b2f2bb8 - fix bug 2113103 - am-utils: FTBFS in Fedora rawhide/f37 2022-08-04 09:09:27 +08:00
Fedora Release Engineering
3753a269b8 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-20 20:42:23 +00:00
Fedora Release Engineering
71ca6f41bb - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-19 21:10:36 +00:00
Ian Kent
bf5ee6b5d0 - add changes for bug 1942977. 2021-08-29 12:15:38 +08:00
Fedora Release Engineering
684d5e8c0e - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 17:29:29 +00:00
Fedora Release Engineering
897e55380d - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 12:34:04 +00:00
Zbigniew Jędrzejewski-Szmek
0e4dd5d341 Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
2021-03-02 16:14:13 +01:00
Fedora Release Engineering
e5c17a1141 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 00:01:51 +00:00
Tom Stellard
e0347233ef Add BuildRequires: make
https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot
2020-12-16 23:28:18 +00:00
Fedora Release Engineering
478854e071 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-31 23:58:22 +00:00
Fedora Release Engineering
3b4ae1fde7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 11:58:39 +00:00
Fedora Release Engineering
6a94e4334e - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 11:29:07 +00:00
Fedora Release Engineering
1abd73baef - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-24 17:49:03 +00:00
Björn Esser
c14a48fe7c
Remove hardcoded gzip suffix from GNU info pages 2019-04-24 14:56:28 +02:00
Fedora Release Engineering
3bd39fea44 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 13:14:13 +00:00
Igor Gnatenko
6aca9ec155 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:23:55 +01:00
Igor Gnatenko
7867648970
Remove obsolete scriptlets
References: https://fedoraproject.org/wiki/Changes/RemoveObsoleteScriptlets
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-01-27 15:24:13 +01:00
Ian Kent
c9c51b7071 - disable hesiod support (bz#1643257). 2018-10-29 11:48:15 +08:00
Fedora Release Engineering
6648a5a65f - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-12 20:10:22 +00:00
Ian Kent
12433ee32c - replace workaround for missing RPC code with package rpcsvc-proto-devel. 2018-02-06 16:07:20 +08:00
Ian Kent
9705d357ef - fix --enable-ldflags argument mistake. 2018-02-06 14:49:16 +08:00
Ian Kent
e826a424cd - add libnsl2 Requires and libnsl2-devel BuildRequires. 2018-02-06 14:37:19 +08:00
Ian Kent
d7d39135db - try to workaround the removal of RPC code from glibc. 2018-02-06 14:28:44 +08:00
Ian Kent
51372607b2 - Add "BuildRequires: kernel-headers" for linux/version.h requirement. 2018-02-04 17:06:50 +08:00
Ian Kent
44633db9d9 - Remove "BuildRequires: tcp_wrappers-devel" as tcp_wrappers is depricated. 2018-02-04 16:53:29 +08:00
Ian Kent
f6425c6b85 - Update "Requires(pre)" to use /usr/bin/grep instead of /bin/grep. 2018-02-04 15:59:50 +08:00
Ian Kent
39097857d1 - fix nfsv3 fh length in NFS_FH_DREF(). 2017-08-29 10:19:20 +08:00
Fedora Release Engineering
140f0698e9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-02 17:32:26 +00:00
Fedora Release Engineering
881e6e24f3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 02:48:04 +00:00
Fedora Release Engineering
638150685a - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 05:54:59 +00:00
Ian Kent
38fe2a08cf - fix fix-umount-to-mount-race patch (bug 1399213). 2016-12-19 11:14:54 +08:00
Ian Kent
cc01065e15 - fix ambiguous else due to dlog() macro usage. 2016-10-03 16:54:15 +08:00
Ian Kent
cff2af1e74 - fix typo in libtirpc configure macro. 2016-09-14 17:56:29 +08:00
Ian Kent
4e72d9a683 - sync with updtream git and add a couple of bug fixes. 2016-09-14 17:33:58 +08:00
Ian Kent
c9b3376b09 - fix changelog comments on latest change. 2016-03-04 07:05:39 +08:00
Ian Kent
eb3e266891 - fix unusual NFS kernel client problem and add several fixes. 2016-03-04 06:52:13 +08:00
Ian Kent
c3388d3bdd - bump revision as a result of previous merge. 2016-02-29 16:29:53 +08:00
Ian Kent
2297539366 Merge branch 'master' of ssh://pkgs.fedoraproject.org/am-utils 2016-02-29 16:28:20 +08:00
Ian Kent
41f4e18791 - fix Linux NFS recognition of umounts and add systemd dependency on nfs-lock.service. 2016-02-29 16:26:12 +08:00
Dennis Gilmore
a7c448a5ec - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-03 16:08:11 +00:00
Ian Kent
cafd3ce99f - Update Requires: portmap to Requires: rpcbind. 2016-02-02 10:30:07 +08:00
Ian Kent
ae02c67f2a - fix systemd unit dependencies. 2016-02-02 10:24:33 +08:00
Ian Kent
af7fe5db28 - fix permissions on amd.service and amd.conf. 2016-02-02 09:08:05 +08:00
Ian Kent
5da310c6ef - add another changelog correction. 2015-12-30 17:21:57 +08:00
Ian Kent
86ff3f4dd9 - fix revision 5 changelog title. 2015-12-30 17:17:54 +08:00
Ian Kent
288b05ec10 - update to official version 6.2 source plus add bug fixes for the internal NFSv3 server. 2015-12-30 16:56:36 +08:00
Dennis Gilmore
634a5ca07b - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-16 23:50:07 +00:00
Ian Kent
48bebf3abb - add build requires for gcc and m4. 2015-06-12 10:32:28 +08:00
Ian Kent
9c28b82964 - update changelog for bug 1181698. 2015-01-16 11:27:21 +08:00
Ian Kent
be0cdb12c3 - fix libtool-2.4.4 build failure, bug 1181698. 2015-01-16 11:25:42 +08:00
Ian Kent
51a432f378 - add perl-Unicode-EastAsianWidth to BuildRequires. 2014-10-21 18:51:19 +08:00
Ian Kent
14a4da86dd - Update am-utils to current git to get needed NFSv3 functionality. 2014-10-21 18:23:01 +08:00
Peter Robinson
0173213b27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-15 20:26:01 +00:00
Dennis Gilmore
cd86fe29a8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-06 19:33:43 -05:00
Ian Kent
74b172da44 - make am-utils work with autofs (since NFSv2 client is disabled) and add misc bug fixes (bz1074376). 2014-03-20 15:19:26 +08:00
Dennis Gilmore
47dd6a17a1 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-02 19:41:11 -05:00
Ian Kent
6690a9809f - texinfo documentation build fixes. 2013-04-28 13:02:21 +08:00
Ian Kent
1a83a2146c - correct changelog date. 2013-04-28 12:47:14 +08:00
Ian Kent
0023255ddc - oh .. and actually apply the patch, DOH! 2013-04-28 12:20:32 +08:00
Ian Kent
fd43dc72aa - actually add the required patch for previous commit. 2013-04-28 12:06:57 +08:00
Ian Kent
027f675657 - bz955445 - am-utils package should be built with PIE flags 2013-04-28 11:58:26 +08:00
Ian Kent
beda81100b - correct revision in changelog. 2013-04-28 11:36:49 +08:00
Ian Kent
776204c363 - add BuildRequires for texinfo. 2013-02-18 16:50:10 +08:00
Dennis Gilmore
934585dc5a - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-13 10:30:03 -06:00
Ian Kent
7c310ec819 - scriptlets replaced with new systemd macros (#850023) 2012-10-12 10:12:32 +08:00
Dennis Gilmore
f0135cde28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-18 10:55:01 -05:00
Karel Zak
57c116ea0c 5:6.1.5-22: fix #784235
Signed-off-by: Karel Zak <kzak@redhat.com>
2012-01-24 13:45:14 +01:00
Dennis Gilmore
3c64e7fa48 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-12 15:12:56 -06:00
Tom "spot" Callaway
07bbe62dbc add missing scriptlets 2011-09-09 12:02:01 -04:00
Tom "spot" Callaway
4e1a5b87de convert to systemd 2011-09-08 13:49:27 -04:00
Dennis Gilmore
e510face9f - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-07 19:02:47 -06:00
Karel Zak
4b3ba9d6a5 5:6.1.5-17: fix NFS lock problem (602938, 640383)
Signed-off-by: Karel Zak <kzak@redhat.com>
2010-10-06 11:31:09 +02:00
Fedora Release Engineering
f274a90c07 dist-git conversion 2010-07-28 09:47:10 +00:00
kzak
ece19f8388 - fix #566711 - am-utils: incorrect use of tcp_wrapper 2010-03-01 12:30:02 +00:00
kzak
197cf35ac2 - fix #523221 - initscript collected problems LSB-compilant 2010-02-24 14:00:23 +00:00
Bill Nottingham
2d10e9c3e5 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 22:39:40 +00:00
Jesse Keating
127417eb14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild 2009-07-24 16:49:11 +00:00
Jesse Keating
844cbaea17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild 2009-02-24 00:52:11 +00:00
kzak
73d5ff01c7 - fix #450754 - Amd does not work with 2.6.25 (thanks to Philippe Troin) 2008-12-02 13:08:47 +00:00
kzak
df2f3d2836 - review & cleanup init script 2008-05-29 12:11:36 +00:00
kzak
10e46e39b0 add LSB header 2008-05-29 12:08:33 +00:00
kzak
ff776e743d - fix #435420 - CVE-2008-1078 am-utils: insecure usage of temporary files 2008-05-29 10:52:22 +00:00
kzak
c0e4ddff98 - spec file cleanup according to rpmlint
- fix autotools stuff
2008-05-21 19:20:26 +00:00
kzak
1c853575b4 - spec file cleanup according to rpmlint
- fix autotools stuff
2008-05-20 22:40:45 +00:00
kzak
80e5a6c161 - spec file cleanup according to rpmlint 2008-05-20 13:24:33 +00:00
Jesse Keating
bb79349162 - Autorebuild for GCC 4.3 2008-02-19 10:32:26 +00:00
Jesse Keating
2ab111c6ab - Rebuild for deps 2007-12-05 21:41:48 +00:00
Bill Nottingham
5b9498871c makefile update to properly grab makefile.common 2007-10-15 18:35:34 +00:00
kzak
0c2a860121 - fix #223675 - am-utils: non-failsafe install-info
- fix #231843 - missing build dependency on tcp_wrappers
- cleanup spec file
- Resolves: rhbz#223675 rhbz#231843
2007-03-13 15:26:34 +00:00
kzak
a6c241bdf0 - fix #219437 - amd: stopping service will pop up an error dialog in
system-config-services app.
- fix build (m4 stuff) of the package (UTS_RELEASE macro has been removed
    from the latest kernel-headers)
- Resolves: rhbz#219437
2006-12-18 21:07:41 +00:00
kzak
d2e59be60d - fix critical bug 2006-08-24 14:08:49 +00:00
Jesse Keating
cf557254d3 fix missing br 2006-07-12 20:13:00 +00:00
Jesse Keating
45ab90cca3 bumped for rebuild 2006-07-12 05:09:10 +00:00
Peter Vrabec
8d6531e640 - force to use HAVE_LINUX_NFS_MOUNT_H macro, because linux/nfs_mount.h
check in configure fails on s390x
2006-06-01 13:30:44 +00:00
Peter Vrabec
e54489a72a upgrade 2006-05-29 11:26:06 +00:00
Jesse Keating
36d5c6d3f0 bump for bug in double-long on ppc(64) 2006-02-11 01:35:35 +00:00
Jesse Keating
88167e8f5e bump for new gcc/glibc 2006-02-07 10:52:50 +00:00
Jesse Keating
12b0be64c0 gcc update bump 2005-12-09 22:39:33 +00:00
Peter Vrabec
8de6dde77c upgrade 2005-10-21 07:52:45 +00:00
Peter Vrabec
f29484a179 use generic linux/nfs_mount.h check again 2005-10-05 19:23:45 +00:00
Peter Vrabec
54935de148 - upgrade
- fix amd shutdown(#158268,#54246)
- enhancement, /host/localhost and /host/<localmachinename> are symlinks to
    / (#11843)
2005-10-05 16:26:58 +00:00
Peter Vrabec
6cfe96894c specify type option in /default in /etc/amd.net (#11618) 2005-09-27 17:06:32 +00:00
Peter Vrabec
2bbf03ce59 use generic linux/nfs_mount.h check 2005-08-25 13:09:15 +00:00
Peter Vrabec
11553a7ccc upgrade 6.1.1 2005-08-19 07:13:18 +00:00
Florian La Roche
1700543cba - package all symlinks 2005-07-31 14:42:04 +00:00
Peter Vrabec
b38237829d #143118 implementing the util-linux mtab locking scheme into am-utils
automounter
2005-03-24 09:10:06 +00:00
Peter Vrabec
ac7abda7be find requires solved 2005-03-23 14:44:03 +00:00
Peter Vrabec
80be3987c0 *** empty log message *** 2005-03-23 08:36:15 +00:00
Peter Vrabec
2c84280cd0 *** empty log message *** 2005-03-22 14:58:48 +00:00
Peter Vrabec
8e0b724975 rebuild by gcc4 2005-03-17 16:22:54 +00:00
Peter Vrabec
ed99ca077d *** empty log message *** 2005-03-17 14:31:46 +00:00
Peter Vrabec
6abb53c053 rebuild 2005-03-17 09:49:04 +00:00
Peter Vrabec
32644fe938 rebuild 2005-03-17 09:48:19 +00:00
havill
93b75eb57a - cleanup %pre script so amd.conf won't get stat()ed if it doesn't exist
(#126656)
2004-10-12 20:46:00 +00:00
cvsdist
e51b726480 auto-import changelog data from am-utils-6.0.9-9.src.rpm
Wed Sep 01 2004 Nalin Dahyabhai <nalin@redhat.com> 6.0.9-9
- really fix %preun this time
2004-09-09 02:58:34 +00:00
cvsdist
9042c98efa auto-import changelog data from am-utils-6.0.9-8.src.rpm
Tue Aug 31 2004 Nalin Dahyabhai <nalin@redhat.com> 6.0.9-8
- rebuild
2004-09-09 02:58:18 +00:00
cvsdist
fd25bb8816 auto-import changelog data from am-utils-6.0.9-7.src.rpm
Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
Mon Mar 15 2004 Nalin Dahyabhai <nalin@redhat.com>
- fix incorrect invocation of test in %pre and %preun
2004-09-09 02:58:02 +00:00
cvsdist
54a1bcbc66 auto-import changelog data from am-utils-6.0.9-6.1.src.rpm
Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
2004-09-09 02:57:31 +00:00
cvsdist
5de336ce37 auto-import changelog data from am-utils-6.0.9-5.src.rpm
Tue Nov 11 2003 Nalin Dahyabhai <nalin@redhat.com> 6.0.9-5
- change permissions on /etc/sysconfig/amd from 0755 to 0644 (#109681)
2004-09-09 02:56:55 +00:00
cvsdist
dcccd226f5 auto-import changelog data from am-utils-6.0.9-4.src.rpm
Tue Aug 05 2003 Elliot Lee <sopwith@redhat.com> 6.0.9-4
- Fix libtool
Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt
2004-09-09 02:56:49 +00:00
cvsdist
549061235c auto-import changelog data from am-utils-6.0.9-2.src.rpm
Tue Feb 04 2003 Florian La Roche <Florian.LaRoche@redhat.de>
- add symlink to shared lib
Fri Jan 31 2003 Nalin Dahyabhai <nalin@redhat.com> 6.0.9-1
- update to 6.0.9
- disable RPM's internal dependency calculation so that we can filter out
    dependencies which are expected to be filled in by the site
    administrator
Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt
Tue Jan 07 2003 Nalin Dahyabhai <nalin@redhat.com> 6.0.8-3
- rebuild
Wed Oct 30 2002 Nalin Dahyabhai <nalin@redhat.com> 6.0.8-1
- update to 6.0.8
2004-09-09 02:56:21 +00:00
cvsdist
2cc597203b auto-import changelog data from am-utils-6.0.7-9.src.rpm
Tue Aug 27 2002 Nalin Dahyabhai <nalin@redhat.com> 6.0.7-9
- rebuild
2004-09-09 02:56:17 +00:00
cvsdist
bd34b6fed7 auto-import changelog data from am-utils-6.0.7-8.src.rpm
Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild
2004-09-09 02:56:05 +00:00
cvsdist
748b4b0552 auto-import changelog data from am-utils-6.0.7-7.src.rpm
Wed May 29 2002 Nalin Dahyabhai <nalin@redhat.com> 6.0.7-7
- adjust the perl reqs so that the lostaltmail config files aren't required
    by RPM
Sun May 26 2002 Tim Powers <timp@redhat.com>
- automated rebuild
Thu May 09 2002 Nalin Dahyabhai <nalin@redhat.com> 6.0.7-5
- rebuild in new environment
2004-09-09 02:56:02 +00:00
cvsdist
383e44be5e auto-import changelog data from am-utils-6.0.7-4.src.rpm
Fri Feb 22 2002 Nalin Dahyabhai <nalin@redhat.com> 6.0.7-4
- rebuild in new environment
Sat Jan 26 2002 Jeff Johnson <jbj@redhat.com>
- add Provides: to white out certain perl Requires:
Wed Jan 23 2002 Nalin Dahyabhai <nalin@redhat.com> 6.0.7-2
- rebuild in new environment
- require gdbm-devel at build-time instead of db1-devel
Thu Sep 06 2001 Nalin Dahyabhai <nalin@redhat.com> 6.0.7-1
- update to 6.0.7, fixing EIO on access bugs (#53251)
- back out nfs3 patch; no longer needed for current kernels
- don't explicitly strip binaries; let the buildroot policies handle it
2004-09-09 02:55:56 +00:00
cvsdist
7d203072e1 auto-import changelog data from am-utils-6.0.6-3.src.rpm
Wed Jul 18 2001 Nalin Dahyabhai <nalin@redhat.com>
- rebuild
2004-09-09 02:55:29 +00:00
cvsdist
35dabdf2b0 auto-import changelog data from am-utils-6.0.6-2.src.rpm
Tue Jun 26 2001 Florian La Roche <Florian.LaRoche@redhat.de>
- change filelist to include link from library major version number
Tue May 22 2001 Nalin Dahyabhai <nalin@redhat.com>
- update to 6.0.6
2004-09-09 02:55:26 +00:00
cvsdist
fedb53a7a2 auto-import changelog data from am-utils-6.0.5-1.src.rpm
Sat Apr 07 2001 Nalin Dahyabhai <nalin@redhat.com>
- update to 6.0.5
- remove /net from the default MOUNTPTS
Tue Mar 13 2001 Nalin Dahyabhai <nalin@redhat.com>
- use MOUNTPTS when starting
Fri Mar 02 2001 Nalin Dahyabhai <nalin@redhat.com>
- rebuild in new environment
Wed Feb 14 2001 Nalin Dahyabhai <nalin@redhat.com>
- redo i18n for the init script
Tue Jan 23 2001 Nalin Dahyabhai <nalin@redhat.com>
- re-do workaround from advice from the am-utils maintainers
- redo i18n for the init script
Sat Jan 20 2001 Nalin Dahyabhai <nalin@redhat.com>
- work around clash with nfs3_fh definition in 2.4
Tue Jan 16 2001 Nalin Dahyabhai <nalin@redhat.com>
- gettextize the init script (#24087)
Tue Dec 19 2000 Nalin Dahyabhai <nalin@redhat.com>
- add ldconfig to %postun
- chuck the hesiod patch -- new bind-utils doesn't have the support for it
Fri Sep 08 2000 Nalin Dahyabhai <nalin@redhat.com>
- rebuild in new environment
2004-09-09 02:55:20 +00:00
cvsdist
f65ef2b861 auto-import changelog data from am-utils-6.0.4s5-8.src.rpm
Sat Jul 15 2000 Bill Nottingham <notting@redhat.com>
- move initscript back
Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild
Thu Jul 06 2000 Nalin Dahyabhai <nalin@redhat.com>
- only create /var/lock/subsys/amd if startup succeeds
- revamp shutdown procedure to minimize time spent just spinning
- change initscripts dependency to /etc/init.d
Tue Jul 04 2000 Florian La Roche <Florian.LaRoche@redhat.com>
- delete noreplace from initscript
Wed Jun 28 2000 Nalin Dahyabhai <nalin@redhat.com>
- fix postun script
- add requires: initscripts
Tue Jun 27 2000 Nalin Dahyabhai <nalin@redhat.com>
- remove unnecessary libamu.so symlink
Mon Jun 26 2000 Nalin Dahyabhai <nalin@redhat.com>
- move init script to /etc/init.d
- add URL: tag
Wed Jun 21 2000 Preston Brown <pbrown@redhat.com>
- noreplace config files
- gracefully stop/restart service
Fri Jun 16 2000 Matt Wilson <msw@redhat.com>
- FHS paths
- 6.0.4 snapshot (as it builds against kernel 2.4 headers)
Wed Feb 16 2000 Cristian Gafton <gafton@redhat.com>
- version 6.0.3
- enhance init script to be more wait4amd2die-like
- make default map type to be file (#9185)
- get rid of the kludges
Thu Feb 03 2000 Cristian Gafton <gafton@redhat.com>
- man pages are compressed
- version 6.0.2
- fix descriptions
Mon Sep 13 1999 Cristian Gafton <gafton@redhat.com>
- version 6.0.1 final
Tue Aug 24 1999 Cristian Gafton <gafton@redhat.com>
- remove the noldap patch
- add amd.net file as the default config map file
- change the config file to teh new config file format instead of a simple
    map file name.
- try to avoid some damage with a new %pre script
- prereq grep now
- modify the init file so it calls amd -F /etc/amd.conf now
Tue Aug 24 1999 Bill Nottingham <notting@redhat.com>
- update to 6.0.1s11
Sat Jun 19 1999 Bill Nottingham <notting@redhat.com>
- don't run by default
Mon May 31 1999 Kenneth Skaar <kenneths@regina.uio.no>
- Fixed amd -F core dump and related dumps by other programs
Thu Apr 08 1999 Preston Brown <pbrown@redhat.com>
- kill -HUP on reload, restart does a real restart.
Fri Mar 26 1999 Bill Nottingham <notting@redhat.com>
- twiddle an echo in initscript
Tue Mar 23 1999 Cristian Gafton <gafton@redhat.com>
- version 6.0 proper
- Serial:1 because to enforce versioning
Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
- auto rebuild in the new build environment (release 6)
Wed Jan 06 1999 Cristian Gafton <gafton@redhat.com>
- rebuild for glibc 2.1
- strip all binaries
Thu Aug 13 1998 Jeff Johnson <jbj@redhat.com>
- add missing ':' to default 'opts:=nosuid,nodev'
- install info pages
Mon Jul 13 1998 Cristian Gafton <gafton@redhat.com>
- added the NIS support that the broken configure script failed to detect
Tue May 05 1998 Cristian Gafton <gafton@redhat.com>
- disabled autofs support on alpha
- run ldconfig in postinstall
Mon May 04 1998 Cristian Gafton <gafton@redhat.com>
- new package to replace the old and unmaintained amd
2004-09-09 02:55:14 +00:00
61 changed files with 13501 additions and 6 deletions

View file

6
.gitignore vendored Normal file
View file

@ -0,0 +1,6 @@
am-utils-6.1.5.tar.gz
*~
*.log
*.rpm
/am-utils-6.2.0-1.git.bb13dea6.tar.gz
/am-utils-6.2.tar.gz

View file

@ -1,6 +0,0 @@
# Makefile for source rpm: am-utils
# $Id$
NAME := am-utils
SPECFILE = $(firstword $(wildcard *.spec))
include ../common/Makefile.common

View file

@ -0,0 +1,145 @@
commit a6bbb7d9b098dacd2636925c232c630452e4b46e
Author: Christos Zoulas <christos@zoulas.com>
Date: Sun Jan 18 18:03:37 2015 -0500
32 bit fixes
diff --git a/amd/amq_subr.c b/amd/amq_subr.c
index 8783611..86f0351 100644
--- a/amd/amq_subr.c
+++ b/amd/amq_subr.c
@@ -528,6 +528,7 @@ xdr_amq_map_info_qelem(XDR *xdrs, qelem *qhead)
u_int len = 0;
int x;
char *n;
+ long modify;
/*
* Compute length of list
@@ -552,7 +553,8 @@ xdr_amq_map_info_qelem(XDR *xdrs, qelem *qhead)
return (FALSE);
}
- if (!xdr_long(xdrs, &m->modify)) {
+ modify = (long)m->modify;
+ if (!xdr_long(xdrs, &modify)) {
return (FALSE);
}
diff --git a/amd/nfs_subr.c b/amd/nfs_subr.c
index e463ff7..7192a6a 100644
--- a/amd/nfs_subr.c
+++ b/amd/nfs_subr.c
@@ -1104,9 +1104,9 @@ am_nfs3_getattr_3_svc(am_GETATTR3args *argp, struct svc_req *rqstp)
result.status = AM_NFS3_OK;
if (amuDebug(D_TRACE))
- plog(XLOG_DEBUG, "\tstat(%s), size = %lu, mtime=%d.%d",
+ plog(XLOG_DEBUG, "\tstat(%s), size = %llu, mtime=%d.%d",
mp->am_path,
- (am_size3) fattr3->size,
+ (unsigned long long)fattr3->size,
(u_int) fattr3->mtime.seconds,
(u_int) fattr3->mtime.nseconds);
diff --git a/amd/readdir.c b/amd/readdir.c
index 4b5e61b..57773a5 100644
--- a/amd/readdir.c
+++ b/amd/readdir.c
@@ -635,7 +635,7 @@ static size_t needroom3(void)
/* This one is called only if map is browsable */
static int
-amfs_readdir3_browsable(am_node *mp, am_cookie3 cookie,
+amfs_readdir3_browsable(am_node *mp, voidp cookie,
am_dirlist3 *dp, am_entry3 *ep, u_int count,
int fully_browsable)
{
@@ -647,7 +647,8 @@ amfs_readdir3_browsable(am_node *mp, am_cookie3 cookie,
dp->eof = FALSE; /* assume readdir not done */
if (amuDebug(D_READDIR))
- plog(XLOG_DEBUG, "amfs_readdir3_browsable gen=%lu, count=%d", gen, count);
+ plog(XLOG_DEBUG, "%s: gen=%llu, count=%d", __func__,
+ (unsigned long long)gen, count);
if (gen == 0) {
size_t needed = needroom3();
@@ -732,8 +733,9 @@ amfs_readdir3_browsable(am_node *mp, am_cookie3 cookie,
for (j = 0, ne = te; ne; ne = ne->ne_nextentry)
plog(XLOG_DEBUG, "gen2 key %4d \"%s\"", j++, ne->name);
for (j = 0, ne = ep; ne; ne = ne->ne_nextentry) {
- plog(XLOG_DEBUG, "gen2+ key %4d \"%s\" fi=%lu ck=%lu",
- j++, ne->name, ne->fileid, ne->cookie);
+ plog(XLOG_DEBUG, "gen2+ key %4d \"%s\" fi=%llu ck=%llu",
+ j++, ne->name, (unsigned long long)ne->fileid,
+ (unsigned long long)ne->cookie);
}
plog(XLOG_DEBUG, "EOF is %d", dp->eof);
}
@@ -793,14 +795,15 @@ amfs_readdir3_browsable(am_node *mp, am_cookie3 cookie,
}
static int
-amfs_readdir3(am_node *mp, am_cookie3 cookie,
+amfs_readdir3(am_node *mp, voidp cookie,
am_dirlist3 *dp, am_entry3 *ep, u_int count)
{
uint64 gen = *(uint64 *) cookie;
am_node *xp;
if (amuDebug(D_READDIR))
- plog(XLOG_DEBUG, "amfs_readdir3 gen=%lu, count=%d", gen, count);
+ plog(XLOG_DEBUG, "%s: gen=%llu, count=%d", __func__,
+ (unsigned long long)gen, count);
dp->eof = FALSE; /* assume readdir not done */
@@ -847,8 +850,9 @@ amfs_readdir3(am_node *mp, am_cookie3 cookie,
am_entry3 *ne;
int j;
for (j = 0, ne = ep; ne; ne = ne->nextentry) {
- plog(XLOG_DEBUG, "gen1 key %4d \"%s\" fi=%lu ck=%lu",
- j++, ne->name, ne->fileid, ne->cookie);
+ plog(XLOG_DEBUG, "gen1 key %4d \"%s\" fi=%llu ck=%llu",
+ j++, ne->name, (unsigned long long)ne->fileid,
+ (unsigned long long)ne->cookie);
}
}
return 0;
@@ -907,8 +911,9 @@ amfs_readdir3(am_node *mp, am_cookie3 cookie,
am_entry3 *ne;
int j;
for (j = 0, ne = ep; ne; ne = ne->nextentry) {
- plog(XLOG_DEBUG, "gen2 key %4d \"%s\" fi=%lu ck=%lu",
- j++, ne->name, ne->fileid, ne->cookie);
+ plog(XLOG_DEBUG, "gen2 key %4d \"%s\" fi=%llu ck=%llu",
+ j++, ne->name, (unsigned long long)ne->fileid,
+ (unsigned long long)ne->cookie);
}
}
return 0;
@@ -944,8 +949,8 @@ amfs_generic_readdir(am_node *mp, voidp cookie, voidp dp, voidp ep, u_int count)
return amfs_readdir(mp, cookie, dp, ep, count);
} else {
if (browsable)
- return amfs_readdir3_browsable(mp, (am_cookie3) cookie, dp, ep, count, full);
+ return amfs_readdir3_browsable(mp, cookie, dp, ep, count, full);
else
- return amfs_readdir3(mp, (am_cookie3) cookie, dp, ep, count);
+ return amfs_readdir3(mp, cookie, dp, ep, count);
}
}
diff --git a/amq/amq.c b/amq/amq.c
index 5d4ed7a..dc5fe02 100644
--- a/amq/amq.c
+++ b/amq/amq.c
@@ -79,7 +79,7 @@ enum show_opt {
static void
time_print(time_type tt)
{
- time_t t = (time_t)tt;
+ time_t t = (time_t)*tt;
struct tm *tp = localtime(&t);
printf("%02d/%02d/%04d %02d:%02d:%02d",
tp->tm_mon + 1, tp->tm_mday,

View file

@ -0,0 +1,64 @@
commit cb493f02ca3b8fbf0dba18d5a733345f54513300
Author: zoulasc <christos@zoulas.com>
Date: Mon Mar 7 18:03:19 2016 -0500
1. Add the "sys" alias for "unix", as well as "none", and "null"
2. Properly handle multiple flavors, although the linux kernel does not (yet?)
3. Don't add the "sec=" field, because it is already there.
diff --git a/libamu/mount_fs.c b/libamu/mount_fs.c
index 87f64c3..366eb8b 100644
--- a/libamu/mount_fs.c
+++ b/libamu/mount_fs.c
@@ -1076,7 +1076,10 @@ struct {
const char *name;
int num;
} flavours[] = {
+ { "none", AUTH_NONE },
+ { "null", AUTH_NULL },
{ "unix", AUTH_UNIX },
+ { "sys", AUTH_SYS },
{ "krb5", RPC_AUTH_GSS_KRB5 },
{ "krb5i", RPC_AUTH_GSS_KRB5I },
{ "krb5p", RPC_AUTH_GSS_KRB5P },
@@ -1104,12 +1107,13 @@ set_nfs4_security(nfs4_args_t *nap, mntent_t *mntp)
nap->auth_flavours = xmalloc(l * sizeof(*nap->auth_flavours));
s = ss = xstrdup(o);
+ l = 0;
for (;;) {
q = strchr(s, ',');
if (q)
*q = '\0';
- for (l = 0, i = 0; i < sizeof(flavours) / sizeof(flavours[0]); i++)
+ for (i = 0; i < sizeof(flavours) / sizeof(flavours[0]); i++)
if (strcmp(flavours[i].name, s) == 0) {
nap->auth_flavours[l++] = flavours[i].num;
break;
@@ -1125,6 +1129,9 @@ set_nfs4_security(nfs4_args_t *nap, mntent_t *mntp)
s = ++q;
}
+ if (l == 0) {
+ nap->auth_flavours[l++] = AUTH_UNIX;
+ }
nap->auth_flavourlen = l;
return ss;
}
@@ -1172,12 +1179,15 @@ add_nfs4_mntopts(const nfs4_args_t *nap, mntent_t *mntp, char *sec)
opts = xrealloc(mntp->mnt_opts, len);
xstrlcat(opts, buf, len);
+#ifdef notdef
+ /* Already in the options */
if (sec) {
xstrlcat(opts, ",", len);
xstrlcat(opts, MNTTAB_OPT_SEC, len);
xstrlcat(opts, "=", len);
xstrlcat(opts, sec, len);
}
+#endif
mntp->mnt_opts = opts;
}

View file

@ -0,0 +1,58 @@
commit 3369871a5e68484e231705bb0a893b4c6da85d17
Author: zoulasc <christos@zoulas.com>
Date: Mon Mar 7 18:05:07 2016 -0500
Default to "string" mount options for NFSv4 because the kernel does not
properly handle the auth_flavours[] field. Tested with nfs-utils-1.3.3 and
it always defaults to krb5i if string options are not used. Please note
that the "rw" option is not recognized by the linux kernel.
diff --git a/conf/mount/mount_linux.c b/conf/mount/mount_linux.c
index d3841ce..de7708d 100644
--- a/conf/mount/mount_linux.c
+++ b/conf/mount/mount_linux.c
@@ -450,7 +450,7 @@ do_mount_linux(MTYPE_TYPE type, mntent_t *mnt, int flags, caddr_t data)
return mount(mnt->mnt_fsname,
mnt->mnt_dir,
type,
- MS_MGC_VAL | flags,
+ flags,
data);
}
@@ -566,9 +566,9 @@ mount_linux_nfs(MTYPE_TYPE type, mntent_t *mnt, int flags, caddr_t data)
plog(XLOG_DEBUG, "%s: port %d\n", __func__,
htons(mnt_data->addr.sin_port));
}
+ flags |= MS_MGC_VAL;
if (amuDebug(D_TRACE)) {
- plog(XLOG_DEBUG, "%s: Generic mount flags 0x%x", __func__,
- MS_MGC_VAL | flags);
+ plog(XLOG_DEBUG, "%s: Generic mount flags 0x%x", __func__, flags);
plog(XLOG_DEBUG, "%s: updated nfs_args...", __func__);
print_nfs_args(mnt_data, 0);
}
@@ -610,14 +610,21 @@ mount_linux_nfs4(MTYPE_TYPE type, mntent_t *mnt, int flags, caddr_t data)
plog(XLOG_DEBUG, "%s: type %s\n", __func__, type);
plog(XLOG_DEBUG, "%s: version %d\n", __func__, mnt_data->version);
}
+#if 0
+ flags |= MS_MGC_VAL;
+#endif
if (amuDebug(D_TRACE)) {
- plog(XLOG_DEBUG, "%s: Generic mount flags 0x%x", __func__,
- MS_MGC_VAL | flags);
+ plog(XLOG_DEBUG, "%s: Generic mount flags 0x%x", __func__, flags);
plog(XLOG_DEBUG, "%s: updated nfs_args...", __func__);
print_nfs_args(mnt_data, NFS_VERSION4);
}
+#if 0
errorcode = do_mount_linux(type, mnt, flags, data);
+#else
+ errorcode = do_mount_linux(type, mnt, flags, mnt->mnt_opts);
+#endif
+
return errorcode;
}

View file

@ -0,0 +1,19 @@
commit 6a12fc0acb3afb654ba5e6efdeb28b943e2efd3e
Author: zoulasc <christos@zoulas.com>
Date: Thu Mar 31 14:56:53 2016 -0400
Fix SEGV on amq entries that print times.
diff --git a/amq/amq.c b/amq/amq.c
index dc5fe02..04f9e4d 100644
--- a/amq/amq.c
+++ b/amq/amq.c
@@ -79,7 +79,7 @@ enum show_opt {
static void
time_print(time_type tt)
{
- time_t t = (time_t)*tt;
+ time_t t = (time_t)(intptr_t)tt;
struct tm *tp = localtime(&t);
printf("%02d/%02d/%04d %02d:%02d:%02d",
tp->tm_mon + 1, tp->tm_mday,

View file

@ -0,0 +1,71 @@
commit 1c4c00a489d7aef115020b903dcd10201eb56ac0
Author: zoulasc <christos@zoulas.com>
Date: Thu Apr 30 14:24:39 2015 -0400
Fix nfs args setting code (raven at the maw dot net)
diff --git a/ChangeLog b/ChangeLog
index fd05087..64be682 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-04-30 Christos Zoulas <christos@zoulas.com>
+
+ * fix compilation error in nfs args set code.
+ (raven at themaw.net)
+
2015-01-17 Christos Zoulas <christos@zoulas.com>
* Move libtool macro functions from m4/macros to m4 and delete
diff --git a/libamu/mount_fs.c b/libamu/mount_fs.c
index b577bab..87f64c3 100644
--- a/libamu/mount_fs.c
+++ b/libamu/mount_fs.c
@@ -1001,12 +1001,12 @@ compute_nfs23_args(nfs_args_t *nap,
#ifdef MNTTAB_OPT_SYMTTL /* symlink cache time-to-live */
if ((nap->symttl = hasmntval(mntp, MNTTAB_OPT_SYMTTL)))
- nap->args.flags |= MNT2_NFS_OPT_SYMTTL;
+ nap->flags |= MNT2_NFS_OPT_SYMTTL;
#endif /* MNTTAB_OPT_SYMTTL */
#ifdef MNT2_NFS_OPT_PGTHRESH /* paging threshold */
if ((nap->pg_thresh = hasmntval(mntp, MNTTAB_OPT_PGTHRESH)))
- nap->args.flags |= MNT2_NFS_OPT_PGTHRESH;
+ nap->flags |= MNT2_NFS_OPT_PGTHRESH;
#endif /* MNT2_NFS_OPT_PGTHRESH */
#if defined(MNT2_NFS_OPT_POSIX) && defined(MNTTAB_OPT_POSIX)
@@ -1029,12 +1029,12 @@ compute_nfs23_args(nfs_args_t *nap,
return;
}
/* update the flags field for knconf */
- nap->args.flags |= MNT2_NFS_OPT_KNCONF;
+ nap->flags |= MNT2_NFS_OPT_KNCONF;
#endif /* HAVE_TRANSPORT_TYPE_TLI */
#ifdef MNT2_NFS_OPT_FSNAME
nap->fsname = fs_name;
- nap->args.flags |= MNT2_NFS_OPT_FSNAME;
+ nap->flags |= MNT2_NFS_OPT_FSNAME;
#endif /* MNT2_NFS_OPT_FSNAME */
@@ -1323,7 +1323,7 @@ compute_nfs4_args(nfs4_args_t *nap,
#if defined(MNT2_NFS_OPT_POSIX) && defined(MNTTAB_OPT_POSIX)
if (amu_hasmntopt(mntp, MNTTAB_OPT_POSIX) != NULL) {
- nap->args.flags |= MNT2_NFS_OPT_POSIX;
+ nap->flags |= MNT2_NFS_OPT_POSIX;
# ifdef HAVE_NFS_ARGS_T_PATHCONF
nap->pathconf = NULL;
# endif /* HAVE_NFS_ARGS_T_PATHCONF */
@@ -1333,7 +1333,7 @@ compute_nfs4_args(nfs4_args_t *nap,
#if defined(MNT2_NFS_OPT_MAXGRPS) && defined(MNTTAB_OPT_MAXGROUPS)
nap->maxgrouplist = hasmntval(mntp, MNTTAB_OPT_MAXGROUPS);
if (nap->maxgrouplist != 0)
- nap->args.flags |= MNT2_NFS_OPT_MAXGRPS;
+ nap->flags |= MNT2_NFS_OPT_MAXGRPS;
#endif /* defined(MNT2_NFS_OPT_MAXGRPS) && defined(MNTTAB_OPT_MAXGROUPS) */
#ifdef HAVE_NFS_ARGS_T_OPTSTR

View file

@ -0,0 +1,36 @@
commit 227ce116a307a7f38967639c94ad74970ee83700
Author: zoulasc <christos@zoulas.com>
Date: Tue Mar 8 23:30:38 2016 -0500
Improve debugging for unmounting.
diff --git a/amd/map.c b/amd/map.c
index bcb2156..a6df44b 100644
--- a/amd/map.c
+++ b/amd/map.c
@@ -904,10 +904,8 @@ unmount_mp(am_node *mp)
int was_backgrounded = 0;
mntfs *mf = mp->am_al->al_mnt;
-#ifdef notdef
plog(XLOG_INFO, "\"%s\" on %s timed out (flags 0x%x)",
- mp->am_path, mf->mf_mount, (int) mf->mf_flags);
-#endif /* notdef */
+ mp->am_path, mf->mf_mount, (int) mf->mf_flags);
#ifndef MNT2_NFS_OPT_SYMTTL
/*
@@ -938,11 +936,12 @@ unmount_mp(am_node *mp)
plog(XLOG_STATS, "file server %s is down - timeout of \"%s\" ignored", mf->mf_server->fs_host, mp->am_path);
mf->mf_flags |= MFF_LOGDOWN;
}
+ dlog("\"%s\" on %s server is down, deferred", mp->am_path, mf->mf_mount);
notify_child(mp, AMQ_UMNT_SERVER, 0, 0);
return 0;
}
- dlog("\"%s\" on %s timed out", mp->am_path, mf->mf_mount);
+ dlog("\"%s\" on %s timed out, unmounting", mp->am_path, mf->mf_mount);
mf->mf_flags |= MFF_UNMOUNTING;
#ifdef HAVE_FS_AUTOFS

View file

@ -0,0 +1,530 @@
commit 1c9cd2d03ab1561b7eee831af381eff781fcf41e
Author: zoulasc <christos@zoulas.com>
Date: Fri Apr 8 15:29:33 2016 -0400
* Make hasmntval() return an 0 on error, 1 on success and
place the value in an argument. Update all users and
check properly for errors. Get rid of hasmntvalerr().
* Add hasmntvaldelim() which takes a string delimiter. This
is now used to chop vers=4.1 to 4, so that we can parse the
version correctly (we don't care about the .1 part yet)
---
amd/autil.c | 10 ++----
amd/ops_cdfs.c | 7 ++++
amd/ops_nfs.c | 3 --
amd/ops_pcfs.c | 10 ++++--
amd/ops_ufs.c | 6 +++-
amd/srvr_nfs.c | 24 ++++++++++------
hlfsd/hlfsd.c | 3 --
include/am_utils.h | 4 +-
libamu/mount_fs.c | 79 ++++++++++++++++++++++++++++++++++++++---------------
libamu/mtab.c | 41 ++++++++-------------------
10 files changed, 109 insertions(+), 78 deletions(-)
--- am-utils-6.2.orig/amd/autil.c
+++ am-utils-6.2/amd/autil.c
@@ -279,7 +279,7 @@ am_mounted(am_node *mp)
if (amu_hasmntopt(&mnt, "nounmount") || amu_hasmntopt(&mnt, "noumount"))
notimeout = 1;
/* utimeout=N option: user wants to unmount this option AND set timeout */
- if ((mp->am_timeo = hasmntval(&mnt, "utimeout")) == 0)
+ if (!hasmntval(&mnt, "utimeout", &mp->am_timeo))
mp->am_timeo = gopt.am_timeo; /* otherwise use default timeout */
else
notimeout = 0;
@@ -480,8 +480,7 @@ amfs_mount(am_node *mp, mntfs *mf, char
mnt.mnt_type = HIDE_MOUNT_TYPE;
}
- retry = hasmntval(&mnt, MNTTAB_OPT_RETRY);
- if (retry <= 0)
+ if (!hasmntval(&mnt, MNTTAB_OPT_RETRY, &retry) || retry <= 0)
retry = 2; /* XXX: default to 2 retries */
/*
@@ -526,7 +525,7 @@ again:
nfs_args_t nfs_args;
am_nfs_handle_t *fhp, anh;
#ifndef HAVE_TRANSPORT_TYPE_TLI
- u_short port;
+ int port;
struct sockaddr_in sin;
#endif /* not HAVE_TRANSPORT_TYPE_TLI */
@@ -547,8 +546,7 @@ again:
/* as per POSIX, sin_len need not be set (used internally by kernel) */
sin.sin_family = AF_INET;
sin.sin_addr = myipaddr;
- port = hasmntval(&mnt, MNTTAB_OPT_PORT);
- if (port) {
+ if (hasmntval(&mnt, MNTTAB_OPT_PORT, &port) && port > 0 && port < 65536) {
sin.sin_port = htons(port);
} else {
plog(XLOG_ERROR, "no port number specified for %s", dir);
--- am-utils-6.2.orig/amd/ops_cdfs.c
+++ am-utils-6.2/amd/ops_cdfs.c
@@ -190,7 +190,12 @@ mount_cdfs(char *mntdir, char *fs_name,
#endif /* HAVE_CDFS_ARGS_T_ISO_FLAGS */
#ifdef HAVE_CDFS_ARGS_T_ISO_PGTHRESH
- cdfs_args.iso_pgthresh = hasmntval(&mnt, MNTTAB_OPT_PGTHRESH);
+ {
+ int thresh;
+ if (!hasmntval(&mnt, MNTTAB_OPT_PGTHRESH, &thresh) || thresh < 0)
+ thresh = 0;
+ cdfs_args.iso_pgthresh = thresh;
+ }
#endif /* HAVE_CDFS_ARGS_T_ISO_PGTHRESH */
#ifdef HAVE_CDFS_ARGS_T_NORRIP
--- am-utils-6.2.orig/amd/ops_nfs.c
+++ am-utils-6.2/amd/ops_nfs.c
@@ -888,8 +888,7 @@ mount_nfs_fh(am_nfs_handle_t *fhp, char
plog(XLOG_INFO, "mount_nfs_fh: NFS version %d", (int) nfs_version);
plog(XLOG_INFO, "mount_nfs_fh: using NFS transport %s", nfs_proto);
- retry = hasmntval(&mnt, MNTTAB_OPT_RETRY);
- if (retry <= 0)
+ if (!hasmntval(&mnt, MNTTAB_OPT_RETRY, &retry) || retry <= 0)
retry = 1; /* XXX */
genflags = compute_mount_flags(&mnt);
--- am-utils-6.2.orig/amd/ops_pcfs.c
+++ am-utils-6.2/amd/ops_pcfs.c
@@ -139,17 +139,19 @@ mount_pcfs(char *mntdir, char *fs_name,
#endif /* HAVE_PCFS_ARGS_T_FSPEC */
#ifdef HAVE_PCFS_ARGS_T_MASK
- pcfs_args.mask = 0777; /* this may be the msdos file modes */
- if ((mask = hasmntval(&mnt, MNTTAB_OPT_MASK)) > 0)
+ if (hasmntval(&mnt, MNTTAB_OPT_MASK, &mask) && mask > 0)
pcfs_args.mask = mask;
+ else
+ pcfs_args.mask = 0777; /* this may be the msdos file modes */
if (amuDebug(D_TRACE))
plog(XLOG_DEBUG, "mount_pcfs: mask=%o (octal)", (u_int) pcfs_args.mask);
#endif /* HAVE_PCFS_ARGS_T_MASK */
#ifdef HAVE_PCFS_ARGS_T_DIRMASK
- pcfs_args.dirmask = 0777; /* this may be the msdos dir modes */
- if ((mask = hasmntval(&mnt, MNTTAB_OPT_DIRMASK)) > 0)
+ if (hasmntval(&mnt, MNTTAB_OPT_DIRMASK, &mask) && mask > 0)
pcfs_args.dirmask = mask;
+ else
+ pcfs_args.dirmask = 0777; /* this may be the msdos dir modes */
if (amuDebug(D_TRACE))
plog(XLOG_DEBUG, "mount_pcfs: dirmask=%o (octal)", (u_int) pcfs_args.dirmask);
#endif /* HAVE_PCFS_ARGS_T_DIRMASK */
--- am-utils-6.2.orig/amd/ops_ufs.c
+++ am-utils-6.2/amd/ops_ufs.c
@@ -144,7 +144,11 @@ mount_ufs(char *mntdir, char *fs_name, c
#endif /* HAVE_UFS_ARGS_T_FSPEC */
#ifdef HAVE_UFS_ARGS_T_UFS_PGTHRESH
- ufs_args.ufs_pgthresh = hasmntval(&mnt, MNTTAB_OPT_PGTHRESH);
+ {
+ int thresh;
+ if (!hasmntval(&mnt, MNTTAB_OPT_PGTHRESH, &thresh) || thresh < 0)
+ thresh = 0;
+ ufs_args.ufs_pgthresh = thresh;
#endif /* HAVE_UFS_ARGS_T_UFS_PGTHRESH */
/*
--- am-utils-6.2.orig/amd/srvr_nfs.c
+++ am-utils-6.2/amd/srvr_nfs.c
@@ -704,10 +704,10 @@ find_nfs_srvr(mntfs *mf)
struct hostent *hp = NULL;
struct sockaddr_in *ip = NULL;
u_long nfs_version = 0; /* default is no version specified */
+ int val;
u_long best_nfs_version = 0;
char *nfs_proto = NULL; /* no IP protocol either */
- int nfs_port = 0;
- int nfs_port_opt = 0;
+ int nfs_port;
int fserver_is_down = 0;
if (mf->mf_fo == NULL) {
@@ -721,7 +721,8 @@ find_nfs_srvr(mntfs *mf)
* are required or not. < 0 = no pings.
*/
mnt.mnt_opts = mf->mf_mopts;
- pingval = hasmntval(&mnt, "ping");
+ if (!hasmntval(&mnt, "ping", &pingval) || pingval < 0)
+ pingval = 0;
if (mf->mf_flags & MFF_NFS_SCALEDOWN) {
/*
@@ -739,7 +740,10 @@ find_nfs_srvr(mntfs *mf)
* to decide the highest NFS version to try.
*/
#ifdef MNTTAB_OPT_VERS
- nfs_version = hasmntval(&mnt, MNTTAB_OPT_VERS);
+ if (!hasmntvaldelim(&mnt, MNTTAB_OPT_VERS, ",.", &val) || val < 0)
+ nfs_version = 0;
+ else
+ nfs_version = val;
#endif /* MNTTAB_OPT_VERS */
#ifdef MNTTAB_OPT_PROTO
@@ -934,11 +938,11 @@ find_nfs_srvr(mntfs *mf)
* If the port has been determined from the portmapper, use that.
* Default to NFS_PORT otherwise (cf. RFC 2054, 3).
*/
- nfs_port_opt = hasmntval(&mnt, MNTTAB_OPT_PORT);
- if (nfs_port_opt > 0)
- nfs_port = htons(nfs_port_opt);
- if (!nfs_port)
+ if (!hasmntval(&mnt, MNTTAB_OPT_PORT, &nfs_port)
+ || nfs_port > 65535 || nfs_port <= 0)
nfs_port = htons(NFS_PORT);
+ else
+ nfs_port = htons(nfs_port);
dlog("%s: using port %d for nfs on %s", __func__,
(int) ntohs(nfs_port), host);
@@ -1050,7 +1054,9 @@ no_dns:
fs->fs_flags |= FSF_PING_UNINIT; /* pinger hasn't been initialized */
np = ALLOC(struct nfs_private);
memset((voidp) np, 0, sizeof(*np));
- np->np_mountd = htons(hasmntval(&mnt, "mountport"));
+ if (!hasmntval(&mnt, "mountport", &val) || val < 0)
+ val = 0;
+ np->np_mountd = htons(val);
if (np->np_mountd == 0) {
np->np_mountd_inval = 'Y';
np->np_xid = XID_ALLOC();
--- am-utils-6.2.orig/hlfsd/hlfsd.c
+++ am-utils-6.2/hlfsd/hlfsd.c
@@ -530,8 +530,7 @@ main(int argc, char *argv[])
genflags = compute_mount_flags(&mnt);
- retry = hasmntval(&mnt, MNTTAB_OPT_RETRY);
- if (retry <= 0)
+ if (!hasmntval(&mnt, MNTTAB_OPT_RETRY, &retry) || retry <= 0)
retry = 1; /* XXX */
memmove(&anh.v2, root_fhp, sizeof(*root_fhp));
--- am-utils-6.2.orig/include/am_utils.h
+++ am-utils-6.2/include/am_utils.h
@@ -290,8 +290,8 @@ extern int compute_mount_flags(mntent_t
extern void discard_nfs_args(void *, u_long);
extern u_long get_amd_program_number(void);
extern int getcreds(struct svc_req *, uid_t *, gid_t *, SVCXPRT *);
-extern int hasmntval(mntent_t *, char *);
-extern unsigned int hasmntvalerr(mntent_t *, char *, int *);
+extern int hasmntval(mntent_t *, char *, int *);
+extern int hasmntvaldelim(mntent_t *, char *, const char *, int *);
extern char *hasmntstr(mntent_t *, char *);
extern char *hasmnteq(mntent_t *, char *);
extern char *haseq(char *);
--- am-utils-6.2.orig/libamu/mount_fs.c
+++ am-utils-6.2/libamu/mount_fs.c
@@ -188,8 +188,10 @@ static void
addvers(char *zopts, size_t l, mntent_t *mnt, u_long have_vers,
u_long want_vers)
{
- if (have_vers == want_vers &&
- hasmntval(mnt, MNTTAB_OPT_VERS) != want_vers) {
+ int val;
+ if (have_vers == want_vers
+ && hasmntvaldelim(mnt, MNTTAB_OPT_VERS, ".,", &val)
+ && (u_long)val != want_vers) {
char optsbuf[48];
xsnprintf(optsbuf, sizeof(optsbuf),
"%s=%d", MNTTAB_OPT_VERS, want_vers);
@@ -391,7 +393,7 @@ compute_nfs_attrcache_flags(struct nfs_c
* on the values of the attribute caches.
*/
#ifdef MNTTAB_OPT_ACTIMEO
- err_acval = hasmntvalerr(mntp, MNTTAB_OPT_ACTIMEO, &acval); /* attr cache timeout (sec) */
+ err_acval = !hasmntval(mntp, MNTTAB_OPT_ACTIMEO, &acval); /* attr cache timeout (sec) */
#endif /* MNTTAB_OPT_ACTIMEO */
/*** acregmin ***/
@@ -402,7 +404,7 @@ compute_nfs_attrcache_flags(struct nfs_c
} else {
# ifdef MNTTAB_OPT_ACREGMIN
int tmp;
- err_acrdmm = hasmntvalerr(mntp, MNTTAB_OPT_ACREGMIN, &tmp);
+ err_acrdmm = !hasmntval(mntp, MNTTAB_OPT_ACREGMIN, &tmp);
nap->acregmin = tmp;
# else /* not MNTTAB_OPT_ACREGMIN */
nap->acregmin = 0;
@@ -423,7 +425,7 @@ compute_nfs_attrcache_flags(struct nfs_c
} else {
# ifdef MNTTAB_OPT_ACREGMAX
int tmp;
- err_acrdmm = hasmntvalerr(mntp, MNTTAB_OPT_ACREGMAX, &tmp);
+ err_acrdmm = !hasmntval(mntp, MNTTAB_OPT_ACREGMAX, &tmp);
nap->acregmax = tmp;
# else /* not MNTTAB_OPT_ACREGMAX */
nap->acregmax = 0;
@@ -444,7 +446,7 @@ compute_nfs_attrcache_flags(struct nfs_c
} else {
# ifdef MNTTAB_OPT_ACDIRMIN
int tmp;
- err_acrdmm = hasmntvalerr(mntp, MNTTAB_OPT_ACDIRMIN, &tmp);
+ err_acrdmm = !hasmntval(mntp, MNTTAB_OPT_ACDIRMIN, &tmp);
nap->acdirmin = tmp;
# else /* not MNTTAB_OPT_ACDIRMIN */
nap->acdirmin = 0;
@@ -465,7 +467,7 @@ compute_nfs_attrcache_flags(struct nfs_c
} else {
# ifdef MNTTAB_OPT_ACDIRMAX
int tmp;
- err_acrdmm = hasmntvalerr(mntp, MNTTAB_OPT_ACDIRMAX, &tmp);
+ err_acrdmm = !hasmntval(mntp, MNTTAB_OPT_ACDIRMAX, &tmp);
nap->acdirmax = tmp;
# else /* not MNTTAB_OPT_ACDIRMAX */
nap->acdirmax = 0;
@@ -492,6 +494,7 @@ static void
compute_nfs_common_args(struct nfs_common_args *nap, mntent_t *mntp,
const char *nfs_proto, u_long nfs_version)
{
+ int val;
#ifdef MNT2_NFS_OPT_TCP
if (nfs_proto && STREQ(nfs_proto, "tcp"))
nap->flags |= MNT2_NFS_OPT_TCP;
@@ -536,7 +539,10 @@ compute_nfs_common_args(struct nfs_commo
# endif /* not MNTTAB_OPT_RESVPORT */
#endif /* MNT2_NFS_OPT_RESVPORT */
- nap->rsize = hasmntval(mntp, MNTTAB_OPT_RSIZE);
+ if (!hasmntval(mntp, MNTTAB_OPT_RSIZE, &val) || val <= 0)
+ nap->rsize = 0;
+ else
+ nap->rsize = val;
#ifdef MNT2_NFS_OPT_RSIZE
if (nap->rsize)
nap->flags |= MNT2_NFS_OPT_RSIZE;
@@ -544,7 +550,10 @@ compute_nfs_common_args(struct nfs_commo
if (nfs_version == NFS_VERSION && nap->rsize > 8192)
nap->rsize = 8192;
- nap->wsize = hasmntval(mntp, MNTTAB_OPT_WSIZE);
+ if (!hasmntval(mntp, MNTTAB_OPT_WSIZE, &val) || val <= 0)
+ nap->wsize = 0;
+ else
+ nap->wsize = val;
#ifdef MNT2_NFS_OPT_WSIZE
if (nap->wsize)
nap->flags |= MNT2_NFS_OPT_WSIZE;
@@ -552,13 +561,19 @@ compute_nfs_common_args(struct nfs_commo
if (nfs_version == NFS_VERSION && nap->wsize > 8192)
nap->wsize = 8192;
- nap->timeo = hasmntval(mntp, MNTTAB_OPT_TIMEO);
+ if (!hasmntval(mntp, MNTTAB_OPT_TIMEO, &val) || val <= 0)
+ nap->timeo = 0;
+ else
+ nap->timeo = val;
#ifdef MNT2_NFS_OPT_TIMEO
if (nap->timeo)
nap->flags |= MNT2_NFS_OPT_TIMEO;
#endif /* MNT2_NFS_OPT_TIMEO */
- nap->retrans = hasmntval(mntp, MNTTAB_OPT_RETRANS);
+ if (!hasmntval(mntp, MNTTAB_OPT_RETRANS, &val) || val <= 0)
+ nap->retrans = 0;
+ else
+ nap->retrans = val;
#ifdef MNT2_NFS_OPT_RETRANS
if (nap->retrans)
nap->flags |= MNT2_NFS_OPT_RETRANS;
@@ -861,6 +876,7 @@ compute_nfs23_args(nfs_args_t *nap,
char *host_name,
char *fs_name)
{
+ int val;
struct nfs_common_args a;
/* initialize just in case */
memset((voidp) nap, 0, sizeof(nfs_args_t));
@@ -995,18 +1011,30 @@ compute_nfs23_args(nfs_args_t *nap,
/************************************************************************/
#ifdef MNT2_NFS_OPT_BIODS
- if ((nap->biods = hasmntval(mntp, MNTTAB_OPT_BIODS)))
+ if (!hasmntval(mntp, MNTTAB_OPT_BIODS, &val) || val <= 0)
+ nap->biods = 0;
+ else {
+ nap->biods = val;
nap->flags |= MNT2_NFS_OPT_BIODS;
+ }
#endif /* MNT2_NFS_OPT_BIODS */
#ifdef MNTTAB_OPT_SYMTTL /* symlink cache time-to-live */
- if ((nap->symttl = hasmntval(mntp, MNTTAB_OPT_SYMTTL)))
+ if (!hasmntval(mntp, MNTTAB_OPT_SYMTTL, &val) || val <= 0)
+ nap->symttl = 0;
+ else {
+ nap->symttl = val;
nap->flags |= MNT2_NFS_OPT_SYMTTL;
+ }
#endif /* MNTTAB_OPT_SYMTTL */
#ifdef MNT2_NFS_OPT_PGTHRESH /* paging threshold */
- if ((nap->pg_thresh = hasmntval(mntp, MNTTAB_OPT_PGTHRESH)))
+ if (!hasmntval(mntp, MNTTAB_OPT_PGTHRESH, &val) || val <= 0)
+ nap->pg_thresh = 0;
+ else {
+ nap->pg_thresh = val;
nap->flags |= MNT2_NFS_OPT_PGTHRESH;
+ }
#endif /* MNT2_NFS_OPT_PGTHRESH */
#if defined(MNT2_NFS_OPT_POSIX) && defined(MNTTAB_OPT_POSIX)
@@ -1020,7 +1048,7 @@ compute_nfs23_args(nfs_args_t *nap,
#ifdef HAVE_TRANSPORT_TYPE_TLI
/* set up syncaddr field */
- nap->syncaddr = (struct netbuf *) NULL;
+ nap->syncaddr = NULL;
/* set up knconf field */
if (get_knetconfig(&nap->knconf, nfsncp, nfs_proto) < 0) {
@@ -1043,9 +1071,12 @@ compute_nfs23_args(nfs_args_t *nap,
#endif /* HAVE_NFS_ARGS_T_OPTSTR */
#if defined(MNT2_NFS_OPT_MAXGRPS) && defined(MNTTAB_OPT_MAXGROUPS)
- nap->maxgrouplist = hasmntval(mntp, MNTTAB_OPT_MAXGROUPS);
- if (nap->maxgrouplist != 0)
+ if (!hasmntval(mntp, MNTTAB_OPT_MAXGROUPS, &val) || val <= 0)
+ nap->maxgrouplist = 0;
+ else {
+ nap->maxgrouplist = val;
nap->flags |= MNT2_NFS_OPT_MAXGRPS;
+ }
#endif /* defined(MNT2_NFS_OPT_MAXGRPS) && defined(MNTTAB_OPT_MAXGROUPS) */
/************************************************************************/
@@ -1267,6 +1298,7 @@ compute_nfs4_args(nfs4_args_t *nap,
{
char *s;
struct nfs_common_args a;
+ int val;
uint16_t nfs_port;
/* initialize just in case */
@@ -1304,11 +1336,10 @@ compute_nfs4_args(nfs4_args_t *nap,
nap->host_addr = xmalloc(nap->host_addrlen);
memcpy(nap->host_addr, ip_addr, nap->host_addrlen);
- nfs_port = hasmntval(mntp, MNTTAB_OPT_PORT);
- if (nfs_port == 0)
+ if (!hasmntval(mntp, MNTTAB_OPT_PORT, &val) || val <= 0 || val > 65536)
nfs_port = htons(NFS_PORT);
else
- nfs_port = htons(nfs_port);
+ nfs_port = htons(val);
((struct sockaddr_in *)nap->host_addr)->sin_port = nfs_port;
@@ -1341,9 +1372,13 @@ compute_nfs4_args(nfs4_args_t *nap,
#endif /* MNT2_NFS_OPT_POSIX && MNTTAB_OPT_POSIX */
#if defined(MNT2_NFS_OPT_MAXGRPS) && defined(MNTTAB_OPT_MAXGROUPS)
- nap->maxgrouplist = hasmntval(mntp, MNTTAB_OPT_MAXGROUPS);
- if (nap->maxgrouplist != 0)
+ nap->maxgrouplist =
+ if (!hasmntval(mntp, MNTTAB_OPT_MAXGROUPS, &val) || val <= 0)
+ nap->maxgrouplist = 0;
+ else {
+ nap->maxgrouplist = val;
nap->flags |= MNT2_NFS_OPT_MAXGRPS;
+ }
#endif /* defined(MNT2_NFS_OPT_MAXGRPS) && defined(MNTTAB_OPT_MAXGROUPS) */
#ifdef HAVE_NFS_ARGS_T_OPTSTR
--- am-utils-6.2.orig/libamu/mtab.c
+++ am-utils-6.2/libamu/mtab.c
@@ -133,22 +133,12 @@ hasmnteq(mntent_t *mnt, char *opt)
/*
- * Wrapper around hasmntvalerr(), which retains backwards compatibiliy with
- * older use of hasmntval().
- *
- * XXX: eventually, all use of hasmntval() should be replaced with
- * hasmntvalerr().
+ * Wrapper around hasmntvaldelim(), which uses the standard "," delim
*/
int
-hasmntval(mntent_t *mnt, char *opt)
+hasmntval(mntent_t *mnt, char *opt, int *valp)
{
- int err, val = 0;
-
- err = hasmntvalerr(mnt, opt, &val);
- if (err) /* if there was an error (hasmntvalerr returned 1) */
- return 0; /* redundant: val==0 above, but leave here for clarity */
- /* otherwise there was no error */
- return val;
+ return hasmntvaldelim(mnt, opt, ",", valp);
}
@@ -158,36 +148,31 @@ hasmntval(mntent_t *mnt, char *opt)
* valp (argument won't be touched if no value is set, for example due to an
* error).
*
- * Returns non-zero (1) on error; returns 0 on success.
- *
- * XXX: eventually, all use of hasmntval() should be replaced with
- * hasmntvalerr().
+ * Returns 0 on error; returns 1 on success.
*/
-unsigned int
-hasmntvalerr(mntent_t *mnt, char *opt, int *valp)
+int
+hasmntvaldelim(mntent_t *mnt, char *opt, const char *delim, int *valp)
{
char *str = amu_hasmntopt(mnt, opt);
- int err = 1; /* 1 means no good value was set (an error) */
char *eq, *endptr;
long int i;
/* exit if no option specificed */
- if (!str) {
- goto out;
- }
+ if (!str)
+ return 0;
eq = hasmnteq(mnt, opt);
if (!eq) { /* no argument to option ('=' sign was missing) */
plog(XLOG_MAP, "numeric option to \"%s\" missing", opt);
- goto out;
+ return 0;
}
/* if got here, then we had an '=' after option name */
endptr = NULL;
i = strtol(eq, &endptr, 0); /* hex and octal allowed ;-) */
if (!endptr ||
- (endptr != eq && (*endptr == ',' || *endptr == '\0'))) {
+ (endptr != eq && (*endptr == '\0' || strchr(delim, *endptr)))) {
/*
* endptr set means strtol saw a non-digit. If the non-digit is a
* comma, it's probably the start of the next option. If the comma is
@@ -198,15 +183,13 @@ hasmntvalerr(mntent_t *mnt, char *opt, i
* string.
*/
*valp = (int) i; /* set good value */
- err = 0; /* no error */
+ return 1;
} else {
/* whatever was after the '=' sign wasn't a number */
plog(XLOG_MAP, "invalid numeric option in \"%s\": \"%s\"", opt, str);
/* fall through to error/exit processing */
+ return 0;
}
-
- out:
- return err;
}

View file

@ -0,0 +1,45 @@
commit e7d1bd38b1d1de6b1bec603eeff915ebb57f3c37
Author: zoulasc <christos@zoulas.com>
Date: Thu Mar 10 17:50:34 2016 -0500
- There is really no ti-rpc nfsv4, so don't send one; instead send a v3 for now.
diff --git a/amd/srvr_nfs.c b/amd/srvr_nfs.c
index b7c852c..1418a1a 100644
--- a/amd/srvr_nfs.c
+++ b/amd/srvr_nfs.c
@@ -140,6 +140,7 @@ create_ping_payload(u_long nfs_version)
{
XDR ping_xdr;
struct rpc_msg ping_msg;
+ int rpc_version;
/*
* Non nfs mounts like /afs/glue.umd.edu have ended up here.
@@ -150,7 +151,17 @@ create_ping_payload(u_long nfs_version)
} else
plog(XLOG_INFO, "%s: nfs_version: %d", __func__, (int) nfs_version);
- rpc_msg_init(&ping_msg, NFS_PROGRAM, nfs_version, NFSPROC_NULL);
+ /*
+ * There is really no ti-rpc version for NFSv4; most servers respond
+ * with "program unavailable", which is ok since we don't check the
+ * payload, we just care about the pings. Some servers though are
+ * antisocial (Isilon) and don't respond (which is their right to do).
+ * Eventually we should make a new mechanism to do server pings for
+ * NFSv4, but for now it is easiest to downgrade the RPC version to 3.
+ */
+ rpc_version = nfs_version == 4 ? 3 : nfs_version;
+
+ rpc_msg_init(&ping_msg, NFS_PROGRAM, rpc_version, NFSPROC_NULL);
/*
* Create an XDR endpoint
@@ -600,6 +611,7 @@ nfs_keepalive(voidp v)
case ENETUNREACH:
case EHOSTDOWN:
case EHOSTUNREACH:
+ dlog("Failed to NFS ping to %s (%d)", fs->fs_host, error);
np->np_ping = MAX_ALLOWED_PINGS; /* immediately down */
np->np_ttl = (time_t) 0;
/*

View file

@ -0,0 +1,30 @@
commit ad416c8656c2dff6f1bcffee8517284de94c9d92
Author: zoulasc <christos@zoulas.com>
Date: Thu May 12 10:21:55 2016 -0400
Update the ctime of the directory too, since it changed. From Mark Davies
diff --git a/amd/autil.c b/amd/autil.c
index 35d8708..f44a0e2 100644
--- a/amd/autil.c
+++ b/amd/autil.c
@@ -183,6 +183,7 @@ forcibly_timeout_mp(am_node *mp)
* more.
*/
clocktime(&mp->am_parent->am_fattr.na_mtime);
+ mp->am_parent->am_fattr.na_ctime = mp->am_parent->am_fattr.na_mtime;
reschedule_timeout_mp();
}
}
@@ -312,8 +313,10 @@ am_mounted(am_node *mp)
/*
* Update mtime of parent node (copying "struct nfstime" in '=' below)
*/
- if (mp->am_parent && mp->am_parent->am_al->al_mnt)
+ if (mp->am_parent && mp->am_parent->am_al->al_mnt) {
mp->am_parent->am_fattr.na_mtime = mp->am_fattr.na_mtime;
+ mp->am_parent->am_fattr.na_ctime = mp->am_fattr.na_mtime;
+ }
/*
* This is ugly, but essentially unavoidable

View file

@ -0,0 +1,241 @@
am-utils-6.2 - add NFSv3 nfs_quick_reply() functionality
From: Ian Kent <raven@themaw.net>
The implementation of the NFS v3 server does not use the hack needed
by the nfs_quick_reply() function.
Now that saving the current transort for later use by nfs_quick_reply()
avoids concurrency races it should be ok to use it.
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/nfs_prot_svc.c | 13 +++++
amd/nfs_subr.c | 137 +++++++++++++++++++++++++++++++++++++++++-----------
2 files changed, 120 insertions(+), 30 deletions(-)
diff --git a/amd/nfs_prot_svc.c b/amd/nfs_prot_svc.c
index cbde172..29b7551 100644
--- a/amd/nfs_prot_svc.c
+++ b/amd/nfs_prot_svc.c
@@ -180,7 +180,7 @@ nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp)
xdr_result = (xdrproc_t) xdr_diropres;
local = (nfssvcproc_t) nfsproc_lookup_2_svc;
/*
- * Cheap way to pass transp down to amfs_auto_lookuppn so it can
+ * Cheap way to pass transp down to amfs_auto_lookup so it can
* be stored in the am_node structure and later used for
* quick_reply().
*/
@@ -327,6 +327,8 @@ nfs_program_3(struct svc_req *rqstp, register SVCXPRT *transp)
xdrproc_t _xdr_argument, _xdr_result;
nfssvcproc_t local;
+ current_transp = NULL;
+
switch (rqstp->rq_proc) {
case AM_NFS3_NULL:
_xdr_argument = (xdrproc_t) xdr_void;
@@ -350,6 +352,12 @@ nfs_program_3(struct svc_req *rqstp, register SVCXPRT *transp)
_xdr_argument = (xdrproc_t) xdr_am_LOOKUP3args;
_xdr_result = (xdrproc_t) xdr_am_LOOKUP3res;
local = (nfssvcproc_t) (char *(*)(char *, struct svc_req *)) am_nfs3_lookup_3_svc;
+ /*
+ * Cheap way to pass transp down to amfs_auto_lookup so it can
+ * be stored in the am_node structure and later used for
+ * quick_reply().
+ */
+ current_transp = transp;
break;
case AM_NFS3_ACCESS:
@@ -476,6 +484,9 @@ nfs_program_3(struct svc_req *rqstp, register SVCXPRT *transp)
}
result = (*local) (&argument, rqstp);
+
+ current_transp = NULL;
+
if (result != NULL && !svc_sendreply(transp, (xdrproc_t) _xdr_result, result)) {
svcerr_systemerr (transp);
}
diff --git a/amd/nfs_subr.c b/amd/nfs_subr.c
index 07d960d..a383618 100644
--- a/amd/nfs_subr.c
+++ b/amd/nfs_subr.c
@@ -87,6 +87,9 @@ struct am_fh3 {
};
/* forward declarations */
+static int nfs_quick_reply2(am_node *mp, int error);
+static int nfs_quick_reply3(am_node *mp, int error);
+
/* converting am-filehandles to mount-points */
static am_node *fh_to_mp3(am_nfs_fh *fhp, int *rp, int vop);
static am_node *fh_to_mp(am_nfs_fh *fhp);
@@ -255,46 +258,65 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp)
return &res;
}
-
void
nfs_quick_reply(am_node *mp, int error)
{
- SVCXPRT *transp = mp->am_transp;
- nfsdiropres res;
- xdrproc_t xdr_result = (xdrproc_t) xdr_diropres;
+ int ret;
/*
- * If there's a transp structure then we can reply to the client's
- * nfs lookup request.
+ * If there's no transp structure then we can't reply to the
+ * client's nfs lookup request.
*/
- if (transp) {
- if (error == 0) {
- /*
- * Construct a valid reply to a lookup request. Same
- * code as in nfsproc_lookup_2_svc() above.
- */
- mp_to_fh(mp, &res.dr_u.dr_drok_u.drok_fhandle);
- res.dr_u.dr_drok_u.drok_attributes = mp->am_fattr;
- res.dr_status = NFS_OK;
- } else
- /*
- * Return the error that was passed to us.
- */
- res.dr_status = nfs_error(error);
+ if (!mp->am_transp)
+ return;
+
+ if (nfs_dispatcher == nfs_program_2)
+ ret = nfs_quick_reply2(mp, error);
+ else
+ ret = nfs_quick_reply3(mp, error);
+
+ if (!ret)
+ svcerr_systemerr(mp->am_transp);
+
+ /*
+ * Free up transp. It's only used for one reply.
+ */
+ put_nfs_xprt(mp->am_transp);
+ mp->am_transp = NULL;
+ dlog("Quick reply sent for %s", mp->am_al->al_mnt->mf_mount);
+}
+
+static int
+nfs_quick_reply2(am_node *mp, int error)
+{
+ SVCXPRT *transp = mp->am_transp;
+ nfsdiropres res;
+ xdrproc_t xdr_result = (xdrproc_t) xdr_diropres;
+ int ret;
+
+ if (error == 0) {
/*
- * Send off our reply
+ * Construct a valid reply to a lookup request. Same
+ * code as in nfsproc_lookup_2_svc() above.
*/
- if (!svc_sendreply(transp, (XDRPROC_T_TYPE) xdr_result, (SVC_IN_ARG_TYPE) & res))
- svcerr_systemerr(transp);
-
+ mp_to_fh(mp, &res.dr_u.dr_drok_u.drok_fhandle);
+ res.dr_u.dr_drok_u.drok_attributes = mp->am_fattr;
+ res.dr_status = NFS_OK;
+ } else
/*
- * Free up transp. It's only used for one reply.
+ * Return the error that was passed to us.
*/
- put_nfs_xprt(mp->am_transp);
- mp->am_transp = NULL;
- dlog("Quick reply sent for %s", mp->am_al->al_mnt->mf_mount);
- }
+ res.dr_status = nfs_error(error);
+
+ /*
+ * Send off our reply
+ */
+ ret = svc_sendreply(transp,
+ (XDRPROC_T_TYPE) xdr_result,
+ (SVC_IN_ARG_TYPE) & res);
+
+ return ret;
}
@@ -890,6 +912,8 @@ mp_to_fh(am_node *mp, am_nfs_fh *fhp)
/* dlog("mp_to_fh: old filehandle: %d", fp->u.s.fhh_id); */
}
}
+
+
void
mp_to_fh3(am_node *mp, am_nfs_fh3 *fhp)
{
@@ -1257,6 +1281,61 @@ am_nfs3_lookup_3_svc(am_LOOKUP3args *argp, struct svc_req *rqstp)
return &result;
}
+
+static int
+nfs_quick_reply3(am_node *mp, int error)
+{
+ SVCXPRT *transp = mp->am_transp;
+ xdrproc_t xdr_result = (xdrproc_t) xdr_am_LOOKUP3res;
+ am_LOOKUP3res result;
+ am_post_op_attr *post_op_dir;
+ am_post_op_attr *post_op_obj;
+ int ret;
+
+ if (error) {
+ /*
+ * Return the error that was passed to us.
+ */
+ post_op_dir->attributes_follow = 0;
+ result.status = nfs_error(error);
+ } else {
+ post_op_dir = &result.res_u.ok.dir_attributes;
+ post_op_obj = &result.res_u.ok.obj_attributes;
+ am_fattr3 *fattr3;
+ nfsfattr *fattr;
+
+ /*
+ * Construct a valid reply to a lookup request. Same
+ * code as in am_nfs3_lookup_3_svc() above.
+ */
+
+ /* dir attributes */
+ post_op_dir->attributes_follow = 1;
+ fattr3 = &post_op_dir->am_post_op_attr_u.attributes;
+ parent_fattr_to_fattr3(mp, fattr3);
+
+ mp_to_fh3(mp, &result.res_u.ok.object);
+
+ /* mount attributes */
+ post_op_obj->attributes_follow = 1;
+ fattr = &mp->am_fattr;
+ fattr3 = &post_op_obj->am_post_op_attr_u.attributes;
+ fattr_to_fattr3(fattr, fattr3);
+
+ result.status = AM_NFS3_OK;
+ }
+
+ /*
+ * Send off our reply
+ */
+ ret = svc_sendreply(transp,
+ (XDRPROC_T_TYPE) xdr_result,
+ (SVC_IN_ARG_TYPE) &result);
+
+ return ret;
+}
+
+
am_ACCESS3res *
am_nfs3_access_3_svc(am_ACCESS3args *argp, struct svc_req *rqstp)
{

View file

@ -0,0 +1,127 @@
am-utils-6.2 - add NFSv3 rpc request validation
From: Ian Kent <raven@themaw.net>
The NFS v2 internal server uses several validation checks for each
RPC request it receives, also add this validation for the NFS v3
internal server.
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/nfs_prot_svc.c | 65 +++++++++++++++++++++++++++++++---------------------
1 file changed, 39 insertions(+), 26 deletions(-)
diff --git a/amd/nfs_prot_svc.c b/amd/nfs_prot_svc.c
index 29b7551..cae12d4 100644
--- a/amd/nfs_prot_svc.c
+++ b/amd/nfs_prot_svc.c
@@ -71,30 +71,9 @@ dispatcher_t nfs_dispatcher = nfs_program_2;
typedef char *(*nfssvcproc_t)(voidp, struct svc_req *);
-void
-nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp)
+static int
+validate_rpc_request(struct svc_req *rqstp, SVCXPRT *transp)
{
- union {
- am_nfs_fh nfsproc_getattr_2_arg;
- nfssattrargs nfsproc_setattr_2_arg;
- nfsdiropargs nfsproc_lookup_2_arg;
- am_nfs_fh nfsproc_readlink_2_arg;
- nfsreadargs nfsproc_read_2_arg;
- nfswriteargs nfsproc_write_2_arg;
- nfscreateargs nfsproc_create_2_arg;
- nfsdiropargs nfsproc_remove_2_arg;
- nfsrenameargs nfsproc_rename_2_arg;
- nfslinkargs nfsproc_link_2_arg;
- nfssymlinkargs nfsproc_symlink_2_arg;
- nfscreateargs nfsproc_mkdir_2_arg;
- nfsdiropargs fsproc_rmdir_2_arg;
- nfsreaddirargs nfsproc_readdir_2_arg;
- am_nfs_fh nfsproc_statfs_2_arg;
- } argument;
- char *result;
- xdrproc_t xdr_argument, xdr_result;
- nfssvcproc_t local;
-
#ifdef HAVE_TRANSPORT_TYPE_TLI
/*
* On TLI systems we don't use an INET network type, but a "ticlts" (see
@@ -109,7 +88,7 @@ nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp)
extern int __rpc_get_local_uid(SVCXPRT *transp, uid_t *uid);
if (__rpc_get_local_uid(transp, &u) >= 0 && u != 0) {
plog(XLOG_WARNING, "ignoring request from UID %ld, must be 0", (long) u);
- return;
+ return 0;
}
# else /* not HAVE___RPC_GET_LOCAL_UID */
dlog("cannot verify local uid for rpc request");
@@ -126,7 +105,7 @@ nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp)
plog(XLOG_WARNING, "ignoring request from %s:%u, port not reserved",
inet_dquad(dq, sizeof(dq), sinp->sin_addr.s_addr),
ntohs(sinp->sin_port));
- return;
+ return 0;
}
# endif /* MNT2_NFS_OPT_RESVPORT */
/* if the address does not match, ignore the request */
@@ -136,16 +115,47 @@ nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp)
plog(XLOG_WARNING, "ignoring request from %s:%u, not a local interface",
inet_dquad(dq, sizeof(dq), sinp->sin_addr.s_addr),
ntohs(sinp->sin_port));
+ return 0;
}
} else {
plog(XLOG_WARNING, "ignoring request from %s:%u, expected %s",
inet_dquad(dq, sizeof(dq), sinp->sin_addr.s_addr),
ntohs(sinp->sin_port),
inet_dquad(dq2, sizeof(dq2), myipaddr.s_addr));
- return;
+ return 0;
}
}
#endif /* not HAVE_TRANPORT_TYPE_TLI */
+ return 1;
+}
+
+
+void
+nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp)
+{
+ union {
+ am_nfs_fh nfsproc_getattr_2_arg;
+ nfssattrargs nfsproc_setattr_2_arg;
+ nfsdiropargs nfsproc_lookup_2_arg;
+ am_nfs_fh nfsproc_readlink_2_arg;
+ nfsreadargs nfsproc_read_2_arg;
+ nfswriteargs nfsproc_write_2_arg;
+ nfscreateargs nfsproc_create_2_arg;
+ nfsdiropargs nfsproc_remove_2_arg;
+ nfsrenameargs nfsproc_rename_2_arg;
+ nfslinkargs nfsproc_link_2_arg;
+ nfssymlinkargs nfsproc_symlink_2_arg;
+ nfscreateargs nfsproc_mkdir_2_arg;
+ nfsdiropargs fsproc_rmdir_2_arg;
+ nfsreaddirargs nfsproc_readdir_2_arg;
+ am_nfs_fh nfsproc_statfs_2_arg;
+ } argument;
+ char *result;
+ xdrproc_t xdr_argument, xdr_result;
+ nfssvcproc_t local;
+
+ if (!validate_rpc_request(rqstp, transp))
+ return;
current_transp = NULL;
@@ -327,6 +337,9 @@ nfs_program_3(struct svc_req *rqstp, register SVCXPRT *transp)
xdrproc_t _xdr_argument, _xdr_result;
nfssvcproc_t local;
+ if (!validate_rpc_request(rqstp, transp))
+ return;
+
current_transp = NULL;
switch (rqstp->rq_proc) {

View file

@ -0,0 +1,25 @@
am-utils-6.2 - add debug log trace to NFSv3 readdirplus
From: Ian Kent <raven@themaw.net>
Add log trace print to NFSv3 readdirplus for debuging purposes.
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/nfs_subr.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/amd/nfs_subr.c b/amd/nfs_subr.c
index 30effba..ef07a4a 100644
--- a/amd/nfs_subr.c
+++ b/amd/nfs_subr.c
@@ -1642,6 +1642,9 @@ am_nfs3_readdirplus_3_svc(am_READDIRPLUS3args *argp, struct svc_req *rqstp)
am_node *mp;
int retry;
+ if (amuDebug(D_TRACE))
+ plog(XLOG_DEBUG, "readdirplus_3:");
+
mp = fh3_to_mp3(dir, &retry, VLOOK_CREATE);
if (mp == NULL) {
if (retry < 0) {

View file

@ -0,0 +1,170 @@
am-utils-6.2 - add get_nfs_xprt() and put_nfs_xprt() functions
From: Ian Kent <raven@themaw.net>
The nfs_quick_reply() functionality relies on taking a copy of the
current transport for later use.
The problem with this is the context of the RPC message is kept in
the transport and if any RPC message arrives before nfs_quick_reply()
is called that context will be corrupted.
So add a function get_nfs_xprt() to replace the current transport
with a new one returning the passed in transort so nfs_quick_reply()
can use it later.
A function put_nfs_xprt() is also added (although not really needed
since it just destroys the now unused transport) for completeness.
Signed-off-by: Ian Kent <raven@themaw.net>
---
conf/transp/transp_sockets.c | 44 ++++++++++++++++++++++++++++++++++++++++
conf/transp/transp_tli.c | 46 +++++++++++++++++++++++++++++++++++++++++-
include/am_utils.h | 2 ++
3 files changed, 91 insertions(+), 1 deletion(-)
diff --git a/conf/transp/transp_sockets.c b/conf/transp/transp_sockets.c
index 6326007..98f79c8 100644
--- a/conf/transp/transp_sockets.c
+++ b/conf/transp/transp_sockets.c
@@ -45,6 +45,7 @@
#include <am_defs.h>
#include <amu.h>
+static int soNFS = RPC_ANYSOCK;
/*
* find the IP address that can be used to connect to the local host
@@ -273,9 +274,52 @@ create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*
return 3;
}
+ soNFS = *soNFSp;
+
return 0; /* all is well */
}
+/*
+ * Get a pointer to the current NFS SVCXPRT and replace it
+ * with a new one.
+ */
+SVCXPRT *
+get_nfs_xprt(SVCXPRT *nfs_xprt)
+{
+ SVCXPRT *newxprt;
+ int newfd;
+
+ if (!nfs_xprt || soNFS == RPC_ANYSOCK)
+ return NULL;
+
+ newfd = dup(soNFS);
+ if (newfd < 0)
+ return NULL;
+
+ xprt_unregister(nfs_xprt);
+ newxprt = svcudp_create(newfd);
+ if (!newxprt) {
+ plog(XLOG_FATAL, "Can't switch to new transport");
+ xprt_register(nfs_xprt);
+ close(newfd);
+ return NULL;
+ }
+
+ soNFS = newfd;
+
+ return nfs_xprt;
+}
+
+/*
+ * Destroy a transport previously obtained by get_nfs_xprt().
+ */
+void put_nfs_xprt(SVCXPRT *nfs_xprt)
+{
+ if (!nfs_xprt || soNFS == RPC_ANYSOCK)
+ return;
+
+ svc_destroy(nfs_xprt);
+}
/*
* Create the amq service for amd (both TCP and UDP)
diff --git a/conf/transp/transp_tli.c b/conf/transp/transp_tli.c
index d26a511..ea565cc 100644
--- a/conf/transp/transp_tli.c
+++ b/conf/transp/transp_tli.c
@@ -45,7 +45,8 @@
#include <am_defs.h>
#include <amu.h>
-struct netconfig *nfsncp;
+struct netconfig *nfsncp = NULL;
+static int soNFS = RPC_ANYSOCK;
/*
@@ -456,9 +457,52 @@ create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*
return 1;
}
+ soNFS = *soNFSp;
+
return 0; /* all is well */
}
+/*
+ * Get a pointer to the current NFS SVCXPRT and replace it
+ * with a new one.
+ */
+SVCXPRT *
+get_nfs_xprt(SVCXPRT *nfs_xprt)
+{
+ SVCXPRT *newxprt;
+ int newfd;
+
+ if (!nfs_xprt || soNFS == RPC_ANYSOCK)
+ return NULL;
+
+ newfd = dup(soNFS);
+ if (newfd < 0)
+ return NULL;
+
+ xprt_unregister(nfs_xprt);
+ newxprt = svc_tli_create(newfd, nfsncp, NULL, 0, 0);
+ if (!newxprt) {
+ plog(XLOG_FATAL, "Can't switch to new transport");
+ xprt_register(nfs_xprt);
+ close(newfd);
+ return NULL;
+ }
+
+ soNFS = newfd;
+
+ return nfs_xprt;
+}
+
+/*
+ * Destroy a transport previously obtained by get_nfs_xprt().
+ */
+void put_nfs_xprt(SVCXPRT *nfs_xprt)
+{
+ if (!nfs_xprt || soNFS == RPC_ANYSOCK)
+ return;
+
+ svc_destroy(nfs_xprt);
+}
/*
* Bind to preferred AMQ port.
diff --git a/include/am_utils.h b/include/am_utils.h
index 0de881a..ff13c26 100644
--- a/include/am_utils.h
+++ b/include/am_utils.h
@@ -378,6 +378,8 @@ extern void compute_nfs_args(void *nap, mntent_t *mntp, int genflags, struct net
extern void destroy_nfs_args(void *nap, u_long nfs_version);
extern int create_amq_service(int *udp_soAMQp, SVCXPRT **udp_amqpp, struct netconfig **udp_amqncpp, int *tcp_soAMQp, SVCXPRT **tcp_amqpp, struct netconfig **tcp_amqncpp, u_short preferred_amq_port);
extern int create_nfs_service(int *soNFSp, u_short *nfs_portp, SVCXPRT **nfs_xprtp, void (*dispatch_fxn)(struct svc_req *rqstp, SVCXPRT *transp), u_long nfs_version);
+extern SVCXPRT *get_nfs_xprt(SVCXPRT *nfs_xprt);
+extern void put_nfs_xprt(SVCXPRT *nfs_xprt);
extern int amu_svc_register(SVCXPRT *, u_long, u_long, void (*)(struct svc_req *, SVCXPRT *), u_long, struct netconfig *);
#ifdef HAVE_TRANSPORT_TYPE_TLI

View file

@ -0,0 +1,94 @@
commit a5ea57a64a1d70486e8d8ab2da944e50ca51b836
Author: zoulasc <christos@zoulas.com>
Date: Tue Mar 8 23:31:26 2016 -0500
- add more debugging in the unmount path
- if the EXPIRE_MULTI call fails, with EAGAIN, fail back to the EXPIRE call
seems to fix unmounting with nfsv4 volumes.
diff --git a/conf/autofs/autofs_linux.c b/conf/autofs/autofs_linux.c
index d543979..5b4ac06 100644
--- a/conf/autofs/autofs_linux.c
+++ b/conf/autofs/autofs_linux.c
@@ -365,6 +365,7 @@ autofs_expire_one(am_node *mp, char *name, autofs_wqt_t token)
ap = find_ap(ap_path);
if (ap == NULL) {
+ dlog("%s: could not find %s", __func__, ap_path);
/* not found??? not sure what to do here... */
send_fail(fh->ioctlfd, token);
goto out;
@@ -376,6 +377,7 @@ autofs_expire_one(am_node *mp, char *name, autofs_wqt_t token)
p->next = fh->pending_umounts;
fh->pending_umounts = p;
+ dlog("%s: unmount for %s", __func__, ap_path);
unmount_mp(ap);
out:
@@ -426,6 +428,7 @@ autofs_missing_one(am_node *mp, autofs_wqt_t wait_queue_token, char *name)
dlog("Mount still pending, not sending autofs reply yet");
return;
}
+ dlog("%s: lookup failed for %s/%s", __func__, mp->am_path, name);
autofs_lookup_failed(mp, name);
}
mp->am_stats.s_lookup++;
@@ -872,15 +875,42 @@ autofs_compute_mount_flags(mntent_t *mnt)
return 0;
}
+static int autofs_expire_4(am_node *mp)
+{
+ struct autofs_packet_expire pkt;
+ autofs_fh_t *fh = mp->am_autofs_fh;
+
+ dlog("Calling AUTOFS_IOC_EXPIRE");
+ if (ioctl(fh->ioctlfd, AUTOFS_IOC_EXPIRE, &pkt) == -1)
+ {
+ dlog("AUTOFS_IOC_EXPIRE for %s failed %d", mp->am_path, errno);
+ return -1;
+ }
+
+ autofs_handle_expire(mp, &pkt);
+ return 0;
+}
+
#if AUTOFS_MAX_PROTO_VERSION >= 4
static int autofs_timeout_mp_task(void *arg)
{
am_node *mp = (am_node *)arg;
autofs_fh_t *fh = mp->am_autofs_fh;
- int now = 0;
-
- while (ioctl(fh->ioctlfd, AUTOFS_IOC_EXPIRE_MULTI, &now) == 0);
+ int how = AUTOFS_EXP_IMMEDIATE;
+
+ for (;;)
+ {
+ dlog("Calling AUTOFS_IOC_EXPIRE_MULTI");
+ if (ioctl(fh->ioctlfd, AUTOFS_IOC_EXPIRE_MULTI, &how) == -1)
+ {
+ dlog("AUTOFS_IOC_EXPIRE_MULTI for %s failed %d", mp->am_path, errno);
+ if (errno != EAGAIN)
+ break;
+ if (autofs_expire_4(mp) == -1)
+ break;
+ }
+ }
return 0;
}
#endif /* AUTOFS_MAX_PROTO_VERSION >= 4 */
@@ -895,9 +925,8 @@ void autofs_timeout_mp(am_node *mp)
mp->am_autofs_ttl = now + gopt.am_timeo_w;
if (fh->version < 4) {
- struct autofs_packet_expire pkt;
- while (ioctl(fh->ioctlfd, AUTOFS_IOC_EXPIRE, &pkt) == 0)
- autofs_handle_expire(mp, &pkt);
+ while (autofs_expire_4(mp) == 0)
+ continue;
return;
}

View file

@ -0,0 +1,28 @@
am-utils-6.2 - allow autoconf 2.72
From: Ian Kent <raven@themaw.net>
am-utils creates configure at build time and requires versions of autoconf
that are known to work ok.
Allow autoconf version 2.72 to get a build.
Signed-off-by: Ian Kent <raven@themaw.net>
---
bootstrap | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bootstrap b/bootstrap
index d454c63..55b2084 100755
--- a/bootstrap
+++ b/bootstrap
@@ -10,7 +10,8 @@ validateversion() {
case "$v" in
*2.69) ;;
*2.71) ;;
- *) echo "am-utils requires autoconf 2.69 or 2.71, you have:"
+ *2.72) ;;
+ *) echo "am-utils requires autoconf 2.69, 2.71 or 2.72, you have:"
echo " $v"
exit 1;;
esac

View file

@ -0,0 +1,95 @@
am-utils-6.2 - convert AC_HELP_STRING to AS_HELP_STRING
From: Ian Kent <raven@themaw.net>
autoconf 2.71 autoreconf tells us AC_HELP_STRING is obsolete.
Use AS_HELP_STRING instead.
Signed-off-by: Ian Kent <raven@themaw.net>
---
m4/macros/opt_amu_cflags.m4 | 2 +-
m4/macros/opt_cppflags.m4 | 2 +-
m4/macros/opt_debug.m4 | 2 +-
m4/macros/opt_ldflags.m4 | 2 +-
m4/macros/opt_libs.m4 | 2 +-
m4/macros/with_addon.m4 | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/m4/macros/opt_amu_cflags.m4 b/m4/macros/opt_amu_cflags.m4
index 1194786b..e94dbc24 100644
--- a/m4/macros/opt_amu_cflags.m4
+++ b/m4/macros/opt_amu_cflags.m4
@@ -4,7 +4,7 @@ dnl NOTE: this is only for final compiltions, not for configure tests)
AC_DEFUN([AMU_OPT_AMU_CFLAGS],
[AC_MSG_CHECKING(for additional C option compilation flags)
AC_ARG_ENABLE(am-cflags,
-AC_HELP_STRING([--enable-am-cflags=ARG],
+AS_HELP_STRING([--enable-am-cflags=ARG],
[compile package with ARG additional C flags]),
[
if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then
diff --git a/m4/macros/opt_cppflags.m4 b/m4/macros/opt_cppflags.m4
index 9cb72362..97197212 100644
--- a/m4/macros/opt_cppflags.m4
+++ b/m4/macros/opt_cppflags.m4
@@ -4,7 +4,7 @@ dnl NOTE: this is for configuration as well as compilations!
AC_DEFUN([AMU_OPT_CPPFLAGS],
[AC_MSG_CHECKING(for configuration/compilation (-I) preprocessor flags)
AC_ARG_ENABLE(cppflags,
-AC_HELP_STRING([--enable-cppflags=ARG],
+AS_HELP_STRING([--enable-cppflags=ARG],
[configure/compile with ARG (-I) preprocessor flags]),
[
if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then
diff --git a/m4/macros/opt_debug.m4 b/m4/macros/opt_debug.m4
index b6f044e9..bca938ac 100644
--- a/m4/macros/opt_debug.m4
+++ b/m4/macros/opt_debug.m4
@@ -4,7 +4,7 @@ dnl and "no" means none.
AC_DEFUN([AMU_OPT_DEBUG],
[AC_MSG_CHECKING(for debugging options)
AC_ARG_ENABLE(debug,
-AC_HELP_STRING([--enable-debug=ARG],[enable debugging (yes/mem/no)]),
+AS_HELP_STRING([--enable-debug=ARG],[enable debugging (yes/mem/no)]),
[
if test "$enableval" = yes; then
AC_MSG_RESULT(yes)
diff --git a/m4/macros/opt_ldflags.m4 b/m4/macros/opt_ldflags.m4
index cf3ee432..51c66601 100644
--- a/m4/macros/opt_ldflags.m4
+++ b/m4/macros/opt_ldflags.m4
@@ -4,7 +4,7 @@ dnl NOTE: this is for configuration as well as compilations!
AC_DEFUN([AMU_OPT_LDFLAGS],
[AC_MSG_CHECKING(for configuration/compilation (-L) library flags)
AC_ARG_ENABLE(ldflags,
-AC_HELP_STRING([--enable-ldflags=ARG],
+AS_HELP_STRING([--enable-ldflags=ARG],
[configure/compile with ARG (-L) library flags]),
[
if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then
diff --git a/m4/macros/opt_libs.m4 b/m4/macros/opt_libs.m4
index e7414860..40d496ba 100644
--- a/m4/macros/opt_libs.m4
+++ b/m4/macros/opt_libs.m4
@@ -4,7 +4,7 @@ dnl NOTE: this is for configuration as well as compilations!
AC_DEFUN([AMU_OPT_LIBS],
[AC_MSG_CHECKING(for configuration/compilation (-l) library flags)
AC_ARG_ENABLE(libs,
-AC_HELP_STRING([--enable-libs=ARG],
+AS_HELP_STRING([--enable-libs=ARG],
[configure/compile with ARG (-l) library flags]),
[
if test "$enableval" = "" || test "$enableval" = "yes" || test "$enableval" = "no"; then
diff --git a/m4/macros/with_addon.m4 b/m4/macros/with_addon.m4
index d8ea8cfa..c3d8a7fa 100644
--- a/m4/macros/with_addon.m4
+++ b/m4/macros/with_addon.m4
@@ -4,7 +4,7 @@ AC_DEFUN([AMU_WITH_ADDON],
[AC_MSG_CHECKING([if $1 is wanted])
ac_upcase=`echo $1|tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
AC_ARG_WITH($1,
- AC_HELP_STRING([--with-$1],
+ AS_HELP_STRING([--with-$1],
[enable $2 support (default=yes if found)]
),[
if test "$withval" = "yes"; then

View file

@ -0,0 +1,272 @@
am-utils-6.2 - convert AC_TRY_COMPILE to AC_COMPILE_IFELSE
From: Ian Kent <raven@themaw.net>
autoconf 2.71 autoreconf tells us AC_TRY_COMPILE is obsolete.
Convert to use the AC_COMPILE_IFELSE instead.
Signed-off-by: Ian Kent <raven@themaw.net>
---
m4/macros/c_void_p.m4 | 9 +++++----
m4/macros/check_varargs_macros.m4 | 24 ++++++++++++++----------
m4/macros/extern_optarg.m4 | 11 ++++++-----
m4/macros/field_mntent_t_mnt_time_string.m4 | 7 ++++---
m4/macros/mount_headers.m4 | 4 ++--
m4/macros/struct_mntent.m4 | 7 ++++---
m4/macros/struct_mnttab.m4 | 7 ++++---
m4/macros/try_compile_anyfs.m4 | 8 +++++---
m4/macros/try_compile_nfs.m4 | 7 ++++---
m4/macros/try_compile_rpc.m4 | 8 +++++---
10 files changed, 53 insertions(+), 39 deletions(-)
diff --git a/m4/macros/c_void_p.m4 b/m4/macros/c_void_p.m4
index 3977c9be..64e998ff 100644
--- a/m4/macros/c_void_p.m4
+++ b/m4/macros/c_void_p.m4
@@ -6,11 +6,12 @@ AC_CACHE_CHECK(if compiler can handle void *,
ac_cv_c_void_p,
[
# try to compile a program which uses void *
-AC_TRY_COMPILE(
-[ ],
-[
+AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM(
+[[ ]],
+[[
void *vp;
-], ac_cv_c_void_p=yes, ac_cv_c_void_p=no)
+]])], ac_cv_c_void_p=yes, ac_cv_c_void_p=no)
])
if test "$ac_cv_c_void_p" = yes
then
diff --git a/m4/macros/check_varargs_macros.m4 b/m4/macros/check_varargs_macros.m4
index 44bd3edf..93c26ffc 100644
--- a/m4/macros/check_varargs_macros.m4
+++ b/m4/macros/check_varargs_macros.m4
@@ -6,23 +6,27 @@ AC_CACHE_CHECK(if compiler can handle variable-length macros,
ac_cv_varargs_macros,
[
# try C99 style
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM(
+[[
#define foo(str,size,fmt,...) bar(__FILE__,__LINE__,(str),(size),(fmt),__VA_ARGS__)
-],
-[
+]],
+[[
char a[80];
foo(a, sizeof(a), "%d,%d", 1, 2);
-], ac_cv_varargs_macros=c99,
+]]
+)], ac_cv_varargs_macros=c99,
# else try gcc style
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM(
+[[
#define foo(str,size,args...) bar(__FILE__,__LINE__,(str),(size),(fmt),args)
-],
-[
+]],
+[[
char a[80];
foo(a, sizeof(a), "%d,%d", 1, 2);
-], ac_cv_varargs_macros=gcc, ac_cv_varargs_macros=none))
+]]
+)], ac_cv_varargs_macros=gcc, ac_cv_varargs_macros=none))
])
if test "$ac_cv_varargs_macros" = c99
then
diff --git a/m4/macros/extern_optarg.m4 b/m4/macros/extern_optarg.m4
index 70cb50ae..b082b061 100644
--- a/m4/macros/extern_optarg.m4
+++ b/m4/macros/extern_optarg.m4
@@ -6,8 +6,9 @@ AC_CACHE_CHECK(if external definition for optarg[] exists,
ac_cv_extern_optarg,
[
# try to compile program that uses the variable
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM(
+[[
#ifdef HAVE_STDIO_H
# include <stdio.h>
#endif /* HAVE_STDIO_H */
@@ -23,10 +24,10 @@ AC_TRY_COMPILE(
#ifdef HAVE_ERRNO_H
# include <errno.h>
#endif /* HAVE_ERRNO_H */
-],
-[
+]],
+[[
char *cp = optarg;
-], ac_cv_extern_optarg=yes, ac_cv_extern_optarg=no)
+]])], ac_cv_extern_optarg=yes, ac_cv_extern_optarg=no)
])
if test "$ac_cv_extern_optarg" = yes
then
diff --git a/m4/macros/field_mntent_t_mnt_time_string.m4 b/m4/macros/field_mntent_t_mnt_time_string.m4
index 42ad647b..9ed83f46 100644
--- a/m4/macros/field_mntent_t_mnt_time_string.m4
+++ b/m4/macros/field_mntent_t_mnt_time_string.m4
@@ -6,7 +6,8 @@ AC_CACHE_CHECK(if mntent_t field mnt_time exist as type string,
ac_cv_field_mntent_t_mnt_time_string,
[
# try to compile a program
-AC_TRY_COMPILE(
+AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM(
AMU_MOUNT_HEADERS(
[
/* now set the typedef */
@@ -20,13 +21,13 @@ typedef struct mnttab mntent_t;
# endif /* not HAVE_STRUCT_MNTTAB */
#endif /* not HAVE_STRUCT_MNTENT */
]),
-[
+[[
mntent_t mtt;
char *cp = "test";
int i;
mtt.mnt_time = cp;
i = mtt.mnt_time[0];
-], ac_cv_field_mntent_t_mnt_time_string=yes, ac_cv_field_mntent_t_mnt_time_string=no)
+]])], ac_cv_field_mntent_t_mnt_time_string=yes, ac_cv_field_mntent_t_mnt_time_string=no)
])
if test "$ac_cv_field_mntent_t_mnt_time_string" = yes
then
diff --git a/m4/macros/mount_headers.m4 b/m4/macros/mount_headers.m4
index cf7b9103..3a1226f4 100644
--- a/m4/macros/mount_headers.m4
+++ b/m4/macros/mount_headers.m4
@@ -1,12 +1,12 @@
dnl ######################################################################
dnl an M4 macro to include a list of common headers being used everywhere
define(AMU_MOUNT_HEADERS,
-[
+[[
#include "${srcdir}/include/mount_headers1.h"
#include AMU_NFS_PROTOCOL_HEADER
#include "${srcdir}/include/mount_headers2.h"
$1
-]
+]]
)
dnl ======================================================================
diff --git a/m4/macros/struct_mntent.m4 b/m4/macros/struct_mntent.m4
index d9f48119..9a9ad18b 100644
--- a/m4/macros/struct_mntent.m4
+++ b/m4/macros/struct_mntent.m4
@@ -6,12 +6,13 @@ AC_CACHE_CHECK(for struct mntent,
ac_cv_have_struct_mntent,
[
# try to compile a program which may have a definition for the structure
-AC_TRY_COMPILE(
+AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM(
AMU_MOUNT_HEADERS
,
-[
+[[
struct mntent mt;
-], ac_cv_have_struct_mntent=yes, ac_cv_have_struct_mntent=no)
+]])], ac_cv_have_struct_mntent=yes, ac_cv_have_struct_mntent=no)
])
if test "$ac_cv_have_struct_mntent" = yes
then
diff --git a/m4/macros/struct_mnttab.m4 b/m4/macros/struct_mnttab.m4
index ed1cb563..4eabbaa4 100644
--- a/m4/macros/struct_mnttab.m4
+++ b/m4/macros/struct_mnttab.m4
@@ -6,12 +6,13 @@ AC_CACHE_CHECK(for struct mnttab,
ac_cv_have_struct_mnttab,
[
# try to compile a program which may have a definition for the structure
-AC_TRY_COMPILE(
+AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM(
AMU_MOUNT_HEADERS
,
-[
+[[
struct mnttab mt;
-], ac_cv_have_struct_mnttab=yes, ac_cv_have_struct_mnttab=no)
+]])], ac_cv_have_struct_mnttab=yes, ac_cv_have_struct_mnttab=no)
])
if test "$ac_cv_have_struct_mnttab" = yes
then
diff --git a/m4/macros/try_compile_anyfs.m4 b/m4/macros/try_compile_anyfs.m4
index 22a57198..cd34eee4 100644
--- a/m4/macros/try_compile_anyfs.m4
+++ b/m4/macros/try_compile_anyfs.m4
@@ -6,8 +6,9 @@ dnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE)
dnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE)
AC_DEFUN([AC_TRY_COMPILE_ANYFS],
[# try to compile a program which may have a definition for a structure
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM(
+[[
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
@@ -180,6 +181,7 @@ struct netexport { int this_is_SO_wrong; }; /* for bsdi-2.1 */
#ifdef HAVE_FS_UDF_UDF_MOUNT_H
# include <fs/udf/udf_mount.h>
#endif /* HAVE_FS_UDF_UDF_MOUNT_H */
-], [$1], [$2], [$3])
+]], [[$1]]
+)], [$2], [$3])
])
dnl ======================================================================
diff --git a/m4/macros/try_compile_nfs.m4 b/m4/macros/try_compile_nfs.m4
index d04e1961..9a7a3892 100644
--- a/m4/macros/try_compile_nfs.m4
+++ b/m4/macros/try_compile_nfs.m4
@@ -6,8 +6,9 @@ dnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE)
dnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE)
AC_DEFUN([AC_TRY_COMPILE_NFS],
[# try to compile a program which may have a definition for a structure
-AC_TRY_COMPILE(
-AMU_MOUNT_HEADERS
-, [$1], [$2], [$3])
+AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM(
+AMU_MOUNT_HEADERS,
+[[$1]])], [$2], [$3])
])
dnl ======================================================================
diff --git a/m4/macros/try_compile_rpc.m4 b/m4/macros/try_compile_rpc.m4
index 5c95348c..f98bea7d 100644
--- a/m4/macros/try_compile_rpc.m4
+++ b/m4/macros/try_compile_rpc.m4
@@ -6,8 +6,9 @@ dnl [$2] action to take if the program compiled (3rd arg to AC_TRY_COMPILE)
dnl [$3] action to take if program did not compile (4rd arg to AC_TRY_COMPILE)
AC_DEFUN([AC_TRY_COMPILE_RPC],
[# try to compile a program which may have a definition for a structure
-AC_TRY_COMPILE(
-[
+AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM(
+[[
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif /* HAVE_SYS_TYPES_H */
@@ -18,6 +19,7 @@ AC_TRY_COMPILE(
#if defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__)
# include <rpc/xdr.h>
#endif /* defined(HAVE_RPC_XDR_H) && !defined(__XDR_HEADER__) */
-], [$1], [$2], [$3])
+]], [[$1]]
+)], [$2], [$3])
])
dnl ======================================================================

View file

@ -0,0 +1,67 @@
am-utils-6.2 - convert AC_TRY_LINK to AC_LINK_IFELSE
From: Ian Kent <raven@themaw.net>
autoconf 2.71 autoreconf tells us AC_TRY_LINK is obsolete.
Convert to use the AC_LINK_IFELSE instead.
Signed-off-by: Ian Kent <raven@themaw.net>
---
m4/macros/check_lib2.m4 | 30 ++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/m4/macros/check_lib2.m4 b/m4/macros/check_lib2.m4
index 64e6bb5b..7d4e5a5e 100644
--- a/m4/macros/check_lib2.m4
+++ b/m4/macros/check_lib2.m4
@@ -16,32 +16,38 @@ AC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
# first try with base library, without auxiliary library
LIBS="-l$1 $LIBS"
-AC_TRY_LINK(dnl
-ifelse([$2], [main], , dnl Avoid conflicting decl of main.
+dnl ithe ifelse() macro is used to avoid conflicting decl of main.
+AC_LINK_IFELSE(
+[AC_LANG_SOURCE(
+[[
+ifelse([$2], [main], ,
[/* Override any gcc2 internal prototype to avoid an error. */
]
[/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $2();
-]),
- [$2()],
- eval "ac_cv_lib_$ac_lib_var=\"$1\"",
- eval "ac_cv_lib_$ac_lib_var=no")
+])]],
+ [[$2()]])],
+ [eval "ac_cv_lib_$ac_lib_var=\"$1\""],
+ [eval "ac_cv_lib_$ac_lib_var=no"])
# if OK, set to no auxiliary library, else try auxiliary library
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = no"; then
LIBS="-l$1 $5 $LIBS"
- AC_TRY_LINK(dnl
- ifelse([$2], [main], , dnl Avoid conflicting decl of main.
+dnl ithe ifelse() macro is used to avoid conflicting decl of main.
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
+ [[
+ ifelse([$2], [main], ,
[/* Override any gcc2 internal prototype to avoid an error. */
]
[/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char $2();
- ]),
- [$2()],
- eval "ac_cv_lib_$ac_lib_var=\"$1 $5\"",
- eval "ac_cv_lib_$ac_lib_var=no")
+ ])]],
+ [[$2()]])],
+ [eval "ac_cv_lib_$ac_lib_var=\"$1 $5\""],
+ [eval "ac_cv_lib_$ac_lib_var=no"])
fi
LIBS="$ac_save_LIBS"

View file

@ -0,0 +1,277 @@
am-utils-6.2 - convert AC_TRY_RUN to AC_RUN_IFELSE
From: Ian Kent <raven@themaw.net>
autoconf 2.71 autoreconf tells us AC_TRY_RUN is obsolete.
Convert to use the AC_RUN_IFELSE instead.
Signed-off-by: Ian Kent <raven@themaw.net>
---
m4/macros/check_fs_mntent.m4 | 7 ++++---
m4/macros/check_gnu_getopt.m4 | 6 ++++--
m4/macros/check_libwrap_severity.m4 | 14 ++++++++------
m4/macros/check_mnttab_type.m4 | 7 ++++---
m4/macros/check_mount_type.m4 | 7 ++++---
m4/macros/expand_cpp_hex.m4 | 7 ++++---
m4/macros/expand_cpp_int.m4 | 7 ++++---
m4/macros/expand_cpp_string.m4 | 7 ++++---
m4/macros/expand_run_string.m4 | 7 ++++---
m4/macros/func_bad_hasmntopt.m4 | 5 +++--
10 files changed, 43 insertions(+), 31 deletions(-)
diff --git a/m4/macros/check_fs_mntent.m4 b/m4/macros/check_fs_mntent.m4
index 6146c7ee..e612b4ec 100644
--- a/m4/macros/check_fs_mntent.m4
+++ b/m4/macros/check_fs_mntent.m4
@@ -144,8 +144,9 @@ do
fi
# run a test program for bsdi3
- AC_TRY_RUN(
- [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE(
+ [[
#include <sys/param.h>
#include <sys/mount.h>
main()
@@ -158,7 +159,7 @@ main()
else
exit(0);
}
- ], [eval "ac_cv_fs_$ac_fs_name=yes"
+ ]])], [eval "ac_cv_fs_$ac_fs_name=yes"
break
]
)
diff --git a/m4/macros/check_gnu_getopt.m4 b/m4/macros/check_gnu_getopt.m4
index 76315321..6ac6440c 100644
--- a/m4/macros/check_gnu_getopt.m4
+++ b/m4/macros/check_gnu_getopt.m4
@@ -3,7 +3,9 @@ dnl Do we have a GNUish getopt
AC_DEFUN([AMU_CHECK_GNU_GETOPT],
[
AC_CACHE_CHECK([for GNU getopt], ac_cv_sys_gnu_getopt, [
-AC_TRY_RUN([
+AC_RUN_IFELSE(
+[AC_LANG_SOURCE(
+[[
#include <stdio.h>
#include <unistd.h>
int main()
@@ -29,7 +31,7 @@ int main()
fprintf(rf, isGNU ? "yes" : "no");
exit(0);
}
-],[
+]])],[
ac_cv_sys_gnu_getopt="`cat conftestresult`"
],[
ac_cv_sys_gnu_getopt="fail"
diff --git a/m4/macros/check_libwrap_severity.m4 b/m4/macros/check_libwrap_severity.m4
index 955ba55a..f57ffcb1 100644
--- a/m4/macros/check_libwrap_severity.m4
+++ b/m4/macros/check_libwrap_severity.m4
@@ -8,22 +8,24 @@ AC_CACHE_CHECK([if libwrap wants caller to define allow_severity and deny_severi
SAVEDLIBS="$LIBS"
LIBS="$LIBS -lwrap"
# run program one without defining our own severity variables
-AC_TRY_RUN(
-[
+AC_RUN_IFELSE(
+[AC_LANG_SOURCE(
+[[
int main()
{
exit(0);
}
-],[ac_tmp_val1="yes"],[ac_tmp_val1="no"])
+]])],[ac_tmp_val1="yes"],[ac_tmp_val1="no"])
# run program two with defining our own severity variables
-AC_TRY_RUN(
-[
+AC_RUN_IFELSE(
+[AC_LANG_SOURCE(
+[[
int deny_severity, allow_severity, rfc931_timeout;
int main()
{
exit(0);
}
-],[ac_tmp_val2="yes"],[ac_tmp_val2="no"])
+]])],[ac_tmp_val2="yes"],[ac_tmp_val2="no"])
# restore original value of $LIBS
LIBS="$SAVEDLIBS"
# now decide what to do
diff --git a/m4/macros/check_mnttab_type.m4 b/m4/macros/check_mnttab_type.m4
index 61e1c01b..a840991e 100644
--- a/m4/macros/check_mnttab_type.m4
+++ b/m4/macros/check_mnttab_type.m4
@@ -116,8 +116,9 @@ do
fi
# then run a test program for bsdi3, tru64, and others
- AC_TRY_RUN(
- [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE(
+ [[
#include <sys/param.h>
#include <sys/mount.h>
main()
@@ -130,7 +131,7 @@ main()
else
exit(0);
}
- ], [eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
+ ]])], [eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
break
]
)
diff --git a/m4/macros/check_mount_type.m4 b/m4/macros/check_mount_type.m4
index 9b08def7..c779e0bf 100644
--- a/m4/macros/check_mount_type.m4
+++ b/m4/macros/check_mount_type.m4
@@ -135,8 +135,9 @@ do
fi
# run a test program for bsdi3
- AC_TRY_RUN(
- [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE(
+ [[
#include <sys/param.h>
#include <sys/mount.h>
main()
@@ -149,7 +150,7 @@ main()
else
exit(0);
}
- ], [eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
+ ]])], [eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
break
]
)
diff --git a/m4/macros/expand_cpp_hex.m4 b/m4/macros/expand_cpp_hex.m4
index 0c7a9e42..13c7c832 100644
--- a/m4/macros/expand_cpp_hex.m4
+++ b/m4/macros/expand_cpp_hex.m4
@@ -10,8 +10,9 @@ AC_EGREP_CPP(0x,
[$1]
$2,
value="notfound"
-AC_TRY_RUN(
-[
+AC_RUN_IFELSE(
+[AC_LANG_SOURCE(
+[[
[$1]
main(argc)
int argc;
@@ -24,7 +25,7 @@ exit(0);
# error no such option $2
#endif
exit(1);
-}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound")
+}]])], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound")
,
value="notfound"
)
diff --git a/m4/macros/expand_cpp_int.m4 b/m4/macros/expand_cpp_int.m4
index 37253769..e58649e8 100644
--- a/m4/macros/expand_cpp_int.m4
+++ b/m4/macros/expand_cpp_int.m4
@@ -12,8 +12,9 @@ AC_EGREP_CPP(
[$1]
$2,
value="notfound"
-AC_TRY_RUN(
-[
+AC_RUN_IFELSE(
+[AC_LANG_SOURCE(
+[[
[$1]
main(argc)
int argc;
@@ -26,7 +27,7 @@ exit(0);
# error no such option $2
#endif
exit(1);
-}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound")
+}]])], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound")
,
value="notfound"
)
diff --git a/m4/macros/expand_cpp_string.m4 b/m4/macros/expand_cpp_string.m4
index 51293c4f..e014b7e4 100644
--- a/m4/macros/expand_cpp_string.m4
+++ b/m4/macros/expand_cpp_string.m4
@@ -10,8 +10,9 @@ AC_EGREP_CPP(\".*\",
[$1]
$2,
value="notfound"
-AC_TRY_RUN(
-[
+AC_RUN_IFELSE(
+[AC_LANG_SOURCE(
+[[
[$1]
main(argc)
int argc;
@@ -24,7 +25,7 @@ exit(0);
# error no such option $2
#endif
exit(1);
-}], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound")
+}]])], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound")
,
value="notfound"
)
diff --git a/m4/macros/expand_run_string.m4 b/m4/macros/expand_run_string.m4
index 2cb964e1..f9390020 100644
--- a/m4/macros/expand_run_string.m4
+++ b/m4/macros/expand_run_string.m4
@@ -4,15 +4,16 @@ dnl Takes: (header, code-to-run, [action-if-found, [action-if-not-found]])
AC_DEFUN([AMU_EXPAND_RUN_STRING],
[
value="notfound"
-AC_TRY_RUN(
-[
+AC_RUN_IFELSE(
+[AC_LANG_SOURCE(
+[[
$1
main(argc)
int argc;
{
$2
exit(0);
-}],
+}]])],
[
value=`./conftest dummy 2>>config.log`
test -z "$value" && value="notfound"
diff --git a/m4/macros/func_bad_hasmntopt.m4 b/m4/macros/func_bad_hasmntopt.m4
index d458bd30..9071e595 100644
--- a/m4/macros/func_bad_hasmntopt.m4
+++ b/m4/macros/func_bad_hasmntopt.m4
@@ -3,7 +3,8 @@ dnl Check if we have as buggy hasmntopt() libc function
AC_DEFUN([AMU_FUNC_BAD_HASMNTOPT],
[
AC_CACHE_CHECK([for working hasmntopt], ac_cv_func_hasmntopt_working,
-[AC_TRY_RUN(
+[AC_RUN_IFELSE(
+[AC_LANG_SOURCE(
AMU_MOUNT_HEADERS(
[[
#ifdef HAVE_MNTENT_H
@@ -47,7 +48,7 @@ int main()
exit(1);
exit(0);
}
-]]),
+]]))],
[ac_cv_func_hasmntopt_working=yes],
[ac_cv_func_hasmntopt_working=no]
)])

View file

@ -0,0 +1,25 @@
am-utils-6.2 - convert AM_CONFIG_HEADER to AC_CONFIG_HEADERS
From: Ian Kent <raven@themaw.net>
autoconf 2.71 autoreconf tells us AM_CONFIG_HEADER macro is obsolete.
Use AC_CONFIG_HEADERS instead.
Signed-off-by: Ian Kent <raven@themaw.net>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 98b444d3..e1bc3290 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,7 +18,7 @@ AC_INIT([am-utils],
AC_MSG_NOTICE(*** INITIALIZATION ***)
AC_CONFIG_SRCDIR([amd/amd.c])
AC_CONFIG_MACRO_DIR([m4])
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)
AH_TOP([
/*
* Start of am-utils-6.x config.h file.

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,35 @@
am-utils-6.2 - dont include linux/mount.h
From: Ian Kent <raven@themaw.net>
Updates to glibc to add support for fsconfig() et. al. have introduced
conflicts between sys/mount.h and the corresponding kernel header
linux/mount.h.
But sys/mount.h and linux/mount.h provide very close to the same
definitions except that sys/mount.h has some additional function
declarations.
So add a macro define to the amd include file to stop its inclusion
of linux/mount.h when including linux/fs.h so that sys/mount.h is
used instead.
Signed-off-by: Ian Kent <raven@themaw.net>
---
include/mount_headers1.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/mount_headers1.h b/include/mount_headers1.h
index 7d518a06..af9a90ee 100644
--- a/include/mount_headers1.h
+++ b/include/mount_headers1.h
@@ -160,6 +160,9 @@
# endif /* HAVE_LINUX_LIST_H */
# include <linux/fs.h>
# else
+# ifdef HAVE_SYS_MOUNT_H
+# define _LINUX_MOUNT_H
+# endif /* HAVE_SYS_MOUNT_H */
# include <linux/fs.h>
# endif/* (!__GLIBC__ || __GLIBC__ < 2) */
#endif /* HAVE_LINUX_FS_H */

View file

@ -0,0 +1,26 @@
am-utils-6.2 - dont prevent autoconf 2.7 build
From: Ian Kent <raven@themaw.net>
Fedora is updating to autoconf 2.71, stop bootstrap from preventing
the build.
Signed-off-by: Ian Kent <raven@themaw.net>
---
bootstrap | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bootstrap b/bootstrap
index 000b0167..d454c631 100755
--- a/bootstrap
+++ b/bootstrap
@@ -9,7 +9,8 @@ validateversion() {
local v="$(autoreconf --version 2>&1 | head -1)"
case "$v" in
*2.69) ;;
- *) echo "am-utils requires autoconf 2.69, you have:"
+ *2.71) ;;
+ *) echo "am-utils requires autoconf 2.69 or 2.71, you have:"
echo " $v"
exit 1;;
esac

View file

@ -0,0 +1,19 @@
commit a187041e062c5b656def30a3ec282156360003f3
Author: Christos Zoulas <christos@zoulas.com>
Date: Wed Jan 21 23:28:46 2015 -0500
don't use logical && when & is meant
diff --git a/amd/map.c b/amd/map.c
index fce8273..0d404cf 100644
--- a/amd/map.c
+++ b/amd/map.c
@@ -752,7 +752,7 @@ umount_exported(void)
} else {
am_unmounted(mp);
}
- if (!(mf->mf_flags && (MFF_UNMOUNTING|MFF_MOUNTED)))
+ if (!(mf->mf_flags & (MFF_UNMOUNTING|MFF_MOUNTED)))
exported_ap[i] = NULL;
} else {
/*

View file

@ -0,0 +1,39 @@
am-utils-6.2 - fix Linux NFS recognition of umounts
From: Ian Kent <raven@themaw.net>
Recent Linux NFS uses a simulated attibute cache change detection
method based on ctime. Consequenty the amd use of mtime for this
doesn't work properly for some kernel versions.
The problem seen with some kernel versions is a failure to recognize
umounts.
Updating the parent ctime in step with mtime during umount appears
to fix the problem.
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/autil.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/amd/autil.c b/amd/autil.c
index cd9514d..efd18ef 100644
--- a/amd/autil.c
+++ b/amd/autil.c
@@ -709,10 +709,13 @@ am_unmounted(am_node *mp)
--mp->am_parent->am_fattr.na_nlink;
/*
- * Update mtime of parent node
+ * Update mtime and ctime of parent node (as ctime is needed for some
+ * Linux NFS kernel versions to properly recognize attribute changes).
*/
- if (mp->am_parent && mp->am_parent->am_al->al_mnt)
+ if (mp->am_parent && mp->am_parent->am_al->al_mnt) {
clocktime(&mp->am_parent->am_fattr.na_mtime);
+ mp->am_parent->am_fattr.na_ctime = mp->am_parent->am_fattr.na_mtime;
+ }
if (mp->am_parent && (mp->am_flags & AMF_REMOUNT)) {
char *fname = xstrdup(mp->am_name);

View file

@ -0,0 +1,32 @@
am-utils-6.2 - fix NFSv3 access method return on non-existent mount point
From: Ian Kent <raven@themaw.net>
When the NFS v3 access method is called and there is no mount point
corresponding to the path ESTALE needs to be returned the kernel NFS
client so an NFS lookup will be done and the mount point re-mounted.
If there is no map entry to mount the NFS v3 lookup method can then
return the failure.
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/nfs_subr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/amd/nfs_subr.c b/amd/nfs_subr.c
index ef07a4a..85cf98c 100644
--- a/amd/nfs_subr.c
+++ b/amd/nfs_subr.c
@@ -1239,9 +1239,9 @@ am_nfs3_access_3_svc(am_ACCESS3args *argp, struct svc_req *rqstp)
if (!mp) {
post_op_obj = &result.res_u.fail.obj_attributes;
post_op_obj->attributes_follow = 0;
- result.status = nfs_error(ENOENT);
+ result.status = nfs_error(ESTALE);
if (amuDebug(D_TRACE))
- plog(XLOG_DEBUG, "access_3: ENOENT");
+ plog(XLOG_DEBUG, "access_3: ESTALE");
} else {
nfsfattr *fattr = &mp->am_fattr;
am_fattr3 *fattr3;

View file

@ -0,0 +1,76 @@
am-utils-6.2 - fix NFSv3 lookup dir attribute return value
From: Ian Kent <raven@themaw.net>
The NFS v3 lookup method, which returns attributes for the directory
containing the object to be looked up, used incorrect mount point
attributes which was causing unusual file system object visibility
problems.
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/nfs_subr.c | 29 +++++++++++++++++++++++++++--
1 file changed, 27 insertions(+), 2 deletions(-)
diff --git a/amd/nfs_subr.c b/amd/nfs_subr.c
index 85cf98c..6a1b717 100644
--- a/amd/nfs_subr.c
+++ b/amd/nfs_subr.c
@@ -978,6 +978,29 @@ static void fattr_to_wcc_attr(nfsfattr *fattr, am_wcc_attr *wcc_attr)
nfstime_to_am_nfstime3(&fattr->na_ctime, &wcc_attr->ctime);
}
+static nfsfattr *get_parent_fattr(am_node *mp)
+{
+ nfsfattr *fattr;
+
+ /* Set attributes to those of the parent only if this
+ * isn't topvol otherwise just use the mp attributes.
+ */
+ fattr = &mp->am_fattr;
+ if (mp->am_parent && mp->am_parent->am_parent &&
+ !(mp->am_parent->am_parent->am_flags & AMF_ROOT))
+ fattr = &mp->am_parent->am_fattr;
+
+ return fattr;
+}
+
+static void parent_fattr_to_fattr3(am_node *mp, am_fattr3 *fattr3)
+{
+ nfsfattr *fattr;
+
+ fattr = get_parent_fattr(mp);
+ fattr_to_fattr3(fattr, fattr3);
+}
+
static am_nfsstat3 return_estale_or_rofs(am_nfs_fh3 *fh,
am_pre_op_attr *pre_op,
am_post_op_attr *post_op)
@@ -1177,9 +1200,7 @@ am_nfs3_lookup_3_svc(am_LOOKUP3args *argp, struct svc_req *rqstp)
/* dir attributes */
post_op_dir->attributes_follow = 1;
- fattr = &mp->am_fattr;
fattr3 = &post_op_dir->am_post_op_attr_u.attributes;
- fattr_to_fattr3(fattr, fattr3);
post_op_obj->attributes_follow = 0;
@@ -1196,6 +1217,7 @@ am_nfs3_lookup_3_svc(am_LOOKUP3args *argp, struct svc_req *rqstp)
amd_stats.d_drops++;
return 0;
}
+ parent_fattr_to_fattr3(mp, fattr3);
result.status = nfs_error(error);
} else {
/*
@@ -1206,6 +1228,9 @@ am_nfs3_lookup_3_svc(am_LOOKUP3args *argp, struct svc_req *rqstp)
if (ap->am_ttl < mp->am_ttl)
ap->am_ttl = mp->am_ttl;
+ /* dir attrs, update after mount */
+ parent_fattr_to_fattr3(mp, fattr3);
+
mp_to_fh3(ap, &result.res_u.ok.object);
/* mount attributes */

View file

@ -0,0 +1,53 @@
am-utils-6.2 - fix NFSv3 readdir post_op_dir attributes return
From: Ian Kent <raven@themaw.net>
The NFS v3 readdir method is expected to return the attributes of
the directory being read for both success and fail cases.
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/nfs_subr.c | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/amd/nfs_subr.c b/amd/nfs_subr.c
index 6a1b717..00a1dc0 100644
--- a/amd/nfs_subr.c
+++ b/amd/nfs_subr.c
@@ -1627,28 +1627,29 @@ am_nfs3_readdir_3_svc(am_READDIR3args *argp, struct svc_req *rqstp)
result.status = nfs_error(retry);
} else {
am_dirlist3 *list = &result.res_u.ok.reply;
+ nfsfattr *fattr;
+ am_fattr3 *fattr3;
am_nfsstat3 status;
if (amuDebug(D_TRACE))
plog(XLOG_DEBUG, "\treaddir_3(%s)", mp->am_path);
+ fattr = &mp->am_fattr;
+
status = mp->am_al->al_mnt->mf_ops->readdir(mp,
(voidp)&cookie, list, entries, count);
if (status == 0) {
post_op_dir = &result.res_u.ok.dir_attributes;
- nfsfattr *fattr;
- am_fattr3 *fattr3;
-
- fattr = &mp->am_fattr;
- fattr3 = &post_op_dir->am_post_op_attr_u.attributes;
post_op_dir->attributes_follow = 1;
- fattr_to_fattr3(fattr, fattr3);
+ fattr3 = &post_op_dir->am_post_op_attr_u.attributes;
result.status = AM_NFS3_OK;
} else {
post_op_dir = &result.res_u.fail.dir_attributes;
- post_op_dir->attributes_follow = 0;
+ post_op_dir->attributes_follow = 1;
+ fattr3 = &post_op_dir->am_post_op_attr_u.attributes;
result.status = nfs_error(status);
}
+ fattr_to_fattr3(fattr, fattr3);
mp->am_stats.s_readdir++;
}

View file

@ -0,0 +1,62 @@
am-utils-6.2 - fix NFSv3 unlink3_or_rmdir3() post_op attributes return
From: Ian Kent <raven@themaw.net>
The function unlink3_or_rmdir3() is called by both NFS v3 remove and
rmdir methods. Both of these methods require post op wcc attributes
to be returned but unlink3_or_rmdir3() was returning only the pre op
wcc attributes.
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/nfs_subr.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/amd/nfs_subr.c b/amd/nfs_subr.c
index 00a1dc0..0a43b98 100644
--- a/amd/nfs_subr.c
+++ b/amd/nfs_subr.c
@@ -1033,7 +1033,7 @@ static am_nfsstat3 unlink3_or_rmdir3(am_diropargs3 *argp,
am_pre_op_attr *pre_op_dir = &wcc_data->before;
am_post_op_attr *post_op_dir = &wcc_data->after;
nfsfattr *fattr;
- am_wcc_attr *wcc_attr;
+ am_wcc_attr *pre_op_wcc_attr, *post_op_wcc_attr;
am_node *mp, *ap;
int retry;
@@ -1050,12 +1050,17 @@ static am_nfsstat3 unlink3_or_rmdir3(am_diropargs3 *argp,
goto out;
}
+ post_op_dir->attributes_follow = 1;
+ post_op_wcc_attr = &post_op_dir->am_post_op_attr_u.attributes;
+
pre_op_dir->attributes_follow = 1;
+ pre_op_wcc_attr = &pre_op_dir->am_pre_op_attr_u.attributes;
+
fattr = &mp->am_fattr;
- wcc_attr = &pre_op_dir->am_pre_op_attr_u.attributes;
- fattr_to_wcc_attr(fattr, wcc_attr);
+ fattr_to_wcc_attr(fattr, pre_op_wcc_attr);
if (mp->am_fattr.na_type != NFDIR) {
+ fattr_to_wcc_attr(fattr, post_op_wcc_attr);
res = nfs_error(ENOTDIR);
goto out;
}
@@ -1075,9 +1080,14 @@ static am_nfsstat3 unlink3_or_rmdir3(am_diropargs3 *argp,
*/
else if (retry == ENOENT)
retry = 0;
+ fattr_to_wcc_attr(fattr, post_op_wcc_attr);
res = nfs_error(retry);
} else {
forcibly_timeout_mp(mp);
+ /* we can't wait for the expire so use the attributes as
+ * they are now for the post op wcc attributes.
+ */
+ fattr_to_wcc_attr(fattr, post_op_wcc_attr);
res = AM_NFS3_OK;
}

View file

@ -0,0 +1,33 @@
am-utils-6.2 - fix SEGV on quick reply error
From: Ian Kent <raven@themaw.net>
Clearly a programming mistake on my part, odd it hasn't been seen
before ...
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/nfs_subr.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/amd/nfs_subr.c b/amd/nfs_subr.c
index b88a40c8..c0ca0e42 100644
--- a/amd/nfs_subr.c
+++ b/amd/nfs_subr.c
@@ -1293,6 +1293,8 @@ nfs_quick_reply3(am_node *mp, int error)
am_post_op_attr *post_op_obj;
int ret;
+ post_op_dir = &result.res_u.ok.dir_attributes;
+
if (error) {
/*
* Return the error that was passed to us.
@@ -1300,7 +1302,6 @@ nfs_quick_reply3(am_node *mp, int error)
post_op_dir->attributes_follow = 0;
result.status = nfs_error(error);
} else {
- post_op_dir = &result.res_u.ok.dir_attributes;
post_op_obj = &result.res_u.ok.obj_attributes;
am_fattr3 *fattr3;
nfsfattr *fattr;

View file

@ -0,0 +1,57 @@
am-utils-6.2 - fix compiler assignment warning due to libtirpc
From: Ian Kent <raven@themaw.net>
When using libtirpc there is a compiler warning on an assignment in
the amq_program_1() function.
This warning was due to libtirpc using struct sockaddr_in6 for some
address fields in the transport structure as it is backward compatible
with struct sockaddr_in when IPv4 is in use.
But if TLI is in use svc_getcaller() may not be defined or, if it is,
doesn't work as expected.
So change to using amu_svc_getcaller(), which deals with the needed
cast for libtirpc, and handle the NULL return if TLI is being used.
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/amq_svc.c | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/amd/amq_svc.c b/amd/amq_svc.c
index 1f2b3d6..40f79fa 100644
--- a/amd/amq_svc.c
+++ b/amd/amq_svc.c
@@ -162,15 +162,21 @@ amq_program_1(struct svc_req *rqstp, SVCXPRT *transp)
#if defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP)
if (gopt.flags & CFM_USE_TCPWRAPPERS) {
- struct sockaddr_in *remote_addr = svc_getcaller(rqstp->rq_xprt);
- char *remote_hostname = inet_ntoa(remote_addr->sin_addr);
-
- if (!amqsvc_is_client_allowed(remote_addr)) {
- plog(XLOG_WARNING, "Amd denied remote amq service to %s", remote_hostname);
- svcerr_auth(transp, AUTH_FAILED);
- return;
- } else {
- dlog("Amd allowed remote amq service to %s", remote_hostname);
+ struct sockaddr_in *remote_addr = amu_svc_getcaller(rqstp->rq_xprt);
+ char *remote_hostname;
+
+ /* Check the return from amu_svc_getcaller() becuase it's always NULL
+ * if TLI is in use.
+ */
+ if (remote_addr) {
+ remote_hostname = inet_ntoa(remote_addr->sin_addr);
+ if (!amqsvc_is_client_allowed(remote_addr)) {
+ plog(XLOG_WARNING, "Amd denied remote amq service to %s", remote_hostname);
+ svcerr_auth(transp, AUTH_FAILED);
+ return;
+ } else {
+ dlog("Amd allowed remote amq service to %s", remote_hostname);
+ }
}
}
#endif /* defined(HAVE_TCPD_H) && defined(HAVE_LIBWRAP) */

View file

@ -0,0 +1,64 @@
am-utils-6.2 - fix double quote escaping
From: Ian Kent <raven@themaw.net>
autoconf 2.71 autoreconf tells us that back quotes and double quotes
must not be escaped in certain cases.
Signed-off-by: Ian Kent <raven@themaw.net>
---
m4/macros/package_bugreport.m4 | 2 +-
m4/macros/package_name.m4 | 2 +-
m4/macros/package_version.m4 | 2 +-
m4/macros/with_addon.m4 | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/m4/macros/package_bugreport.m4 b/m4/macros/package_bugreport.m4
index 8e1688d9..d2d08412 100644
--- a/m4/macros/package_bugreport.m4
+++ b/m4/macros/package_bugreport.m4
@@ -3,6 +3,6 @@ dnl Bugreport name
AC_DEFUN([AMU_PACKAGE_BUGREPORT],
[AC_MSG_CHECKING(bug-reporting address)
AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$1")
-AC_MSG_RESULT(\"$1\")
+AC_MSG_RESULT("$1")
])
dnl ======================================================================
diff --git a/m4/macros/package_name.m4 b/m4/macros/package_name.m4
index 27f5711b..c2b3e013 100644
--- a/m4/macros/package_name.m4
+++ b/m4/macros/package_name.m4
@@ -3,6 +3,6 @@ dnl Package name
AC_DEFUN([AMU_PACKAGE_NAME],
[AC_MSG_CHECKING(package name)
AC_DEFINE_UNQUOTED(PACKAGE_NAME, "$1")
-AC_MSG_RESULT(\"$1\")
+AC_MSG_RESULT("$1")
])
dnl ======================================================================
diff --git a/m4/macros/package_version.m4 b/m4/macros/package_version.m4
index 0d6c6ef2..2ddd4ade 100644
--- a/m4/macros/package_version.m4
+++ b/m4/macros/package_version.m4
@@ -3,6 +3,6 @@ dnl Version of package
AC_DEFUN([AMU_PACKAGE_VERSION],
[AC_MSG_CHECKING(version of package)
AC_DEFINE_UNQUOTED(PACKAGE_VERSION, "$1")
-AC_MSG_RESULT(\"$1\")
+AC_MSG_RESULT("$1")
])
dnl ======================================================================
diff --git a/m4/macros/with_addon.m4 b/m4/macros/with_addon.m4
index b061621c..d8ea8cfa 100644
--- a/m4/macros/with_addon.m4
+++ b/m4/macros/with_addon.m4
@@ -12,7 +12,7 @@ if test "$withval" = "yes"; then
elif test "$withval" = "no"; then
with_$1=no
else
- AC_MSG_ERROR(please use \"yes\" or \"no\" with --with-$1)
+ AC_MSG_ERROR(please use "yes" or "no" with --with-$1)
fi
],[
with_$1=yes

View file

@ -0,0 +1,82 @@
am-utils-6.2 - fix fedora mock build fail
From: Ian Kent <raven@themaw.net>
NFSv4 really needs to be used here but fedora mock builds don't seem
to be able to see the kernel modules. And when NFSv4 is a module, and
has not been used yet, the test fails.
So use the existing hack to ensure NFSv4 is seen as supported for both
check_fs_mntent.m4 and check_mount_type.m4 in m4/macros.
Signed-off-by: Ian Kent <raven@themaw.net>
---
m4/macros/check_fs_mntent.m4 | 23 +++++++++++++----------
m4/macros/check_mount_type.m4 | 18 ++++++++++++++++++
2 files changed, 31 insertions(+), 10 deletions(-)
diff --git a/m4/macros/check_fs_mntent.m4 b/m4/macros/check_fs_mntent.m4
index 45ac4974..de3d9a91 100644
--- a/m4/macros/check_fs_mntent.m4
+++ b/m4/macros/check_fs_mntent.m4
@@ -141,18 +141,21 @@ do
break
fi
- if test "$ac_fs_tmp" = "nfs3" -a "$ac_cv_header_linux_nfs_mount_h" = "yes"
+ if test $ac_fs_tmp = "nfs3" -o $ac_fs_tmp = "nfs4"
then
- # hack hack hack
- # in 6.1, which has fallback to v2/udp, we might want
- # to always use version 4.
- # in 6.0 we do not have much choice
- #
- let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`"
- if test $nfs_mount_version -ge 4
+ if test "$ac_cv_header_linux_nfs_mount_h" = "yes"
then
- eval "ac_cv_fs_$ac_fs_name=yes"
- break
+ # hack hack hack
+ # in 6.1, which has fallback to v2/udp, we might want
+ # to always use version 4.
+ # in 6.0 we do not have much choice
+ #
+ let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`"
+ if test $nfs_mount_version -ge 4
+ then
+ eval "ac_cv_fs_$ac_fs_name=yes"
+ break
+ fi
fi
fi
diff --git a/m4/macros/check_mount_type.m4 b/m4/macros/check_mount_type.m4
index 88f85323..69354221 100644
--- a/m4/macros/check_mount_type.m4
+++ b/m4/macros/check_mount_type.m4
@@ -155,6 +155,24 @@ do
break
fi
+ if test $ac_fs_tmp = "nfs4"
+ then
+ if test "$ac_cv_header_linux_nfs_mount_h" = "yes"
+ then
+ # hack hack hack
+ # in 6.1, which has fallback to v2/udp, we might want
+ # to always use version 4.
+ # in 6.0 we do not have much choice
+ #
+ let nfs_mount_version="`grep NFS_MOUNT_VERSION /usr/include/linux/nfs_mount.h | awk '{print $''3;}'`"
+ if test $nfs_mount_version -ge 4
+ then
+ eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
+ break
+ fi
+ fi
+ fi
+
# run a test program for bsdi3
AC_RUN_IFELSE(
[AC_LANG_SOURCE(

View file

@ -0,0 +1,307 @@
am-utils-6.2 - fix fsmount naming conflict
From: Ian Kent <raven@themaw.net>
The mount API's new fsmount() system call conflicts with am-utils
struct fsmount so rename it and realted program variables from
fsmount to fs_mount.
Signed-off-by: Ian Kent <raven@themaw.net>
---
fsinfo/fsi_analyze.c | 14 +++++++-------
fsinfo/fsi_data.h | 6 +++---
fsinfo/fsi_gram.y | 16 ++++++++--------
fsinfo/fsi_util.c | 10 +++++-----
fsinfo/fsinfo.h | 4 ++--
fsinfo/wr_bparam.c | 2 +-
fsinfo/wr_fstab.c | 26 +++++++++++++-------------
7 files changed, 39 insertions(+), 39 deletions(-)
diff --git a/fsinfo/fsi_analyze.c b/fsinfo/fsi_analyze.c
index 78598b85..0b92cfd7 100644
--- a/fsinfo/fsi_analyze.c
+++ b/fsinfo/fsi_analyze.c
@@ -404,7 +404,7 @@ fixup_required_disk_info(disk_fs *dp)
static void
-fixup_required_mount_info(fsmount *fp, dict_ent *de)
+fixup_required_mount_info(fs_mount *fp, dict_ent *de)
{
if (!ISSET(fp->f_mask, FM_FROM)) {
if (de->de_count != 1) {
@@ -417,24 +417,24 @@ fixup_required_mount_info(fsmount *fp, dict_ent *de)
if (!mp)
abort();
fp->f_ref = mp;
- set_fsmount(fp, FM_FROM, mp->m_dk->d_host->h_hostname);
+ set_fs_mount(fp, FM_FROM, mp->m_dk->d_host->h_hostname);
fsi_log("set: %s comes from %s", fp->f_volname, fp->f_from);
}
}
if (!ISSET(fp->f_mask, FM_FSTYPE)) {
- set_fsmount(fp, FM_FSTYPE, xstrdup("nfs"));
+ set_fs_mount(fp, FM_FSTYPE, xstrdup("nfs"));
fsi_log("set: fstype is %s", fp->f_fstype);
}
if (!ISSET(fp->f_mask, FM_OPTS)) {
- set_fsmount(fp, FM_OPTS, xstrdup("rw,nosuid,grpid,defaults"));
+ set_fs_mount(fp, FM_OPTS, xstrdup("rw,nosuid,grpid,defaults"));
fsi_log("set: opts are %s", fp->f_opts);
}
if (!ISSET(fp->f_mask, FM_LOCALNAME)) {
if (fp->f_ref) {
- set_fsmount(fp, FM_LOCALNAME, xstrdup(fp->f_volname));
+ set_fs_mount(fp, FM_LOCALNAME, xstrdup(fp->f_volname));
fsi_log("set: localname is %s", fp->f_localname);
} else {
lerror(fp->f_ioloc, "cannot determine localname since volname %s is not uniquely defined", fp->f_volname);
@@ -476,10 +476,10 @@ static void
analyze_mounts(host *hp)
{
qelem *q = hp->h_mount;
- fsmount *fp;
+ fs_mount *fp;
int netbootp = 0;
- ITER(fp, fsmount, q) {
+ ITER(fp, fs_mount, q) {
char *p;
char *nn = xstrdup(fp->f_volname);
int req;
diff --git a/fsinfo/fsi_data.h b/fsinfo/fsi_data.h
index 4cc341d8..3a190626 100644
--- a/fsinfo/fsi_data.h
+++ b/fsinfo/fsi_data.h
@@ -47,7 +47,7 @@ typedef struct dict_data dict_data;
typedef struct dict_ent dict_ent;
typedef struct disk_fs disk_fs;
typedef struct ether_if ether_if;
-typedef struct fsmount fsmount;
+typedef struct fs_mount fs_mount;
typedef struct host host;
typedef struct ioloc ioloc;
typedef struct fsi_mount fsi_mount;
@@ -85,7 +85,7 @@ struct host {
qelem q;
int h_mask;
ioloc *h_ioloc;
- fsmount *h_netroot, *h_netswap;
+ fs_mount *h_netroot, *h_netswap;
#define HF_HOST 0
char *h_hostname; /* The full name of the host */
char *h_lochost; /* The name of the host with local domains stripped */
@@ -181,7 +181,7 @@ struct fsi_mount {
* disk_fs_strings in analyze.c will
* need updating.
*/
-struct fsmount {
+struct fs_mount {
qelem f_q;
fsi_mount *f_ref;
ioloc *f_ioloc;
diff --git a/fsinfo/fsi_gram.y b/fsinfo/fsi_gram.y
index 85d19aa5..17d32401 100644
--- a/fsinfo/fsi_gram.y
+++ b/fsinfo/fsi_gram.y
@@ -56,7 +56,7 @@ extern qelem *list_of_hosts, *list_of_automounts;
qelem *q;
char *s;
fsi_mount *m;
- fsmount *f;
+ fs_mount *f;
}
%token tARCH
@@ -372,7 +372,7 @@ list_of_mounts :
{ $$ = 0; }
| list_of_mounts tMOUNT tSTR localinfo_list
- { set_fsmount($4, FM_VOLNAME, $3);
+ { set_fs_mount($4, FM_VOLNAME, $3);
if ($1)
$$ = $1;
else
@@ -392,22 +392,22 @@ list_of_mounts :
*/
localinfo_list :
/* empty */
- { $$ = new_fsmount(); }
+ { $$ = new_fs_mount(); }
| localinfo_list tDIRECT
- { $$ = $1; set_fsmount($$, FM_DIRECT, ""); }
+ { $$ = $1; set_fs_mount($$, FM_DIRECT, ""); }
| localinfo_list tAS tSTR
- { $$ = $1; set_fsmount($$, FM_LOCALNAME, $3); }
+ { $$ = $1; set_fs_mount($$, FM_LOCALNAME, $3); }
| localinfo_list tFROM tSTR
- { $$ = $1; set_fsmount($$, FM_FROM, $3); }
+ { $$ = $1; set_fs_mount($$, FM_FROM, $3); }
| localinfo_list tFSTYPE tSTR
- { $$ = $1; set_fsmount($$, FM_FSTYPE, $3); }
+ { $$ = $1; set_fs_mount($$, FM_FSTYPE, $3); }
| localinfo_list tOPTS tSTR
- { $$ = $1; set_fsmount($$, FM_OPTS, $3); }
+ { $$ = $1; set_fs_mount($$, FM_OPTS, $3); }
| localinfo_list error '=' tSTR
{ yyerror("unknown mount attribute"); }
diff --git a/fsinfo/fsi_util.c b/fsinfo/fsi_util.c
index f8ff313c..d53ff0df 100644
--- a/fsinfo/fsi_util.c
+++ b/fsinfo/fsi_util.c
@@ -581,7 +581,7 @@ new_mount(void)
void
-set_fsmount(fsmount *fp, int k, char *v)
+set_fs_mount(fs_mount *fp, int k, char *v)
{
int m = 1 << k;
@@ -623,13 +623,13 @@ set_fsmount(fsmount *fp, int k, char *v)
}
-fsmount *
-new_fsmount(void)
+fs_mount *
+new_fs_mount(void)
{
- fsmount *fp = CALLOC(struct fsmount);
+ fs_mount *fp = CALLOC(struct fs_mount);
fp->f_ioloc = current_location();
- show_new("fsmount");
+ show_new("fs_mount");
return fp;
}
diff --git a/fsinfo/fsinfo.h b/fsinfo/fsinfo.h
index 7a871631..896f8bec 100644
--- a/fsinfo/fsinfo.h
+++ b/fsinfo/fsinfo.h
@@ -63,7 +63,7 @@ extern dict *new_dict(void);
extern dict_ent *dict_locate(dict *, char *);
extern disk_fs *new_disk_fs(void);
extern ether_if *new_ether_if(void);
-extern fsmount *new_fsmount(void);
+extern fs_mount *new_fs_mount(void);
extern host *new_host(void);
extern int dict_iter(dict *, int (*)(qelem *));
extern int errors;
@@ -94,7 +94,7 @@ extern void lwarning(ioloc *l, char *fmt, ...)
__attribute__((__format__(__printf__, 2, 3)));
extern void rem_que(qelem *);
extern void set_disk_fs(disk_fs *, int, char *);
-extern void set_fsmount(fsmount *, int, char *);
+extern void set_fs_mount(fs_mount *, int, char *);
extern void set_mount(fsi_mount *, int, char *);
extern void show_area_being_processed(char *area, int n);
extern void show_new(char *msg);
diff --git a/fsinfo/wr_bparam.c b/fsinfo/wr_bparam.c
index 00befa9c..b318d5d3 100644
--- a/fsinfo/wr_bparam.c
+++ b/fsinfo/wr_bparam.c
@@ -49,7 +49,7 @@
* Write a host/path in NFS format
*/
static int
-write_nfsname(FILE *ef, fsmount *fp, char *hn)
+write_nfsname(FILE *ef, fs_mount *fp, char *hn)
{
int errors = 0;
char *h = xstrdup(fp->f_ref->m_dk->d_host->h_hostname);
diff --git a/fsinfo/wr_fstab.c b/fsinfo/wr_fstab.c
index 166353eb..4daf161d 100644
--- a/fsinfo/wr_fstab.c
+++ b/fsinfo/wr_fstab.c
@@ -48,22 +48,22 @@
/* forward definitions */
static void write_aix1_dkfstab(FILE *ef, disk_fs *dp);
-static void write_aix1_dkrmount(FILE *ef, char *hn, fsmount *fp);
+static void write_aix1_dkrmount(FILE *ef, char *hn, fs_mount *fp);
static void write_aix3_dkfstab(FILE *ef, disk_fs *dp);
-static void write_aix3_dkrmount(FILE *ef, char *hn, fsmount *fp);
+static void write_aix3_dkrmount(FILE *ef, char *hn, fs_mount *fp);
static int write_dkfstab(FILE *ef, qelem *q, void (*output) (FILE *, disk_fs *));
-static int write_dkrmount(FILE *ef, qelem *q, char *hn, void (*output) (FILE *, char *, fsmount *));
+static int write_dkrmount(FILE *ef, qelem *q, char *hn, void (*output) (FILE *, char *, fs_mount *));
static void write_generic_dkfstab(FILE *ef, disk_fs *dp);
-static void write_generic_dkrmount(FILE *ef, char *hn, fsmount *fp);
+static void write_generic_dkrmount(FILE *ef, char *hn, fs_mount *fp);
static void write_ultrix_dkfstab(FILE *ef, disk_fs *dp);
-static void write_ultrix_dkrmount(FILE *ef, char *hn, fsmount *fp);
+static void write_ultrix_dkrmount(FILE *ef, char *hn, fs_mount *fp);
/* ----------------------------------------------- */
static struct os_fstab_type {
char *os_name;
void (*op_fstab) (FILE *ef, disk_fs *dp);
- void (*op_mount) (FILE *ef, char *hn, fsmount *fp);
+ void (*op_mount) (FILE *ef, char *hn, fs_mount *fp);
} os_tabs[] = {
{
@@ -117,7 +117,7 @@ write_aix1_dkfstab(FILE *ef, disk_fs *dp)
static void
-write_aix1_dkrmount(FILE *ef, char *hn, fsmount *fp)
+write_aix1_dkrmount(FILE *ef, char *hn, fs_mount *fp)
{
char *h = xstrdup(fp->f_ref->m_dk->d_host->h_hostname);
char *hp = xstrdup(h);
@@ -166,7 +166,7 @@ write_aix3_dkfstab(FILE *ef, disk_fs *dp)
static void
-write_aix3_dkrmount(FILE *ef, char *hn, fsmount *fp)
+write_aix3_dkrmount(FILE *ef, char *hn, fs_mount *fp)
{
char *h = xstrdup(fp->f_ref->m_dk->d_host->h_hostname);
@@ -200,7 +200,7 @@ write_ultrix_dkfstab(FILE *ef, disk_fs *dp)
static void
-write_ultrix_dkrmount(FILE *ef, char *hn, fsmount *fp)
+write_ultrix_dkrmount(FILE *ef, char *hn, fs_mount *fp)
{
char *h = xstrdup(fp->f_ref->m_dk->d_host->h_hostname);
@@ -234,7 +234,7 @@ write_generic_dkfstab(FILE *ef, disk_fs *dp)
static void
-write_generic_dkrmount(FILE *ef, char *hn, fsmount *fp)
+write_generic_dkrmount(FILE *ef, char *hn, fs_mount *fp)
{
char *h;
@@ -291,12 +291,12 @@ write_dkfstab(FILE *ef, qelem *q, void (*output) (FILE *, disk_fs *))
static int
-write_dkrmount(FILE *ef, qelem *q, char *hn, void (*output) (FILE *, char *, fsmount *))
+write_dkrmount(FILE *ef, qelem *q, char *hn, void (*output) (FILE *, char *, fs_mount *))
{
int errors = 0;
- fsmount *fp;
+ fs_mount *fp;
- ITER(fp, fsmount, q)
+ ITER(fp, fs_mount, q)
(*output) (ef, hn, fp);
return errors;

View file

@ -0,0 +1,134 @@
am-utils-6.2 - fix linux nfs kernel module search
From: Ian Kent <raven@themaw.net>
The configure macros AMU_CHECK_FS_MNTENT() and AMU_CHECK_MOUNT_TYPE()
haven't been updated for a log time. In particular kernel modules that
are xz compressed aren't considered.
Also the containing subdirectory name isn't always the the same as
the module name and needs to be special cased.
The cases I found have been fixed, there are probably more but this
is enough to get us started.
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/amfs_host.c | 1 +
configure.ac | 6 +++---
m4/macros/check_fs_mntent.m4 | 17 +++++++++++++++--
m4/macros/check_mount_type.m4 | 29 +++++++++++++++++++++++++----
4 files changed, 44 insertions(+), 9 deletions(-)
diff --git a/amd/amfs_host.c b/amd/amfs_host.c
index a363c5cc..deaf69fa 100644
--- a/amd/amfs_host.c
+++ b/amd/amfs_host.c
@@ -50,6 +50,7 @@
#endif /* HAVE_CONFIG_H */
#include <am_defs.h>
#include <amd.h>
+#include <am_utils.h>
static char *amfs_host_match(am_opts *fo);
static int amfs_host_init(mntfs *mf);
diff --git a/configure.ac b/configure.ac
index ef4dab0e..408964d8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -808,8 +808,8 @@ dnl NFS related tests need to happen earlier: many things depend on them
AMU_STRUCT_FIELD_NFS_FH
AMU_STRUCT_NFS_FH
AMU_STRUCT_NFS_FH3
-AMU_CHECK_FS_MNTENT(nfs3)
-AMU_CHECK_FS_MNTENT(nfs4)
+AMU_CHECK_FS_MNTENT(nfsv3 nfs3, nfs3)
+AMU_CHECK_FS_MNTENT(nfsv4 nfs4, nfs4)
dnl ======================================================================
dnl -----------------------------------------------------------------------
@@ -1117,7 +1117,7 @@ dnl check for mount(2) type/name for filesystem (MNTTYPE_*, MOUNT_*)
AC_MSG_NOTICE(*** MOUNTING TYPES ***)
AMU_CHECK_MOUNT_TYPE(nfs)
AMU_CHECK_MOUNT_TYPE(nfs3)
-AMU_CHECK_MOUNT_TYPE(nfs4)
+AMU_CHECK_MOUNT_TYPE(nfsv4 nfs4, nfs4)
AMU_CHECK_MOUNT_TYPE(lustre)
AMU_CHECK_MOUNT_TYPE(ext4 ext3 ext2 ffs ufs 4.2 4.3 4.4 efs xfs jfs ultrix, ufs)
AMU_CHECK_MOUNT_TYPE(xfs)
diff --git a/m4/macros/check_fs_mntent.m4 b/m4/macros/check_fs_mntent.m4
index e612b4ec..45ac4974 100644
--- a/m4/macros/check_fs_mntent.m4
+++ b/m4/macros/check_fs_mntent.m4
@@ -98,12 +98,25 @@ do
fi
# look for a loadable filesystem module (linux 2.4+)
- if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko
+ ac_fs_subdir=$ac_fs_tmp
+ if test -n "$2"
+ then
+ if test "$ac_fs_tmp" = "nfsv3" -o "$ac_fs_tmp" = "nfsv4"
+ then
+ ac_fs_subdir="nfs"
+ fi
+ fi
+ if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_subdir/$ac_fs_tmp.ko.xz
+ then
+ eval "ac_cv_fs_$ac_fs_name=yes"
+ break
+ fi
+ if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_subdir/$ac_fs_tmp.ko
then
eval "ac_cv_fs_$ac_fs_name=yes"
break
fi
- if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o
+ if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_subdir/$ac_fs_tmp.o
then
eval "ac_cv_fs_$ac_fs_name=yes"
break
diff --git a/m4/macros/check_mount_type.m4 b/m4/macros/check_mount_type.m4
index c779e0bf..88f85323 100644
--- a/m4/macros/check_mount_type.m4
+++ b/m4/macros/check_mount_type.m4
@@ -104,14 +104,35 @@ do
fi
# look for a loadable filesystem module (linux 2.4+)
- if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.ko
+ # special casing here assumes preferred option name will be
+ # first in the list.
+ ac_fs_option="$ac_fs_tmp"
+ ac_fs_subdir=$ac_fs_tmp
+ if test -n "$2"
then
- eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
+ if test "$ac_fs_tmp" = "nfsv3" -o "$ac_fs_tmp" = "nfsv4"
+ then
+ ac_fs_subdir="nfs"
+ ac_fs_option="$ac_fs_name"
+ fi
+ if test "$ac_fs_tmp" = "vfat" -o "$ac_fs_tmp" = "msdos"
+ then
+ ac_fs_subdir="fat"
+ fi
+ fi
+ if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_subdir/$ac_fs_tmp.ko.xz
+ then
+ eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_option\\\""
break
fi
- if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_tmp/$ac_fs_tmp.o
+ if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_subdir/$ac_fs_tmp.ko
then
- eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
+ eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_option\\\""
+ break
+ fi
+ if test -f /lib/modules/$host_os_version/kernel/fs/$ac_fs_subdir/$ac_fs_tmp.o
+ then
+ eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_option\\\""
break
fi

View file

@ -0,0 +1,24 @@
am-utils-6.2 - fix logical not comparison in get_ldap_timestamp()
From: Ian Kent <raven@themaw.net>
Looks like the not in this comparison is not meant to be applied to *ts.
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/info_ldap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/amd/info_ldap.c b/amd/info_ldap.c
index cfed6fd..ecfc210 100644
--- a/amd/info_ldap.c
+++ b/amd/info_ldap.c
@@ -446,7 +446,7 @@ get_ldap_timestamp(ALD *a, char *map, time_t *ts)
vals[0], map);
err = ENOENT;
}
- if (!*ts > 0) {
+ if (!(*ts > 0)) {
plog(XLOG_USER, "Nonpositive timestamp %ld for map %s\n",
(u_long) *ts, map);
err = ENOENT;

View file

@ -0,0 +1,29 @@
am-utils-6.2 - fix mountd version used when mount is nfs v4
From: Ian Kent <raven@themaw.net>
If we are trying to mount the exports of a type host map entry and the
mounts are NFS v4 make sure mountd version 3 is used in the same way it
is used for NFS v3 mounts.
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/amfs_host.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/amd/amfs_host.c b/amd/amfs_host.c
index a3468ecd..a363c5cc 100644
--- a/amd/amfs_host.c
+++ b/amd/amfs_host.c
@@ -346,8 +346,9 @@ amfs_host_mount(am_node *am, mntfs *mf)
host = mf->mf_server->fs_host;
sin = *mf->mf_server->fs_ip;
plog(XLOG_INFO, "amfs_host_mount: NFS version %d", (int) mf->mf_server->fs_version);
-#ifdef HAVE_FS_NFS3
- if (mf->mf_server->fs_version == NFS_VERSION3)
+#if defined(HAVE_FS_NFS3) || defined(HAVE_FS_NFS4)
+ if (mf->mf_server->fs_version == NFS_VERSION3 ||
+ mf->mf_server->fs_version == NFS_VERSION4)
mnt_version = AM_MOUNTVERS3;
else
#endif /* HAVE_FS_NFS3 */

View file

@ -0,0 +1,26 @@
am-utils-6.2 - fix nfsv3 fh length in NFS_FH_DREF()
From: Ian Kent <ikent@redhat.com>
The NFS_FH_DREF() macro for linux uses sizeof(struct nfs_fh) for the
length of the file handle copy regardless of the version of NFS used.
But NFSv3 file handles are 64 bytes and not copying the whole file
handle can cause automounts to fail.
Changing this to use the size of the passed nfs file handle fixes
the problem.
Signed-off-by: Ian Kent <ikent@redhat.com>
---
conf/fh_dref/fh_dref_linux.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/conf/fh_dref/fh_dref_linux.h b/conf/fh_dref/fh_dref_linux.h
index 7ffa5b50..f8fb1a89 100644
--- a/conf/fh_dref/fh_dref_linux.h
+++ b/conf/fh_dref/fh_dref_linux.h
@@ -1,2 +1,2 @@
/* $srcdir/conf/fh_dref/fh_dref_linux.h */
-#define NFS_FH_DREF(dst, src) memcpy((char *) &(dst.data), (char *) src, sizeof(struct nfs_fh))
+#define NFS_FH_DREF(dst, src) memcpy((char *) &(dst.data), (char *) src, sizeof(*src))

View file

@ -0,0 +1,123 @@
am-utils-6.2 - fix umount to mount race
From: Ian Kent <raven@themaw.net>
If a mount request arrives while its mount fs is being umounted the
the reference count of the mount fs never reaches 1 so the location
MF_MOUNTED is not cleared and the mount fs instance is not freed.
This leads to amd thinking the mount fs is still mounted and the
mount request succeeds without its corresponding target being
mounted.
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/amd.h | 1 +
amd/amfs_generic.c | 10 +++++++---
amd/autil.c | 9 +++++++++
amd/map.c | 13 ++++++++++++-
4 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/amd/amd.h b/amd/amd.h
index f66f5b7..504bcf7 100644
--- a/amd/amd.h
+++ b/amd/amd.h
@@ -112,6 +112,7 @@
#define AMF_AUTOFS 0x0004 /* This node is part of an autofs filesystem */
#define AMF_REMOUNT 0x0008 /* This node needs to be remounted */
#define AMF_SOFTLOOKUP 0x0010 /* This node returns EIO if server is down */
+#define AMF_SOFTUNMOUNT 0x0020 /* unmount_node() returned EAGAIN, mount still referenced */
/*
* macros for struct mntfs (list of mounted filesystems)
diff --git a/amd/amfs_generic.c b/amd/amfs_generic.c
index 86d0ab7..7ab2829 100644
--- a/amd/amfs_generic.c
+++ b/amd/amfs_generic.c
@@ -178,7 +178,7 @@ amfs_lookup_node(am_node *mp, char *fname, int *error_return)
error = mf->mf_error;
continue;
}
- if (!(mf->mf_flags & MFF_MOUNTED) || (mf->mf_flags & MFF_UNMOUNTING)) {
+ if (mf->mf_flags & (MFF_MOUNTING | MFF_UNMOUNTING)) {
in_progrss:
/*
* If the fs is not mounted or it is unmounting then there
@@ -743,9 +743,13 @@ amfs_bgmount(struct continuation *cp)
if (mf->mf_flags & (MFF_MOUNTING | MFF_UNMOUNTING)) {
/*
- * Still mounting - retry later
+ * Still mounting or umounting - retry later
*/
- dlog("mount of \"%s\" already pending", mf->mf_info);
+ if (mf->mf_flags & MFF_MOUNTING) {
+ dlog("mount of \"%s\" already pending", mf->mf_info);
+ } else {
+ dlog("unmount of \"%s\" already pending", mf->mf_info);
+ }
goto retry;
}
diff --git a/amd/autil.c b/amd/autil.c
index f44a0e2..1962c71 100644
--- a/amd/autil.c
+++ b/amd/autil.c
@@ -703,6 +703,15 @@ am_unmounted(am_node *mp)
}
/*
+ * Clear the mounted flag in case there is a pending mount with
+ * the same target fs and this is the last reference to it.
+ */
+ if (mp->am_flags & AMF_SOFTUNMOUNT)
+ mp->am_flags &= ~AMF_SOFTUNMOUNT;
+ else
+ mf->mf_flags &= ~MFF_MOUNTED;
+
+ /*
* If this is a pseudo-directory then adjust the link count
* in the parent
*/
diff --git a/amd/map.c b/amd/map.c
index a6df44b..cf5263e 100644
--- a/amd/map.c
+++ b/amd/map.c
@@ -819,11 +819,17 @@ unmount_node(opaque_t arg)
#endif /* HAVE_FS_AUTOFS */
if (mf->mf_refc == 1)
error = mf->mf_ops->umount_fs(mp, mf);
+
+ /* Mount was not actually unmounted, soft umount.
+ * Tell the caller about it.
+ */
+ if (!error && mf->mf_refc > 1)
+ error = EAGAIN;
}
/* do this again, it might have changed */
mf = mp->am_al->al_mnt;
- if (error) {
+ if (error && error != EAGAIN) {
errno = error; /* XXX */
dlog("%s: unmount: %m", mf->mf_mount);
}
@@ -870,6 +876,10 @@ free_map_if_success(int rc, int term, opaque_t arg)
#endif /* HAVE_FS_AUTOFS */
amd_stats.d_uerr++;
} else if (rc) {
+ if (rc == EAGAIN) {
+ mp->am_flags |= AMF_SOFTUNMOUNT;
+ goto done;
+ }
notify_child(mp, AMQ_UMNT_FAILED, rc, 0);
if (mf->mf_ops == &amfs_program_ops || rc == EBUSY)
plog(XLOG_STATS, "\"%s\" on %s still active", mp->am_path, mf->mf_mount);
@@ -885,6 +895,7 @@ free_map_if_success(int rc, int term, opaque_t arg)
#endif /* HAVE_FS_AUTOFS */
amd_stats.d_uerr++;
} else {
+done:
/*
* am_unmounted() will call notify_child() appropriately.
*/

View file

@ -0,0 +1,52 @@
am-utils-6.2 - fix wcc attr usage in unlink3_or_rmdir3()
From: Ian Kent <raven@themaw.net>
The definition of the wcc post op attributes should be am_fattr3 not
am_wcc_attr in unlink3_or_rmdir3().
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/nfs_subr.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/amd/nfs_subr.c b/amd/nfs_subr.c
index a383618..b88a40c 100644
--- a/amd/nfs_subr.c
+++ b/amd/nfs_subr.c
@@ -1058,7 +1058,8 @@ static am_nfsstat3 unlink3_or_rmdir3(am_diropargs3 *argp,
am_pre_op_attr *pre_op_dir = &wcc_data->before;
am_post_op_attr *post_op_dir = &wcc_data->after;
nfsfattr *fattr;
- am_wcc_attr *pre_op_wcc_attr, *post_op_wcc_attr;
+ am_wcc_attr *pre_op_wcc_attr;
+ am_fattr3 *post_op_wcc_attr;
am_node *mp, *ap;
int retry;
@@ -1085,7 +1086,7 @@ static am_nfsstat3 unlink3_or_rmdir3(am_diropargs3 *argp,
fattr_to_wcc_attr(fattr, pre_op_wcc_attr);
if (mp->am_fattr.na_type != NFDIR) {
- fattr_to_wcc_attr(fattr, post_op_wcc_attr);
+ fattr_to_fattr3(fattr, post_op_wcc_attr);
res = nfs_error(ENOTDIR);
goto out;
}
@@ -1105,14 +1106,14 @@ static am_nfsstat3 unlink3_or_rmdir3(am_diropargs3 *argp,
*/
else if (retry == ENOENT)
retry = 0;
- fattr_to_wcc_attr(fattr, post_op_wcc_attr);
+ fattr_to_fattr3(fattr, post_op_wcc_attr);
res = nfs_error(retry);
} else {
forcibly_timeout_mp(mp);
/* we can't wait for the expire so use the attributes as
* they are now for the post op wcc attributes.
*/
- fattr_to_wcc_attr(fattr, post_op_wcc_attr);
+ fattr_to_fattr3(fattr, post_op_wcc_attr);
res = AM_NFS3_OK;
}

View file

@ -0,0 +1,20 @@
commit 54da7c8206e38d0bf08a250835553754a1235360
Author: Christos Zoulas <christos@zoulas.com>
Date: Wed Jan 21 23:28:33 2015 -0500
make sure variables are initialized
diff --git a/amd/nfs_subr.c b/amd/nfs_subr.c
index 7192a6a..30effba 100644
--- a/amd/nfs_subr.c
+++ b/amd/nfs_subr.c
@@ -1711,6 +1711,9 @@ am_nfs3_fsstat_3_svc(am_FSSTAT3args *argp, struct svc_req *rqstp)
if ((gopt.flags & CFM_SHOW_STATFS_ENTRIES) &&
mp->am_al->al_mnt && mp->am_al->al_mnt->mf_mopts) {
mnt.mnt_opts = mp->am_al->al_mnt->mf_mopts;
+ blocks = 0;
+ bfree = 0;
+ bavail = 0;
if (amu_hasmntopt(&mnt, "browsable")) {
count_map_entries(mp, &blocks, &bfree, &bavail);
}

View file

@ -0,0 +1,26 @@
commit 116309607c437e302dafa1efb60330f54f815761
Author: Christos Zoulas <christos@zoulas.com>
Date: Sat Jan 17 12:21:24 2015 -0500
print_nfs_common_args() is only needed with DEBUG
diff --git a/libamu/mount_fs.c b/libamu/mount_fs.c
index b5576bd..b577bab 100644
--- a/libamu/mount_fs.c
+++ b/libamu/mount_fs.c
@@ -647,6 +647,7 @@ compute_nfs_common_args(struct nfs_common_args *nap, mntent_t *mntp,
#endif /* defined(MNT2_NFS_OPT_XLATECOOKIE) && defined(MNTTAB_OPT_XLATECOOKIE) */
}
+#ifdef DEBUG
static void
print_nfs_common_args(const struct nfs_common_args *a)
{
@@ -664,6 +665,7 @@ print_nfs_common_args(const struct nfs_common_args *a)
plog(XLOG_DEBUG, "NA->acdirmax = %lu", a->acdirmax);
#endif /* HAVE_NFS_ARGS_T_ACREGMIN */
}
+#endif
static void
discard_nfs23_args(nfs_args_t *nap)

View file

@ -0,0 +1,26 @@
commit a87188b9f0596651ce987253a6af23aca4b08b75
Author: Christos Zoulas <christos@zoulas.com>
Date: Sat Jan 17 12:42:55 2015 -0500
remove set but not used variable
diff --git a/conf/transp/transp_sockets.c b/conf/transp/transp_sockets.c
index b3ad5fc..6326007 100644
--- a/conf/transp/transp_sockets.c
+++ b/conf/transp/transp_sockets.c
@@ -418,7 +418,6 @@ u_long
get_nfs_version(char *host, struct sockaddr_in *sin, u_long nfs_version, const char *proto, u_long def)
{
CLIENT *clnt;
- int again = 0;
enum clnt_stat clnt_stat;
struct timeval tv;
int sock;
@@ -433,7 +432,6 @@ get_nfs_version(char *host, struct sockaddr_in *sin, u_long nfs_version, const c
nfs_version = def;
else
nfs_version = NFS_VERS_MAX;
- again = 1;
}
tv.tv_sec = 2; /* retry every 2 seconds, but also timeout */
tv.tv_usec = 0;

View file

@ -0,0 +1,28 @@
commit ed717dad0fee421744a24e6fb43e09d62b3f898d
Author: Christos Zoulas <christos@zoulas.com>
Date: Sat Jan 17 12:45:22 2015 -0500
remove set but not used variable
diff --git a/amd/amfs_generic.c b/amd/amfs_generic.c
index 25d734b..c352a32 100644
--- a/amd/amfs_generic.c
+++ b/amd/amfs_generic.c
@@ -1153,7 +1153,6 @@ amfs_generic_lookup_child(am_node *mp, char *fname, int *error_return, int op)
{
am_node *new_mp;
am_loc **al_array;
- int mp_error;
dlog("in amfs_generic_lookup_child");
@@ -1178,9 +1177,6 @@ amfs_generic_lookup_child(am_node *mp, char *fname, int *error_return, int op)
return new_mp;
}
- /* save error_return */
- mp_error = *error_return;
-
al_array = amfs_lookup_loc(new_mp, error_return);
if (!al_array) {
new_mp->am_error = new_mp->am_al->al_mnt->mf_error = *error_return;

View file

@ -0,0 +1,38 @@
commit 79bb90caf12d2713b4736c3820135f0f00424f10
Author: Christos Zoulas <christos@zoulas.com>
Date: Sat Jan 17 12:29:03 2015 -0500
remove set but not used variable
diff --git a/hlfsd/hlfsd.c b/hlfsd/hlfsd.c
index 686bb63..701abcd 100644
--- a/hlfsd/hlfsd.c
+++ b/hlfsd/hlfsd.c
@@ -144,7 +144,6 @@ main(int argc, char *argv[])
int opterrs = 0;
int retry;
int soNFS; /* NFS socket */
- int s = -99;
mntent_t mnt;
nfs_args_t nfs_args;
am_nfs_handle_t anh;
@@ -449,17 +448,16 @@ main(int argc, char *argv[])
* set this signal handler.
*/
if (amuDebug(D_DAEMON)) {
- s = -99;
while (stoplight != SIGUSR2) {
plog(XLOG_INFO, "parent waits for child to setup (stoplight=%d)", stoplight);
#ifdef HAVE_SIGSUSPEND
{
sigset_t mask;
sigemptyset(&mask);
- s = sigsuspend(&mask); /* wait for child to set up */
+ (void)sigsuspend(&mask); /* wait for child to set up */
}
#else /* not HAVE_SIGSUSPEND */
- s = sigpause(0); /* wait for child to set up */
+ (void)sigpause(0); /* wait for child to set up */
#endif /* not HAVE_SIGSUSPEND */
sleep(1);
}

View file

@ -0,0 +1,22 @@
commit f61becdba8df1d6d515f5476d312d3cf4e933946
Author: Christos Zoulas <christos@zoulas.com>
Date: Sat Jan 17 12:43:32 2015 -0500
remove unused function
diff --git a/amq/amq.c b/amq/amq.c
index e99732f..5d4ed7a 100644
--- a/amq/amq.c
+++ b/amq/amq.c
@@ -256,11 +256,6 @@ show_mi(amq_mount_info_list *ml, enum show_opt e, int *mwid, int *dwid, int *twi
}
static void
-show_map(amq_map_info *mi)
-{
-}
-
-static void
show_mapinfo(amq_map_info_list *ml, enum show_opt e, int *nwid, int *wwid)
{
u_int i;

View file

@ -0,0 +1,59 @@
commit 76e1a5ddc9ef9730205b2da2ed6b654d8fbaef40
Author: Christos Zoulas <christos@zoulas.com>
Date: Sat Jan 17 12:27:56 2015 -0500
uid_t might be a different size than unsigned int, so XXX: truncate.
diff --git a/hlfsd/stubs.c b/hlfsd/stubs.c
index b26e5f4..70876b7 100644
--- a/hlfsd/stubs.c
+++ b/hlfsd/stubs.c
@@ -60,6 +60,21 @@ static int started;
static am_nfs_fh slink;
static am_nfs_fh un_fhandle;
+static void
+xgetuid(uid_t *uid, const void *p)
+{
+ u_int xuid;
+ (void)memcpy(&xuid, p, sizeof(xuid));
+ *uid = xuid;
+}
+
+static void
+xputuid(void *p, uid_t uid)
+{
+ u_int xuid = uid;
+ (void)memcpy(p, &xuid, sizeof(xuid));
+}
+
/*
* GLOBALS:
*/
@@ -160,7 +175,7 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
if (gid != hlfs_gid) {
res.ns_status = NFSERR_STALE;
} else {
- (void)memcpy(&uid, argp->fh_data, sizeof(uid));
+ xgetuid(&uid, argp->fh_data);
if (plt_search(uid) != (uid2home_t *) NULL) {
res.ns_status = NFS_OK;
un_fattr.na_fileid = uid;
@@ -278,7 +293,7 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp)
un_fattr.na_fileid = untab[idx].uid;
res.dr_u.dr_drok_u.drok_attributes = un_fattr;
memset(&un_fhandle, 0, sizeof(un_fhandle));
- memcpy(un_fhandle.fh_data, &untab[idx].uid, sizeof(untab[idx].uid));
+ xputuid(un_fhandle.fh_data, untab[idx].uid);
xstrlcpy((char *) &un_fhandle.fh_data[sizeof(int)],
untab[idx].username,
sizeof(am_nfs_fh) - sizeof(int));
@@ -333,7 +348,7 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
}
if (groupid == hlfs_gid) {
- memcpy(&userid, argp->fh_data, sizeof(userid));
+ xgetuid(&userid, argp->fh_data);
username = (char *) &argp->fh_data[sizeof(int)];
if (!(res.rlr_u.rlr_data_u = mailbox(userid, username)))
return (nfsreadlinkres *) NULL;

View file

@ -0,0 +1,84 @@
am-utils-6.2 - update configure.ac
From: Ian Kent <raven@themaw.net>
Make some changes to configure.ac suggested by autoupdate from autoconf
2.71.
Also move AC_USE_SYSTEM_EXTENSIONS and AC_SEARCH_LIBS([strerror],[cposix])
further up to elliminate some warnings.
Signed-off-by: Ian Kent <raven@themaw.net>
---
configure.ac | 18 +++++++-----------
1 file changed, 7 insertions(+), 11 deletions(-)
diff --git a/configure.ac b/configure.ac
index e1bc3290..ef4dab0e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,9 +12,7 @@ dnl ######################################################################
dnl INITIALIZATION
dnl AC_INIT
dnl new init style: PACKAGE, VERSION, BUG-REPORTING-ADDRESS
-AC_INIT([am-utils],
- sinclude([vers.m4]),
- [https://bugzilla.am-utils.org/ or am-utils@am-utils.org])
+AC_INIT([am-utils],sinclude([vers.m4]),[https://bugzilla.am-utils.org/ or am-utils@am-utils.org])
AC_MSG_NOTICE(*** INITIALIZATION ***)
AC_CONFIG_SRCDIR([amd/amd.c])
AC_CONFIG_MACRO_DIR([m4])
@@ -55,7 +53,7 @@ AH_BOTTOM([
])
dnl
dnl AC_CONFIG_AUX_DIR(m4)
-AC_PREREQ(2.52)
+AC_PREREQ(2.69)
AC_REVISION($Revision: 1.134 $)
AC_COPYRIGHT([Copyright (c) 1997-2011 Erez Zadok])
dnl find out system type
@@ -105,14 +103,14 @@ dnl ======================================================================
dnl Particular Program Checks
AC_MSG_NOTICE(*** PARTICULAR PROGRAMS (part 1) ***)
dnl AC-PROG-LIBTOOL will run this, but we need this to squelch warnings
-dnl from autoconf about AMU_TRY_COMPILE running before AC_AIX/AC_ISC_POSIX
+dnl from autoconf about AMU_TRY_COMPILE running before AC_USE_SYSTEM_EXTENSIONS/AC_SEARCH_LIBS([strerror],[cposix])
+AC_USE_SYSTEM_EXTENSIONS
+AC_SEARCH_LIBS([strerror],[cposix])
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CC_C_O
AC_PROG_GCC_TRADITIONAL
AC_PROG_MAKE_SET
-AC_ISC_POSIX
-AC_AIX
dnl XXX: available in autoconf-2.14
dnl AC_PROG_CC_STDC
dnl ======================================================================
@@ -148,7 +146,7 @@ dnl my version of prog_libtool will not build shared by default
dnl AM_PROG_LIBTOOL2
dnl build static libraries by default
AC_DISABLE_SHARED
-dnl XXX: for autoconf-2.14: use AC_PROG_LIBTOOL, not AM_PROG_LIBTOOL
+dnl XXX: for autoconf-2.69: use LT_INIT, not AC_PROG_LIBTOOL
case ${host_os} in
# Temporarily undo renaming of "linux-gnu" to "linux", because
# libtool only looks for "linux-gnu". Sigh.
@@ -156,7 +154,7 @@ case ${host_os} in
esac
dnl this line must appear only once and on its own line
dnl (hence the double case statements above and below)
-AC_PROG_LIBTOOL
+LT_INIT
case ${host_os} in
# end temporary renaming of "linux-gnu" to "linux"
linux-gnu ) host_os=linux ;;
@@ -175,8 +173,6 @@ dnl ######################################################################
dnl Some of these macros must be called before any call to the C compiler
AC_MSG_NOTICE(*** UNIX VARIANTS ***)
dnl UNIX VARIANTS
-dnl AC_AIX
-dnl AC_ISC_POSIX
AMU_LINUX_HEADERS
dnl ======================================================================

View file

@ -0,0 +1,95 @@
am-utils-6.2 - use Linux libtirpc if present
From: Ian Kent <raven@themaw.net>
For Linux systems, if the header files and shared libraries of libtirpc
are present use them instead of the glibc RPC implementation.
Signed-off-by: Ian Kent <raven@themaw.net>
---
Makefile.am | 3 ++-
configure.ac | 4 ++++
include/am_compat.h | 8 ++++++--
m4/macros/check_linux_libtirpc.m4 | 15 +++++++++++++++
4 files changed, 27 insertions(+), 3 deletions(-)
create mode 100644 m4/macros/check_linux_libtirpc.m4
diff --git a/Makefile.am b/Makefile.am
index bae4615e..e094e950 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -146,7 +146,8 @@ EXTRA_DIST_M4 = \
m4/macros/type_xdrproc_t.m4 \
m4/macros/type_xfs_args.m4 \
m4/macros/type_yp_order_outorder.m4 \
- m4/macros/with_addon.m4
+ m4/macros/with_addon.m4 \
+ m4/macros/check_linux_libtirpc.m4
EXTRA_DIST_CONF = \
conf/autofs/autofs_default.h \
diff --git a/configure.ac b/configure.ac
index ce619257..98b444d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -222,6 +222,9 @@ dnl lots of code. So I am forced to use a special purpose macro that sets
dnl the libraries based on the OS. Sigh. -Erez.
AMU_CHECK_OS_LIBS
+dnl use Linux libtirpc if possible
+AMU_CHECK_LIBTIRPC
+
dnl librpc and librpcsvc are needed on Solaris
AC_CHECK_LIB(rpc, clnt_sperrno)
AC_CHECK_LIB(rpcsvc, xdr_fhandle)
@@ -433,6 +436,7 @@ AC_CHECK_HEADERS( \
arpa/nameser.h \
arpa/inet.h \
bsd/rpc/rpc.h \
+ tirpc/netconfig.h \
cdfs/cdfsmount.h \
cdfs/cdfs_mount.h \
fs/udf/udf_mount.h \
diff --git a/include/am_compat.h b/include/am_compat.h
index 3463f3fa..d6826fc7 100644
--- a/include/am_compat.h
+++ b/include/am_compat.h
@@ -454,11 +454,15 @@ struct hsfs_args {
/*
* Define a dummy struct netconfig for non-TLI systems
*/
-#if !defined(HAVE_NETCONFIG_H) && !defined(HAVE_SYS_NETCONFIG_H)
+#if !defined(HAVE_NETCONFIG_H)
+# if !defined(HAVE_SYS_NETCONFIG_H)
+# if !defined(HAVE_TIRPC_NETCONFIG_H)
struct netconfig {
int dummy;
};
-#endif /* not HAVE_NETCONFIG_H and not HAVE_SYS_NETCONFIG_H */
+# endif /* not HAVE_TIRPC_NETCONFIG_H */
+# endif /* not HAVE_SYS_NETCONFIG_H */
+#endif /* not HAVE_NETCONFIG_H */
/* some OSs don't define INADDR_NONE and assume it's unsigned -1 */
#ifndef INADDR_NONE
diff --git a/m4/macros/check_linux_libtirpc.m4 b/m4/macros/check_linux_libtirpc.m4
new file mode 100644
index 00000000..7b40e45c
--- /dev/null
+++ b/m4/macros/check_linux_libtirpc.m4
@@ -0,0 +1,15 @@
+dnl ######################################################################
+dnl Check for Linux libtirpc library
+AC_DEFUN([AMU_CHECK_LIBTIRPC],[
+AC_CHECK_HEADER(tirpc/netconfig.h,[
+ amu_check_libtirpc_save_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -I/usr/include/tirpc"
+ AC_CHECK_LIB(tirpc,clnt_tli_create,,amu_check_libtirpc=notfound)])
+ if test "$amu_check_libtirpc" = "notfound"
+ then
+ CPPFLAGS="$amu_check_libtirpc_save_CPPFLAGS"
+ else
+ AC_DEFINE(HAVE_LIBTIRPC, 1, [Define to 1 if you have libtirpc headers installed])
+ fi
+])
+dnl ======================================================================

View file

@ -0,0 +1,60 @@
am-utils-6.2 - use new get_nfs_xprt() and put_nfs_xprt() functions
From: Ian Kent <raven@themaw.net>
The nfs_quick_reply() function needs to know the current RPC transport
outside of the NFS LOOKUP method call. It needs this to reply to the
NFS LOOKUP call that initiated the mount.
Now there are functions that avoid transport corruption if another
request comes in during the backgroud mount make nfs_quick_reply()
use them.
Signed-off-by: Ian Kent <raven@themaw.net>
---
amd/amfs_generic.c | 3 +--
amd/map.c | 2 +-
amd/nfs_subr.c | 3 ++-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/amd/amfs_generic.c b/amd/amfs_generic.c
index c352a32..86d0ab7 100644
--- a/amd/amfs_generic.c
+++ b/amd/amfs_generic.c
@@ -1129,8 +1129,7 @@ amfs_generic_mount_child(am_node *new_mp, int *error_return)
*/
if (current_transp && !new_mp->am_transp) {
dlog("Saving RPC transport for %s", new_mp->am_path);
- new_mp->am_transp = (SVCXPRT *) xmalloc(sizeof(SVCXPRT));
- *(new_mp->am_transp) = *current_transp;
+ new_mp->am_transp = get_nfs_xprt(current_transp);
}
if (error && new_mp->am_al && new_mp->am_al->al_mnt &&
(new_mp->am_al->al_mnt->mf_ops == &amfs_error_ops))
diff --git a/amd/map.c b/amd/map.c
index 0d404cf..bcb2156 100644
--- a/amd/map.c
+++ b/amd/map.c
@@ -471,7 +471,7 @@ free_map(am_node *mp)
XFREE(mp->am_name);
XFREE(mp->am_path);
XFREE(mp->am_pref);
- XFREE(mp->am_transp);
+ put_nfs_xprt(mp->am_transp);
if (mp->am_al)
free_loc(mp->am_al);
diff --git a/amd/nfs_subr.c b/amd/nfs_subr.c
index 0a43b98..07d960d 100644
--- a/amd/nfs_subr.c
+++ b/amd/nfs_subr.c
@@ -291,7 +291,8 @@ nfs_quick_reply(am_node *mp, int error)
/*
* Free up transp. It's only used for one reply.
*/
- XFREE(mp->am_transp);
+ put_nfs_xprt(mp->am_transp);
+ mp->am_transp = NULL;
dlog("Quick reply sent for %s", mp->am_al->al_mnt->mf_mount);
}
}

View file

@ -0,0 +1,214 @@
Fix various autoconf helper macros not to require support for implicit
ints and implicit function declarations in the compiler. These C
language features have been removed from C99, and future compilers
will not accept them by default.
diff --git a/m4/macros/check_fs_mntent.m4 b/m4/macros/check_fs_mntent.m4
index de3d9a918283bb1d..7800d3eff0f59e71 100644
--- a/m4/macros/check_fs_mntent.m4
+++ b/m4/macros/check_fs_mntent.m4
@@ -165,15 +165,15 @@ do
[[
#include <sys/param.h>
#include <sys/mount.h>
-main()
+int main(void)
{
int i;
struct vfsconf vf;
i = getvfsbyname("$ac_fs_tmp", &vf);
if (i < 0)
- exit(1);
+ return 1;
else
- exit(0);
+ return 0;
}
]])], [eval "ac_cv_fs_$ac_fs_name=yes"
break
diff --git a/m4/macros/check_gnu_getopt.m4 b/m4/macros/check_gnu_getopt.m4
index 6ac6440c47e8edd8..daa61cbaef3b09e9 100644
--- a/m4/macros/check_gnu_getopt.m4
+++ b/m4/macros/check_gnu_getopt.m4
@@ -17,7 +17,7 @@ int main()
int isGNU = 0;
rf = fopen("conftestresult", "w");
- if (rf == NULL) exit(1);
+ if (rf == NULL) return 1;
while ( (c = getopt(argc, argv, "x")) != -1 ) {
switch ( c ) {
@@ -25,11 +25,11 @@ int main()
isGNU=1;
break;
default:
- exit(1);
+ return 1;
}
}
fprintf(rf, isGNU ? "yes" : "no");
- exit(0);
+ return 0;
}
]])],[
ac_cv_sys_gnu_getopt="`cat conftestresult`"
diff --git a/m4/macros/check_mnttab_type.m4 b/m4/macros/check_mnttab_type.m4
index a840991e95e3ba81..398314910d80337a 100644
--- a/m4/macros/check_mnttab_type.m4
+++ b/m4/macros/check_mnttab_type.m4
@@ -121,15 +121,15 @@ do
[[
#include <sys/param.h>
#include <sys/mount.h>
-main()
+int main(void)
{
int i;
struct vfsconf vf;
i = getvfsbyname("$ac_fs_tmp", &vf);
if (i < 0)
- exit(1);
+ return 1;
else
- exit(0);
+ return 0;
}
]])], [eval "ac_cv_mnttab_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
break
diff --git a/m4/macros/check_mount_type.m4 b/m4/macros/check_mount_type.m4
index 693542219f7aee90..1b0de6ccb0b7cafd 100644
--- a/m4/macros/check_mount_type.m4
+++ b/m4/macros/check_mount_type.m4
@@ -179,15 +179,15 @@ do
[[
#include <sys/param.h>
#include <sys/mount.h>
-main()
+int main(void)
{
int i;
struct vfsconf vf;
i = getvfsbyname("$ac_fs_tmp", &vf);
if (i < 0)
- exit(1);
+ return 1;
else
- exit(0);
+ return 0;
}
]])], [eval "ac_cv_mount_type_$ac_fs_name=\\\"$ac_fs_tmp\\\""
break
diff --git a/m4/macros/check_varargs_macros.m4 b/m4/macros/check_varargs_macros.m4
index 93c26ffced82fdcc..1dbd4fb59e3d1c88 100644
--- a/m4/macros/check_varargs_macros.m4
+++ b/m4/macros/check_varargs_macros.m4
@@ -9,6 +9,7 @@ ac_cv_varargs_macros,
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
+void bar(const char *, ...);
#define foo(str,size,fmt,...) bar(__FILE__,__LINE__,(str),(size),(fmt),__VA_ARGS__)
]],
[[
@@ -20,6 +21,7 @@ foo(a, sizeof(a), "%d,%d", 1, 2);
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
+void bar(const char *, ...);
#define foo(str,size,args...) bar(__FILE__,__LINE__,(str),(size),(fmt),args)
]],
[[
diff --git a/m4/macros/expand_cpp_hex.m4 b/m4/macros/expand_cpp_hex.m4
index 13c7c832b0d764fb..7b915d0431b8f688 100644
--- a/m4/macros/expand_cpp_hex.m4
+++ b/m4/macros/expand_cpp_hex.m4
@@ -14,17 +14,16 @@ AC_RUN_IFELSE(
[AC_LANG_SOURCE(
[[
[$1]
-main(argc)
-int argc;
+int main(int argc)
{
#ifdef $2
if (argc > 1)
printf("0x%x", $2);
-exit(0);
+return 0;
#else
# error no such option $2
#endif
-exit(1);
+return 1;
}]])], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound")
,
value="notfound"
diff --git a/m4/macros/expand_cpp_int.m4 b/m4/macros/expand_cpp_int.m4
index e58649e83013265e..798e7fd7590f4ca7 100644
--- a/m4/macros/expand_cpp_int.m4
+++ b/m4/macros/expand_cpp_int.m4
@@ -16,17 +16,16 @@ AC_RUN_IFELSE(
[AC_LANG_SOURCE(
[[
[$1]
-main(argc)
-int argc;
+int main(int argc)
{
#ifdef $2
if (argc > 1)
printf("%d", $2);
-exit(0);
+return 0;
#else
# error no such option $2
#endif
-exit(1);
+return 1;
}]])], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound")
,
value="notfound"
diff --git a/m4/macros/expand_cpp_string.m4 b/m4/macros/expand_cpp_string.m4
index e014b7e4fc9d8030..256ddee09303fde4 100644
--- a/m4/macros/expand_cpp_string.m4
+++ b/m4/macros/expand_cpp_string.m4
@@ -14,17 +14,16 @@ AC_RUN_IFELSE(
[AC_LANG_SOURCE(
[[
[$1]
-main(argc)
-int argc;
+int main(int argc)
{
#ifdef $2
if (argc > 1)
printf("%s", $2);
-exit(0);
+return 0;
#else
# error no such option $2
#endif
-exit(1);
+return 1;
}]])], value=`./conftest dummy 2>>config.log`, value="notfound", value="notfound")
,
value="notfound"
diff --git a/m4/macros/expand_run_string.m4 b/m4/macros/expand_run_string.m4
index f9390020aa934c3e..c8c350f533f80a82 100644
--- a/m4/macros/expand_run_string.m4
+++ b/m4/macros/expand_run_string.m4
@@ -8,11 +8,10 @@ AC_RUN_IFELSE(
[AC_LANG_SOURCE(
[[
$1
-main(argc)
-int argc;
+int main(int argc)
{
$2
-exit(0);
+return 0;
}]])],
[
value=`./conftest dummy 2>>config.log`

39
am-utils.conf Normal file
View file

@ -0,0 +1,39 @@
#
# amd default config file
#
# check amd.conf(5) man page for details about options in this file
#
# GLOBAL OPTIONS SECTION
[ global ]
normalize_hostnames = no
print_pid = yes
pid_file = /var/run/amd.pid
restart_mounts = yes
auto_dir = /.automount
#log_file = /var/log/amd
log_file = syslog
log_options = all
#debug_options = all
plock = no
selectors_on_default = yes
print_version = no
# set map_type to "nis" for NIS maps, or comment it out to search for all
# types
map_type = file
search_path = /etc
browsable_dirs = yes
show_statfs_entries = no
fully_qualified_hosts = no
cache_duration = 300
# Fedora doesn't support NFSv2, use the amd NFSv3 server.
auto_nfs_version = 3
# The latest Fedora kernel builds disable UDP so unless a custom build
# is done the internal amd automount server must use the autofs protocol
# not the NFS protocol.
mount_type = autofs
# DEFINE AN AMD MOUNT POINT
[ /net ]
map_name = amd.net
map_type = file

133
am-utils.init Executable file
View file

@ -0,0 +1,133 @@
#!/bin/bash
#
# Version: 1.3
#
# chkconfig: - 72 28
# description: Runs the automount daemon that mounts devices and NFS hosts \
# on demand.
# processname: amd
# config: /etc/amd.conf
### BEGIN INIT INFO
# Provides: amd
# Required-Start: $local_fs
# Required-Stop: $local_fs
# Short-Description: start and stop early amd
# Description: Start and stop amd automounter
### END INIT INFO
# We require the /etc/amd.conf file, but supply it in the package, so it
# should always be there.
[ -f /etc/amd.conf ] || exit $?
# source function library.
. /etc/init.d/functions
[ -e /etc/sysconfig/amd ] && . /etc/sysconfig/amd
DAEMON=amd
prog=amd
exec=/usr/sbin/amd
config=/etc/amd.conf
optconfig=/etc/sysconfig/amd
lockfile=/var/lock/subsys/$DAEMON
[ -e $optconfig ] && . $optconfig
check() {
# Check that we're a privileged user
[ $(id -u) -eq 0 ] || exit 4
}
start () {
check
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
[ -f $optconfig ] || exit 6
echo -n $"Starting $prog: "
daemon $exec -F $config $AMDOPTS $OPTIONS $MOUNTPTS
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop () {
check
echo -n $"Stopping $prog: "
killproc $exec
delay=3
count=10
i=1
retval=1
maxcount=`expr $count + 1`
while [ $i != $maxcount ]; do
# run amq
/usr/sbin/amq > /dev/null 2>&1
if [ $? != 0 ]; then
# amq failed to run (because amd is dead)
retval=0
break
fi
sleep $delay
i=`expr $i + 1`
done
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
reload() {
restart
}
force_reload() {
restart
}
rh_status() {
status $DAEMON
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 2
esac
exit $?

5
am-utils.net.map Normal file
View file

@ -0,0 +1,5 @@
localhost type:=link;fs:=/
* host==${key};type:=link;fs:=/ \
hostd==${key};type:=link;fs:=/ \
fs:=${autodir}/${rhost}/root/${rfs};type:=host;rhost:=${key};rfs:=/;opts:=nosuid,nodev

881
am-utils.spec Normal file
View file

@ -0,0 +1,881 @@
Summary: Automount utilities including an updated version of Amd
Name: am-utils
Version: 6.2.0
%define upstream_version 6.2
Release: 62%{?dist}
# Automatically converted from old format: BSD - review is highly recommended.
License: LicenseRef-Callaway-BSD
Epoch: 5
URL: http://am-utils.org
# Git repository git://git.fsl.cs.sunysb.edu/am-utils-6.2.git
Source: ftp://ftp.am-utils.org/pub/am-utils/am-utils-%{upstream_version}.tar.gz
Source1: amd.service
Source2: am-utils.conf
Source3: am-utils.sysconf
Source4: am-utils.net.map
BuildRequires: gdbm-devel
BuildRequires: openldap-devel
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
BuildRequires: bison
BuildRequires: flex
BuildRequires: systemd-units
BuildRequires: texinfo
BuildRequires: gcc
BuildRequires: m4
BuildRequires: libtirpc-devel
BuildRequires: kernel-headers
#BuildRequires: libnsl2-devel
BuildRequires: rpcsvc-proto-devel
BuildRequires: make
Requires: rpcbind
Requires: grep
Requires: gawk
Requires: findutils
Requires: libtirpc
#Requires: libnsl2
Requires(pre): /usr/bin/grep
Requires(post): systemd-sysv
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
# Fix problems with possible future libtool rebases (#1181698)
Patch1: am-utils-6.2-dont-include-auto-generated-macros-in-aclinlude_m4.patch
Patch2: am-utils-6.2-print_nfs_common_args-is-only-needed-with-DEBUG.patch
Patch3: am-utils-6.2-uid_t-might-be-a-different-size-than-unsigned-int.patch
Patch4: am-utils-6.2-remove-set-but-not-used-variable-s.patch
Patch5: am-utils-6.2-remove-set-but-not-used-variable-again.patch
Patch6: am-utils-6.2-remove-unused-function-show_map.patch
Patch7: am-utils-6.2-remove-set-but-not-used-variable-mp_error.patch
Patch8: am-utils-6.2-32-bit-fixes.patch
Patch9: am-utils-6.2-make-sure-variables-are-initialized.patch
Patch10: am-utils-6.2-dont-use-logical-double-ampersand-when-ampersand-is-meant.patch
Patch11: am-utils-6.2-Fix-nfs-args-setting-code.patch
Patch12: am-utils-6.2-add-debug-log-trace-to-NFSv3-readdirplus.patch
Patch13: am-utils-6.2-fix-NFSv3-access-method-return-on-non-existent-mount-point.patch
Patch14: am-utils-6.2-fix-NFSv3-lookup-dir-attribute-return-value.patch
Patch15: am-utils-6.2-fix-NFSv3-readdir-post_op_dir-attributes-return.patch
Patch16: am-utils-6.2-fix-NFSv3-unlink3_or_rmdir3-post_op-attributes-return.patch
Patch17: am-utils-6.2-fix-Linux-NFS-recognition-of-umounts.patch
Patch18: am-utils-6.2-add-get_nfs_xprt-and-put_nfs_xprt-functions.patch
Patch19: am-utils-6.2-use-new-get_nfs_xprt-and-put_nfs_xprt-functions.patch
Patch20: am-utils-6.2-add-NFSv3-nfs_quick_reply-functionality.patch
Patch21: am-utils-6.2-add-NFSv3-rpc-request-validation.patch
Patch22: am-utils-6.2-fix-wcc-attr-usage-in-unlink3_or_rmdir3.patch
Patch23: am-utils-6.2-Add-the-sys-alias-for-unix-as-well-as-none-and-null.patch
Patch24: am-utils-6.2-Default-to-string-mount-options-for-NFSv4.patch
Patch25: am-utils-6.2-Improve-debugging-for-unmounting.patch
Patch26: am-utils-6.2-add-more-debugging-in-the-unmount-path.patch
Patch27: am-utils-6.2-There-is-really-no-ti-rpc-nfsv4-so-dont-send-one.patch
Patch28: am-utils-6.2-Fix-SEGV-on-amq-entries-that-print-times.patch
Patch29: am-utils-6.2-Make-hasmntval-return-an-0-on-error-1-on-success.patch
Patch30: am-utils-6.2-Update-the-ctime-of-the-directory-too-since-it-changed.patch
Patch31: am-utils-6.2-use-linux-libtirpc-if-present.patch
Patch32: am-utils-6.2-fix-compiler-assignment-warning-due-to-libtirpc.patch
Patch33: am-utils-6.2-fix-logical-not-comparison-in-get_ldap_timestamp.patch
Patch34: am-utils-6.2-fix-umount-to-mount-race.patch
Patch35: am-utils-6.2-fix-nfsv3-fh-length-in-NFS_FH_DREF.patch
Patch36: am-utils-6.2-fix-double-quote-escaping.patch
Patch37: am-utils-6.2-convert-AM_CONFIG_HEADER-to-AC_CONFIG_HEADERS.patch
Patch38: am-utils-6.2-convert-AC_HELP_STRING-to-AS_HELP_STRING.patch
Patch39: am-utils-6.2-convert-AC_TRY_COMPILE-to-AC_COMPILE_IFELSE.patch
Patch40: am-utils-6.2-convert-AC_TRY_LINK-to-AC_LINK_IFELSE.patch
Patch41: am-utils-6.2-convert-AC_TRY_RUN-to-AC_RUN_IFELSE.patch
Patch42: am-utils-6.2-update-configure_ac.patch
Patch43: am-utils-6.2-dont-prevent-building-with-autoconf-2_71.patch
Patch44: am-utils-6.2-fix-fsmount-naming-conflict.patch
Patch45: am-utils-6.2-fix-SEGV-on-quick-reply-error.patch
Patch46: am-utils-6.2-fix-mountd-version-used-when-mount-is-nfs-v4.patch
Patch47: am-utils-6.2-fix-linux-nfs-kernel-module-search.patch
Patch48: am-utils-6.2-dont-include-linux_mount_h.patch
Patch49: am-utils-6.2-fix-fedora-mock-build-fail.patch
Patch50: am-utils-configure-c99.patch
Patch51: am-utils-6.2-allow-autoconf-2.72.patch
# Not needed since autoreconf/libtool appear to do this automatically
# Leaving it set doesn't appear to be a problem so leave it set in
# case this changes.
%global _hardened_build 1
# We need to filter out some perl requirements for now.
%define _use_internal_dependency_generator 0
%define old_find_requires %{__find_requires}
# The sed munging of configure by _fix_broken_configure_for_lto
# causes a check failure so opt-out.
%global _lto_cflags %nil
%description
Am-utils includes an updated version of Amd, the popular BSD
automounter. An automounter is a program which maintains a cache
of mounted filesystems. Filesystems are mounted when they are
first referenced by the user and unmounted after a certain period of
inactivity. Amd supports a variety of filesystems, including NFS, UFS,
CD-ROMS and local drives.
You should install am-utils if you need a program for automatically
mounting and unmounting filesystems.
%prep
%setup -q -n %{name}-%{upstream_version}
%patch -P 1 -p1
%patch -P 2 -p1
%patch -P 3 -p1
%patch -P 4 -p1
%patch -P 5 -p1
%patch -P 6 -p1
%patch -P 7 -p1
%patch -P 8 -p1
%patch -P 9 -p1
%patch -P 10 -p1
%patch -P 11 -p1
%patch -P 12 -p1
%patch -P 13 -p1
%patch -P 14 -p1
%patch -P 15 -p1
%patch -P 16 -p1
%patch -P 17 -p1
%patch -P 18 -p1
%patch -P 19 -p1
%patch -P 20 -p1
%patch -P 21 -p1
%patch -P 22 -p1
%patch -P 23 -p1
%patch -P 24 -p1
%patch -P 25 -p1
%patch -P 26 -p1
%patch -P 27 -p1
%patch -P 28 -p1
%patch -P 29 -p1
%patch -P 30 -p1
%patch -P 31 -p1
%patch -P 32 -p1
%patch -P 33 -p1
%patch -P 34 -p1
%patch -P 35 -p1
%patch -P 36 -p1
%patch -P 37 -p1
%patch -P 38 -p1
%patch -P 39 -p1
%patch -P 40 -p1
%patch -P 41 -p1
%patch -P 42 -p1
%patch -P 43 -p1
%patch -P 44 -p1
%patch -P 45 -p1
%patch -P 46 -p1
%patch -P 47 -p1
%patch -P 48 -p1
%patch -P 49 -p1
%patch -P 50 -p1
%patch -P 51 -p1
./bootstrap
find_requires=%{old_find_requires}
echo "$find_requires | grep -v lostaltmail.conf" > find-requires
chmod +x find-requires
%build
%configure \
--enable-shared \
--enable-am-cflags="-DHAVE_LINUX_NFS_MOUNT_H" \
--enable-libs="-lresolv" \
--without-hesiod \
--enable-debug
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make %{?_smp_flags}
%install
%makeinstall
mkdir -p ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig
mkdir -p ${RPM_BUILD_ROOT}%{_unitdir}
install -m 644 %{SOURCE1} ${RPM_BUILD_ROOT}/%{_unitdir}/
install -m 644 %{SOURCE2} ${RPM_BUILD_ROOT}/%{_sysconfdir}/amd.conf
install -m 644 %{SOURCE3} ${RPM_BUILD_ROOT}/%{_sysconfdir}/sysconfig/amd
install -m 640 %{SOURCE4} ${RPM_BUILD_ROOT}/%{_sysconfdir}/amd.net
gzip -q9f ${RPM_BUILD_ROOT}/%{_infodir}/*info*
mkdir -p ${RPM_BUILD_ROOT}/.automount
rm -f ${RPM_BUILD_ROOT}/usr/sbin/ctl-amd
# add symlinks to shared libs
/sbin/ldconfig -n ${RPM_BUILD_ROOT}/%{_libdir}
# deprecated files
for I in %{_libdir}/libamu.a \
%{_libdir}/libamu.la \
%{_libdir}/libamu.so \
%{_infodir}/dir \
%{_sysconfdir}/amd.conf-sample \
%{_sysconfdir}/lostaltmail.conf-sample; do
rm -f $RPM_BUILD_ROOT$I
done
%define __find_requires %{_builddir}/%{name}-%{version}/find-requires
%pre
# Check if we have an old fashioned amd.conf and rename if to amd.net
if test "$1" -ne 0; then
if test -r /etc/amd.conf; then
if grep -v -q "auto_dir" /etc/amd.conf; then
if test ! -e /etc/amd.net; then
mv -f /etc/amd.conf /etc/amd.net
fi
fi
fi
fi
%post
/sbin/ldconfig
%systemd_post amd.service
%preun
%systemd_preun amd.service
%postun
%systemd_postun_with_restart amd.service
/sbin/ldconfig
%triggerun -- am-utils < 6.1.5-19
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply amd
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save amd >/dev/null 2>&1 ||:
# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del amd >/dev/null 2>&1 || :
/bin/systemctl try-restart amd.service >/dev/null 2>&1 || :
%files
%doc doc/*.ps AUTHORS BUGS ChangeLog NEWS README* scripts/*-sample
%dir /.automount
%{_bindir}/pawd
%{_sbindir}/*
%{_mandir}/man[58]/*
%{_mandir}/man1/pawd.1*
%config(noreplace) %{_sysconfdir}/amd.net
%config(noreplace) %{_sysconfdir}/amd.conf
%config(noreplace) %{_sysconfdir}/sysconfig/amd
%{_unitdir}/amd.service
%{_infodir}/*info*.gz
%{_libdir}/libamu.so*
%changelog
* Fri Jan 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-62
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-61
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-60
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Wed Aug 28 2024 Miroslav Suchý <msuchy@redhat.com> - 5:6.2.0-59
- convert license to SPDX
* Tue Jul 30 2024 Ian Kent <raven@themaw.net> - 5:6.2.0-58
- allow autoconf 2.72.
- remove BuildRequires (and Requires) libnsl2.
- also remove references to libnsl in configure invocation.
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-57
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-56
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-55
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-54
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Feb 16 2023 Florian Weimer <fweimer@redhat.com> - 5:6.2.0-53
- Port configure script to C99 (#2170414)
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-52
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Aug 15 2022 Ian Kent <raven@themaw.net> - 5:6.2.0-50
- remove BuildRequires: kernel-modules for s390x.
- add hack to ensure NFSv4 is seen as supported on s390x.
* Mon Aug 15 2022 Ian Kent <raven@themaw.net> - 5:6.2.0-50
- add BuildRequires: kernel-modules for s390x.
* Mon Aug 15 2022 Ian Kent <raven@themaw.net> - 5:6.2.0-49
- fix linux nfs kernel module search.
- dont include linux/mount.h.
* Thu Aug 04 2022 Ian Kent <raven@themaw.net> - 5:6.2.0-48
- fix fsmount naming conflict.
- fix SEGV on quick reply error.
- fix mountd version used when mount is nfs v4.
- set mount_type = autofs in default installed configuration.
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-47
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jan 19 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-46
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sat Aug 28 2021 Ian Kent <raven@themaw.net> - 5:6.2.0-45
- fix autoconf double quote escaping.
- convert autoconf AM_CONFIG_HEADER to AC_CONFIG_HEADERS.
- convert autoconf AC_HELP_STRING to AS_HELP_STRING.
- convert autoconf AC_TRY_COMPILE to AC_COMPILE_IFELSE.
- convert autoconf AC_TRY_LINK to AC_LINK_IFELSE.
- convert autoconf AC_TRY_RUN to AC_RUN_IFELSE.
- update autoconf configure.ac.
- dont prevent building with autoconf 2.71.
* Wed Jul 21 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Mar 02 2021 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 5:6.2.0-43
- Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-42
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Jul 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-41
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-40
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-39
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-38
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Apr 24 2019 Björn Esser <besser82@fedoraproject.org> - 5:6.2.0-37
- Remove hardcoded gzip suffix from GNU info pages
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-36
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Mon Oct 29 2018 Ian Kent <ikent@redhat.com> - 5:6.2.0-34
- disable hesiod support.
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Feb 06 2018 Ian Kent <ikent@redhat.com> - 5:6.2.0-33
- replace workaround for missing RPC code with package rpcsvc-proto-devel.
* Tue Feb 06 2018 Ian Kent <ikent@redhat.com> - 5:6.2.0-32
- add libnsl2 Requires and libnsl2-devel BuildRequires.
* Tue Feb 06 2018 Ian Kent <ikent@redhat.com> - 5:6.2.0-31
- try to workaround the removal of RPC code from glibc.
* Sun Feb 04 2018 Ian Kent <ikent@redhat.com> - 5:6.2.0-30
- Add "BuildRequires: kernel-headers" for linux/version.h requirement.
* Sun Feb 04 2018 Ian Kent <ikent@redhat.com> - 5:6.2.0-29
- Remove "BuildRequires: tcp_wrappers-devel" as tcp_wrappers is depricated.
* Sun Feb 04 2018 Ian Kent <ikent@redhat.com> - 5:6.2.0-28
- Update "Requires(pre)" to use /usr/bin/grep instead of /bin/grep.
* Thu Aug 24 2017 Ian Kent <ikent@redhat.com> - 5:6.2.0-27
- fix nfsv3 fh length in NFS_FH_DREF().
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-26
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Dec 1 2016 Ian Kent <ikent@redhat.com> - 5:6.2.0-23
- fix fix-umount-to-mount-race patch (bug 1399213).
* Mon Oct 3 2016 Ian Kent <ikent@redhat.com> - 5:6.2.0-22
- fix ambiguous else due to dlog() macro usage.
* Wed Sep 14 2016 Ian Kent <ikent@redhat.com> - 5:6.2.0-21
- fix typo in libtirpc configure macro.
* Wed Sep 14 2016 Ian Kent <ikent@redhat.com> - 5:6.2.0-20
- print_nfs_common_args() is only needed with DEBUG.
- uid_t might be a different size than unsigned int.
- remove set but not used variable s.
- remove set but not used variable again.
- remove unused function show_map().
- remove set but not used variable mp_error.
- 32 bit fixes.
- make sure variables are initialized.
- dont use logical double ampersand when ampersand is meant.
- Fix nfs args setting code.
- Add the sys alias for unix as well as none and null.
- Default to string mount options for NFSv4.
- Improve debugging for unmounting.
- add more debugging in the unmount path.
- There is really no ti-rpc nfsv4 so dont send one.
- Fix SEGV on amq entries that print times.
- Make hasmntval return an 0 on error 1 on success.
- Update the ctime of the directory too since it changed.
- fix compiler assignment warning due to libtirpc.
- fix logical not comparison in get_ldap_timestamp().
- fix umount to mount race.
* Wed Mar 2 2016 Ian Kent <ikent@redhat.com> - 5:6.2.0-12
- add get_nfs_xprt() and put_nfs_xprt() functions.
- use new get_nfs_xprt() and put_nfs_xprt() functions.
- add NFSv3 nfs_quick_reply() functionality.
- add NFSv3 rpc request validation.
- fix wcc attr usage in unlink3_or_rmdir3().
- use Linux libtirpc if present.
* Mon Feb 29 2016 Ian Kent <ikent@redhat.com> - 5:6.2.0-11
- fix Linux NFS recognition of umounts.
- add systemd dependency on nfs-lock.service.
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 5:6.2.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Tue Feb 2 2016 Ian Kent <ikent@redhat.com> - 5:6.2.0-9
- Update Requires: portmap to Requires: rpcbind.
* Tue Feb 2 2016 Ian Kent <ikent@redhat.com> - 5:6.2.0-8
- fix systemd unit dependencies.
* Tue Feb 2 2016 Ian Kent <ikent@redhat.com> - 5:6.2.0-7
- fix permissions on amd.service and amd.conf.
* Thu Dec 17 2015 Ian Kent <ikent@redhat.com> - 5:6.2.0-6
- fix revision 5 changelog entry.
* Thu Dec 17 2015 Ian Kent <ikent@redhat.com> - 5:6.2.0-5
- update to upstream source release 6.2.
- use starting revision 5 to ensure package will update from previous package.
- add configure option enable-debug so we can get logs of any problems with
the new amd NFS v3 service.
- remove BuildRequires: perl-Unicode-EastAsianWidth.
- move libtool macro functions from m4/macros to m4 and delete.
- add debug log trace to NFSv3 readdirplus
- fix NFSv3 access method return on non-existent mount point.
- fix NFSv3 lookup dir attribute return value.
- fix NFSv3 readdir post_op_dir attributes return.
- fix NFSv3 unlink3_or_rmdir3() post_op attributes return.
- fix mtime update on NFSv3 lookup.
* Tue Jun 16 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5:6.2.0-4.20140906gitbb13dea6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Jun 12 2015 Ian Kent <ikent@redhat.com> - 5:6.2.0-3.20140906gitbb13dea6
- add build requires for gcc and m4.
* Tue Oct 21 2014 Ian Kent <ikent@redhat.com> - 5:6.2.0-2.20140906gitbb13dea6
- fix libtool-2.4.4 build failure, bug 1181698.
* Tue Oct 21 2014 Ian Kent <ikent@redhat.com> - 5:6.2.0-1.20140906gitbb13dea6
- add perl-Unicode-EastAsianWidth to BuildRequires.
* Tue Oct 21 2014 Ian Kent <ikent@redhat.com> - 5:6.2.0-1.20140906gitbb13dea6
- Update am-utils to current git to get needed NFSv3 functionality.
* Fri Aug 15 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5:6.1.5-32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5:6.1.5-31
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Fri Mar 20 2014 Ian Kent <ikent@redhat.com> - 5:6.1.5-30
- bz1074376 - am-utils will no longer start due to missing NFSv2
- dont background autofs umount.
- check fh on umount succeeded.
- handle ENOENT umount return for autofs mounts.
- fix get_nfs_version() message.
- fix debug log deadlock.
- linux umount wait on ebusy.
- make sure to remove nodes in the proper order when going down.
- fix handle failed umount on exit.
- fix autofs proto version define.
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5:6.1.5-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Sun Apr 28 2013 Ian Kent <ikent@redhat.com> - 5:6.1.5-28
- texinfo documentation build fixes.
* Sun Apr 28 2013 Ian Kent <ikent@redhat.com> - 5:6.1.5-27
- bz955445 - am-utils package should be built with PIE flags
- use _hardened_build flag.
* Mon Feb 18 2013 Ian Kent <ikent@redhat.com> - 5:6.1.5-26
- add BuildRequires for texinfo.
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5:6.1.5-25
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Aug 22 2012 Václav Pavlín <vpavlin@redhat.com> - 5:6.1.5-24
- Scriptlets replaced with new systemd macros (#850023)
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5:6.1.5-23
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Jan 24 2012 Karel Zak <kzak@redhat.com> - 5:6.1.5-22
- fix #784235 - amd immediately exits after starting with systemd
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5:6.1.5-21
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Fri Sep 09 2011 Tom Callaway <spot@fedoraproject.org> - 5:6.1.5-20
- add missing systemd scriptlets
* Thu Sep 08 2011 Tom Callaway <spot@fedoraproject.org> - 5:6.1.5-19
- convert from sysvinit to systemd
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5:6.1.5-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Wed Oct 6 2010 Karel Zak <kzak@redhat.com> 5:6.1.5-17
- fix #602938 - am-utils fails on f13 with amfs_toplvl_mount
- fix #640383 - am-utils doesn't work in Fedora 13
* Mon Mar 1 2010 Karel Zak <kzak@redhat.com> 5:6.1.5-16
- fix #566711 - am-utils: incorrect use of tcp_wrapper
* Wed Feb 24 2010 Karel Zak <kzak@redhat.com> 5:6.1.5-15
- fix #523221 - initscript collected problems LSB-compilant
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5:6.1.5-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5:6.1.5-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Tue Dec 2 2008 Karel Zak <kzak@redhat.com> 5:6.1.5-12
- fix #450754 - Amd does not work with 2.6.25 (thanks to Philippe Troin)
* Thu May 29 2008 Karel Zak <kzak@redhat.com> 5:6.1.5-11
- review & cleanup init script
* Thu May 29 2008 Karel Zak <kzak@redhat.com> 5:6.1.5-10
- fix #435420 - CVE-2008-1078 am-utils: insecure usage of temporary files
* Tue May 20 2008 Karel Zak <kzak@redhat.com> 5:6.1.5-9
- spec file cleanup according to rpmlint
- fix autotools stuff
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 5:6.1.5-8
- Autorebuild for GCC 4.3
* Wed Dec 05 2007 Release Engineering <rel-eng at fedoraproject dot org> - 6.1.5-7
- Rebuild for deps
* Tue Mar 13 2007 Karel Zak <kzak@redhat.com> 5:6.1.5-6
- fix #223675 - am-utils: non-failsafe install-info
- fix #231843 - missing build dependency on tcp_wrappers
- cleanup spec file
* Mon Dec 18 2006 Karel Zak <kzak@redhat.com> 5:6.1.5-5
- fix #219437 - amd: stopping service will pop up an error dialog in
system-config-services app.
- fix build (m4 stuff) of the package (UTS_RELEASE macro has been removed
from the latest kernel-headers)
* Tue Aug 24 2006 Karel Zak <kzak@redhat.com> 5:6.1.5-4
- fix #203193 - tmpfile usage
- fix #202180 - amd service doesn't work
* Wed Jul 12 2006 Jesse Keating <jkeating@redhat.com> - 5:6.1.5-3
- rebuild
- Add missing br flex
* Thu Jun 01 2006 Peter Vrabec <pvrabec@redhat.com> 5:6.1.5-2
- force to use HAVE_LINUX_NFS_MOUNT_H macro, because linux/nfs_mount.h
check in configure fails on s390x
* Mon May 29 2006 Peter Vrabec <pvrabec@redhat.com> 5:6.1.5-1
- upgrade
- add build depency
* Fri Feb 10 2006 Jesse Keating <jkeating@redhat.com> - 5:6.1.3-1.2.1
- bump again for double-long bug on ppc(64)
* Tue Feb 07 2006 Jesse Keating <jkeating@redhat.com> - 5:6.1.3-1.2
- rebuilt for new gcc4.1 snapshot and glibc changes
* Fri Dec 09 2005 Jesse Keating <jkeating@redhat.com>
- rebuilt
* Fri Oct 20 2005 Peter Vrabec <pvrabec@redhat.com> 6.1.3-1
- upgrade
* Wed Oct 04 2005 Peter Vrabec <pvrabec@redhat.com> 6.1.2.1-1
- upgrade
- fix amd shutdown(#158268,#54246)
- enhancement, /host/localhost and /host/<localmachinename>
are symlinks to / (#11843)
* Thu Aug 25 2005 Peter Vrabec <pvrabec@redhat.com> 6.1.1-2
- use generic linux/nfs_mount.h check
* Fri Aug 19 2005 Peter Vrabec <pvrabec@redhat.com> 6.1.1-1
- upgrade 6.1.1
* Wed Aug 17 2005 Peter Vrabec <pvrabec@redhat.com> 6.0.9-13
- fix the regression introduced with (#143118) fix
* Thu Mar 24 2005 Peter Vrabec <pvrabec@redhat.com> 6.0.9-12
- fix the am-utils part of #143118 by implementing the util-linux
mtab locking scheme into am-utils automounter, patch and testing
by Daniel Berrange <berrange@redhat.com>, improved locking
algorithm by <prockai@redhat.com> (which allows for several
hundred or even thousand of parallel makes to finish
successfully and keep /etc/mtab in sync with /proc/mounts as well)
* Thu Mar 17 2005 Peter Vrabec <pvrabec@redhat.com>
- rebuild by gcc4
* Tue Oct 12 2004 Adrian Havill <havill@redhat.com> 6.0.9-10
- cleanup %%pre script so amd.conf won't get stat()ed if it doesn't
exist (#126656)
* Wed Sep 1 2004 Nalin Dahyabhai <nalin@redhat.com> 6.0.9-9
- really fix %%preun this time
* Tue Aug 31 2004 Nalin Dahyabhai <nalin@redhat.com> 6.0.9-8
- rebuild
* Tue Jun 15 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Mon Mar 15 2004 Nalin Dahyabhai <nalin@redhat.com>
- fix incorrect invocation of test in %%pre and %%preun
* Tue Mar 02 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Fri Feb 13 2004 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Tue Nov 11 2003 Nalin Dahyabhai <nalin@redhat.com> 6.0.9-5
- change permissions on /etc/sysconfig/amd from 0755 to 0644 (#109681)
* Tue Aug 5 2003 Elliot Lee <sopwith@redhat.com> 6.0.9-4
- Fix libtool
* Wed Jun 04 2003 Elliot Lee <sopwith@redhat.com>
- rebuilt
* Tue Feb 04 2003 Florian La Roche <Florian.LaRoche@redhat.de>
- add symlink to shared lib
* Fri Jan 31 2003 Nalin Dahyabhai <nalin@redhat.com> 6.0.9-1
- update to 6.0.9
- disable RPM's internal dependency calculation so that we can filter out
dependencies which are expected to be filled in by the site administrator
* Wed Jan 22 2003 Tim Powers <timp@redhat.com>
- rebuilt
* Tue Jan 7 2003 Nalin Dahyabhai <nalin@redhat.com> 6.0.8-3
- rebuild
* Wed Oct 30 2002 Nalin Dahyabhai <nalin@redhat.com> 6.0.8-1
- update to 6.0.8
* Tue Aug 27 2002 Nalin Dahyabhai <nalin@redhat.com> 6.0.7-9
- rebuild
* Fri Jun 21 2002 Tim Powers <timp@redhat.com>
- automated rebuild
* Wed May 29 2002 Nalin Dahyabhai <nalin@redhat.com> 6.0.7-7
- adjust the perl reqs so that the lostaltmail config files aren't required
by RPM
* Sun May 26 2002 Tim Powers <timp@redhat.com>
- automated rebuild
* Thu May 9 2002 Nalin Dahyabhai <nalin@redhat.com> 6.0.7-5
- rebuild in new environment
* Fri Feb 22 2002 Nalin Dahyabhai <nalin@redhat.com> 6.0.7-4
- rebuild in new environment
* Sat Jan 26 2002 Jeff Johnson <jbj@redhat.com>
- add Provides: to white out certain perl Requires:
* Wed Jan 23 2002 Nalin Dahyabhai <nalin@redhat.com> 6.0.7-2
- rebuild in new environment
- require gdbm-devel at build-time instead of db1-devel
* Thu Sep 6 2001 Nalin Dahyabhai <nalin@redhat.com> 6.0.7-1
- update to 6.0.7, fixing EIO on access bugs (#53251)
- back out nfs3 patch; no longer needed for current kernels
- don't explicitly strip binaries; let the buildroot policies handle it
* Wed Jul 18 2001 Nalin Dahyabhai <nalin@redhat.com>
- rebuild
* Mon Jun 25 2001 Nalin Dahyabhai <nalin@redhat.com>
- add BuildPrereq: db1-devel (#44987)
- use FHS macros
- return error codes correctly from init script (#44597)
* Tue May 22 2001 Nalin Dahyabhai <nalin@redhat.com>
- update to 6.0.6
* Sat Apr 7 2001 Nalin Dahyabhai <nalin@redhat.com>
- update to 6.0.5
- remove /net from the default MOUNTPTS
* Tue Mar 13 2001 Nalin Dahyabhai <nalin@redhat.com>
- use MOUNTPTS when starting
* Fri Mar 2 2001 Nalin Dahyabhai <nalin@redhat.com>
- rebuild in new environment
* Wed Feb 14 2001 Nalin Dahyabhai <nalin@redhat.com>
- redo i18n for the init script (#24082)
* Tue Jan 23 2001 Nalin Dahyabhai <nalin@redhat.com>
- re-do workaround from advice from the am-utils maintainers
- redo i18n for the init script
* Sat Jan 20 2001 Nalin Dahyabhai <nalin@redhat.com>
- work around clash with nfs3_fh definition in 2.4
* Tue Jan 16 2001 Nalin Dahyabhai <nalin@redhat.com>
- gettextize the init script (#24087)
* Tue Dec 19 2000 Nalin Dahyabhai <nalin@redhat.com>
- add ldconfig to %%postun
- chuck the hesiod patch -- new bind-utils doesn't have the support for it
* Fri Sep 8 2000 Nalin Dahyabhai <nalin@redhat.com>
- rebuild in new environment
* Sat Jul 15 2000 Bill Nottingham <notting@redhat.com>
- move initscript back
* Wed Jul 12 2000 Prospector <bugzilla@redhat.com>
- automatic rebuild
* Thu Jul 6 2000 Nalin Dahyabhai <nalin@redhat.com>
- only create /var/lock/subsys/amd if startup succeeds
- revamp shutdown procedure to minimize time spent just spinning
- change initscripts dependency to /etc/init.d
* Tue Jul 4 2000 Florian La Roche <Florian.LaRoche@redhat.com>
- delete noreplace from initscript
* Wed Jun 28 2000 Nalin Dahyabhai <nalin@redhat.com>
- fix postun script
- add requires: initscripts
* Tue Jun 27 2000 Nalin Dahyabhai <nalin@redhat.com>
- remove unnecessary libamu.so symlink
* Mon Jun 26 2000 Nalin Dahyabhai <nalin@redhat.com>
- move init script to /etc/init.d
- add URL: tag
* Wed Jun 21 2000 Preston Brown <pbrown@redhat.com>
- noreplace config files
- gracefully stop/restart service
* Fri Jun 16 2000 Matt Wilson <msw@redhat.com>
- FHS paths
- 6.0.4 snapshot (as it builds against kernel 2.4 headers)
* Wed Feb 16 2000 Cristian Gafton <gafton@redhat.com>
- version 6.0.3
- enhance init script to be more wait4amd2die-like
- make default map type to be file (#9185)
- get rid of the kludges
* Thu Feb 03 2000 Cristian Gafton <gafton@redhat.com>
- man pages are compressed
- version 6.0.2
- fix descriptions
* Mon Sep 13 1999 Cristian Gafton <gafton@redhat.com>
- version 6.0.1 final
* Tue Aug 24 1999 Cristian Gafton <gafton@redhat.com>
- remove the noldap patch
- add amd.net file as the default config map file
- change the config file to teh new config file format instead of a
simple map file name.
- try to avoid some damage with a new %%pre script
- prereq grep now
- modify the init file so it calls amd -F /etc/amd.conf now
* Tue Aug 24 1999 Bill Nottingham <notting@redhat.com>
- update to 6.0.1s11
* Fri Jun 19 1999 Bill Nottingham <notting@redhat.com>
- don't run by default
* Mon May 31 1999 Kenneth Skaar <kenneths@regina.uio.no>
- Fixed amd -F core dump and related dumps by other programs
* Thu Apr 08 1999 Preston Brown <pbrown@redhat.com>
- kill -HUP on reload, restart does a real restart.
* Fri Mar 26 1999 Bill Nottingham <notting@redhat.com>
- twiddle an echo in initscript
* Tue Mar 23 1999 Cristian Gafton <gafton@redhat.com>
- version 6.0 proper
- Serial:1 because to enforce versioning
* Sun Mar 21 1999 Cristian Gafton <gafton@redhat.com>
- auto rebuild in the new build environment (release 6)
* Wed Jan 06 1999 Cristian Gafton <gafton@redhat.com>
- rebuild for glibc 2.1
- strip all binaries
* Thu Aug 13 1998 Jeff Johnson <jbj@redhat.com>
- add missing ':' to default 'opts:=nosuid,nodev'
- install info pages
* Mon Jul 13 1998 Cristian Gafton <gafton@redhat.com>
- added the NIS support that the broken configure script failed to detect
* Tue May 05 1998 Cristian Gafton <gafton@redhat.com>
- disabled autofs support on alpha
- run ldconfig in postinstall
* Mon May 04 1998 Cristian Gafton <gafton@redhat.com>
- new package to replace the old and unmaintained amd

3
am-utils.sysconf Normal file
View file

@ -0,0 +1,3 @@
#MOUNTPTS='/net /etc/amd.net'
ADIR=/.automount
AMDOPTS=

12
amd.service Normal file
View file

@ -0,0 +1,12 @@
[Unit]
Description=automount daemon that mounts devices and NFS hosts on demand
After=syslog.target network.target network-online.target rpcbind.service
Wants=network-online.target rpcbind.service nfs-lock.service
[Service]
EnvironmentFile=-/etc/sysconfig/amd
Type=forking
ExecStart=/usr/sbin/amd -F /etc/amd.conf $AMDOPTS $OPTIONS $MOUNTPTS
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1 @@
4b2ada9cadd24f8a231601274d6fb036 am-utils-6.2.tar.gz