SCCS-vsn: sbin/umount/umount.c 8.6
SCCS-vsn: sbin/umount/umount.c 8.6
#endif /* not lint */
#ifndef lint
#endif /* not lint */
#ifndef lint
-static char sccsid[] = "@(#)umount.c 8.5 (Berkeley) %G%";
+static char sccsid[] = "@(#)umount.c 8.6 (Berkeley) %G%";
#endif /* not lint */
#include <sys/param.h>
#endif /* not lint */
#include <sys/param.h>
if (!selected(type))
return (1);
if (!selected(type))
return (1);
- if ((delimp = strchr(name, '@')) != NULL) {
- hostp = delimp + 1;
- *delimp = '\0';
- hp = gethostbyname(hostp);
- *delimp = '@';
- } else if ((delimp = strchr(name, ':')) != NULL) {
- *delimp = '\0';
- hostp = name;
- hp = gethostbyname(hostp);
- name = delimp + 1;
- *delimp = ':';
- } else
- hp = NULL;
+ hp = NULL;
+ if (type == MOUNT_NFS) {
+ if ((delimp = strchr(name, '@')) != NULL) {
+ hostp = delimp + 1;
+ *delimp = '\0';
+ hp = gethostbyname(hostp);
+ *delimp = '@';
+ } else if ((delimp = strchr(name, ':')) != NULL) {
+ *delimp = '\0';
+ hostp = name;
+ hp = gethostbyname(hostp);
+ name = delimp + 1;
+ *delimp = ':';
+ }
+ }
+
if (!namematch(hp))
return (1);
if (!namematch(hp))
return (1);