Add code to work around FreeBSD's nfs symlink cache.

Obtained from: amd-upl102
This commit is contained in:
dfr 1995-08-24 10:22:25 +00:00
parent 8bffcb6d1a
commit c5cbc782d3
3 changed files with 20 additions and 4 deletions

View File

@ -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);

View File

@ -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 @@ struct svc_req *rqstp;
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;
}

View File

@ -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}