Mercurial > illumos > illumos-gate
changeset 12892:748d813f4210
6916057 automountd dumps core when webnfs URL map entry is used and trace is enabled
author | Nagakiran Rajashekar <Nagakiran.Rajashekar@Sun.COM> |
---|---|
date | Tue, 20 Jul 2010 23:57:22 -0700 |
parents | e1300b71224c |
children | c53827a598ac |
files | usr/src/cmd/fs.d/autofs/autod_nfs.c |
diffstat | 1 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/cmd/fs.d/autofs/autod_nfs.c Wed Jul 21 13:20:21 2010 +0800 +++ b/usr/src/cmd/fs.d/autofs/autod_nfs.c Tue Jul 20 23:57:22 2010 -0700 @@ -19,8 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2009 Sun Microsystems, Inc. All rights reserved. - * Use is subject to license terms. + * Copyright (c) 1992, 2010, Oracle and/or its affiliates. All rights reserved. */ #include <stdio.h> @@ -232,6 +231,7 @@ int err = -1; int cached; action_list *alp; + char *dir; alp = *alpp; @@ -272,12 +272,15 @@ } if (err) { cached = strcmp(me->map_mounter, MNTTYPE_CACHEFS) == 0; + dir = strdup(mfs->mfs_dir); err = nfsmount(mfs, mntpnt, me->map_mntopts, cached, overlay, uid, alp); if (err && trace > 1) { - trace_prt(1, " Couldn't mount %s:%s, err=%d\n", - mfs->mfs_host, mfs->mfs_dir, err); + trace_prt(1, " Couldn't mount %s:%s, err=%d\n", + mfs->mfs_host ? mfs->mfs_host : "", + mfs->mfs_dir ? mfs->mfs_dir : dir, err); } + free(dir); } free_mfs(mfs); return (err);