summaryrefslogtreecommitdiffstats
path: root/usr.sbin/amd
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1995-08-24 10:22:25 +0000
committerdfr <dfr@FreeBSD.org>1995-08-24 10:22:25 +0000
commitc5cbc782d337dffb51162e0e9255b7c5eb742bee (patch)
tree1396325f5c6c062ec9baa086b28777d1297a7535 /usr.sbin/amd
parent8bffcb6d1a3b548b22b61ebb466088117f22dbd4 (diff)
downloadFreeBSD-src-c5cbc782d337dffb51162e0e9255b7c5eb742bee.zip
FreeBSD-src-c5cbc782d337dffb51162e0e9255b7c5eb742bee.tar.gz
Add code to work around FreeBSD's nfs symlink cache.
Obtained from: amd-upl102
Diffstat (limited to 'usr.sbin/amd')
-rw-r--r--usr.sbin/amd/amd/amd.c3
-rw-r--r--usr.sbin/amd/amd/nfs_subr.c12
-rw-r--r--usr.sbin/amd/config/Makefile.config9
3 files changed, 20 insertions, 4 deletions
diff --git a/usr.sbin/amd/amd/amd.c b/usr.sbin/amd/amd/amd.c
index c3b2b61..4a565b5 100644
--- a/usr.sbin/amd/amd/amd.c
+++ b/usr.sbin/amd/amd/amd.c
@@ -37,7 +37,7 @@
*
* @(#)amd.c 8.1 (Berkeley) 6/6/93
*
- * $Id: amd.c,v 5.2.2.1 1992/02/09 15:08:15 jsp beta $
+ * $Id: amd.c,v 1.1.1.1 1994/05/26 05:22:00 rgrimes Exp $
*
*/
@@ -335,6 +335,7 @@ char *argv[];
/*
* Register automounter with system
*/
+
error = mount_automounter(ppid);
if (error && ppid)
kill(SIGALRM, ppid);
diff --git a/usr.sbin/amd/amd/nfs_subr.c b/usr.sbin/amd/amd/nfs_subr.c
index def2db1..e79f668 100644
--- a/usr.sbin/amd/amd/nfs_subr.c
+++ b/usr.sbin/amd/amd/nfs_subr.c
@@ -37,7 +37,7 @@
*
* @(#)nfs_subr.c 8.1 (Berkeley) 6/6/93
*
- * $Id: nfs_subr.c,v 1.1.1.1 1994/05/26 05:22:00 rgrimes Exp $
+ * $Id: nfs_subr.c,v 1.2 1995/05/30 03:45:54 rgrimes Exp $
*
*/
@@ -143,6 +143,16 @@ getattr_retry:
mp->am_stats.s_getattr++;
return attrp;
}
+#if defined(HAVE_SYMLINK_CACHE) && !defined(NFSMNT_SYMTTL)
+ /*
+ * This code is needed to defeat Solaris 2.4's symlink values
+ * cache. It is not needed if the O/S has an nfs flag to
+ * turn off the symlink-cache at mount time (such as Irix
+ * 5.2 and 5.3). -Erez.
+ */
+ if (++res.attrstat_u.attributes.mtime.useconds == 0)
+ ++res.attrstat_u.attributes.mtime.seconds;
+#endif /* HAVE_SYMLINK_CACHE && !NFSMNT_SYMTTL */
return &res;
}
diff --git a/usr.sbin/amd/config/Makefile.config b/usr.sbin/amd/config/Makefile.config
index 0c4d7be..596299b 100644
--- a/usr.sbin/amd/config/Makefile.config
+++ b/usr.sbin/amd/config/Makefile.config
@@ -1,6 +1,6 @@
# @(#)Makefile.config 8.1 (Berkeley) 6/6/93
#
-# $Id: Makefile.config,v 5.2.2.1 1992/02/09 15:11:17 jsp beta $
+# $Id: Makefile.config,v 1.1.1.1 1994/05/26 05:22:06 rgrimes Exp $
#
#
@@ -83,9 +83,14 @@ HAS_REGEXP = -DHAS_REGEXP
#
#HAS_NFS_QUALIFIED_NAMES = -DHAS_NFS_QUALIFIED_NAMES
+#
+# Caches the contents of symlinks
+#
+HAS_SYMLINK_CACHE = -DHAS_SYMLINK_CACHE
+
##############################################################
# Do NOT edit the following lines
#
CONFIG = ${XINCLUDE} ${HAS_NIS_MAPS} ${HAS_FILE_MAPS} ${HAS_HESIOD_MAPS} \
${HAS_NDBM_MAPS} ${HAS_MOUNTD_MAPS} ${HAS_PASSWD_MAPS} ${HAS_UNION_MAPS} \
- ${HAS_REGEXP} ${HAS_NFS_QUALIFIED_NAMES}
+ ${HAS_REGEXP} ${HAS_NFS_QUALIFIED_NAMES} ${HAS_SYMLINK_CACHE}
OpenPOWER on IntegriCloud