diff options
author | mbr <mbr@FreeBSD.org> | 2004-07-06 12:55:44 +0000 |
---|---|---|
committer | mbr <mbr@FreeBSD.org> | 2004-07-06 12:55:44 +0000 |
commit | 60473f926a419fb6363f402fa2a5a8a946028cea (patch) | |
tree | 6c351e8581e50d68b076a1f359b7a6d1ac2b5cb9 /contrib/amd/amd/conf.c | |
parent | 3f1ec286a5e001f950345fd6e135084d09764c76 (diff) | |
download | FreeBSD-src-60473f926a419fb6363f402fa2a5a8a946028cea.zip FreeBSD-src-60473f926a419fb6363f402fa2a5a8a946028cea.tar.gz |
Virgin import of AMD (am-utils) v6.0.10p1
Diffstat (limited to 'contrib/amd/amd/conf.c')
-rw-r--r-- | contrib/amd/amd/conf.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/contrib/amd/amd/conf.c b/contrib/amd/amd/conf.c index 3b1d35c..90bbdda 100644 --- a/contrib/amd/amd/conf.c +++ b/contrib/amd/amd/conf.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997-2003 Erez Zadok + * Copyright (c) 1997-2004 Erez Zadok * Copyright (c) 1990 Jan-Simon Pendry * Copyright (c) 1990 Imperial College of Science, Technology & Medicine * Copyright (c) 1990 The Regents of the University of California. @@ -38,7 +38,7 @@ * * %W% (Berkeley) %G% * - * $Id: conf.c,v 1.7.2.6 2002/12/27 22:44:34 ezk Exp $ + * $Id: conf.c,v 1.7.2.8 2004/01/21 04:04:58 ib42 Exp $ * */ @@ -98,6 +98,7 @@ static int gopt_map_type(const char *val); static int gopt_mount_type(const char *val); static int gopt_pid_file(const char *val); static int gopt_portmap_program(const char *val); +static int gopt_nfs_allow_insecure_port(const char *val); static int gopt_nfs_proto(const char *val); static int gopt_nfs_retransmit_counter(const char *val); static int gopt_nfs_retry_interval(const char *val); @@ -156,6 +157,7 @@ static struct _func_map glob_functable[] = { {"mount_type", gopt_mount_type}, {"pid_file", gopt_pid_file}, {"portmap_program", gopt_portmap_program}, + {"nfs_allow_insecure_port", gopt_nfs_allow_insecure_port}, {"nfs_proto", gopt_nfs_proto}, {"nfs_retransmit_counter", gopt_nfs_retransmit_counter}, {"nfs_retry_interval", gopt_nfs_retry_interval}, @@ -600,6 +602,22 @@ gopt_portmap_program(const char *val) static int +gopt_nfs_allow_insecure_port(const char *val) +{ + if (STREQ(val, "yes")) { + gopt.flags |= CFM_NFS_INSECURE_PORT; + return 0; + } else if (STREQ(val, "no")) { + gopt.flags &= ~CFM_NFS_INSECURE_PORT; + return 0; + } + + fprintf(stderr, "conf: unknown value to nfs_allow_insecure_port \"%s\"\n", val); + return 1; /* unknown value */ +} + + +static int gopt_nfs_proto(const char *val) { if (STREQ(val, "udp") || STREQ(val, "tcp")) { |