diff options
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")) { |