Steve Dickson | 1 Aug 2009 13:35
Picon
Favicon

Re: [PATCH 07/11] nfs-utils: convert nfssvc_setfds to use getaddrinfo

On 06/08/2009 02:00 PM, Jeff Layton wrote:
>  static void
>  nfssvc_versbits(unsigned int ctlbits, int minorvers4)
>  {
>  <at>  <at>  -180,8 +246,11  <at>  <at>  nfssvc(int port, int nrservs, unsigned int versbits, int minorvers4,
>  	 * the ports get registered with portmap against correct
>  	 * versions
>  	 */
> -	nfssvc_versbits(versbits, minorvers4);
> -	nfssvc_setfds(port, protobits, haddr);
> +	if (!nfssvc_inuse()) {
> +		nfssvc_versbits(versbits, minorvers4);
> +		snprintf(buf, sizeof(buf), "%d", port);
> +		nfssvc_set_sockets(AF_INET, protobits, haddr, portstr);
portstr is not defined here.... and as far as I can tell its not
defined in any of the next 3 patches either... 

What am I missing or it is missing?

steved.

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Jeff Layton | 1 Aug 2009 14:45
Picon
Favicon

Re: [PATCH 07/11] nfs-utils: convert nfssvc_setfds to use getaddrinfo

On Sat, 01 Aug 2009 07:35:50 -0400
Steve Dickson <SteveD@...> wrote:

> On 06/08/2009 02:00 PM, Jeff Layton wrote:
> >  static void
> >  nfssvc_versbits(unsigned int ctlbits, int minorvers4)
> >  {
> >  <at>  <at>  -180,8 +246,11  <at>  <at>  nfssvc(int port, int nrservs, unsigned int versbits, int minorvers4,
> >  	 * the ports get registered with portmap against correct
> >  	 * versions
> >  	 */
> > -	nfssvc_versbits(versbits, minorvers4);
> > -	nfssvc_setfds(port, protobits, haddr);
> > +	if (!nfssvc_inuse()) {
> > +		nfssvc_versbits(versbits, minorvers4);
> > +		snprintf(buf, sizeof(buf), "%d", port);
> > +		nfssvc_set_sockets(AF_INET, protobits, haddr, portstr);
> portstr is not defined here.... and as far as I can tell its not
> defined in any of the next 3 patches either... 
> 
> What am I missing or it is missing?
> 
> steved.
> 

You're right. That's a spot that I missed when I converted that code to
use the static buffer instead of allocating a memory all over the
place. That "portstr" should be "buf" instead.

The good news is that a later patch removes that entire if statement.
(Continue reading)

Steve Dickson | 1 Aug 2009 15:08
Picon
Favicon

Re: [PATCH 07/11] nfs-utils: convert nfssvc_setfds to use getaddrinfo


On 08/01/2009 08:45 AM, Jeff Layton wrote:
> On Sat, 01 Aug 2009 07:35:50 -0400
> Steve Dickson <SteveD@...> wrote:
> 
>> On 06/08/2009 02:00 PM, Jeff Layton wrote:
>>>  static void
>>>  nfssvc_versbits(unsigned int ctlbits, int minorvers4)
>>>  {
>>>  <at>  <at>  -180,8 +246,11  <at>  <at>  nfssvc(int port, int nrservs, unsigned int versbits, int minorvers4,
>>>  	 * the ports get registered with portmap against correct
>>>  	 * versions
>>>  	 */
>>> -	nfssvc_versbits(versbits, minorvers4);
>>> -	nfssvc_setfds(port, protobits, haddr);
>>> +	if (!nfssvc_inuse()) {
>>> +		nfssvc_versbits(versbits, minorvers4);
>>> +		snprintf(buf, sizeof(buf), "%d", port);
>>> +		nfssvc_set_sockets(AF_INET, protobits, haddr, portstr);
>> portstr is not defined here.... and as far as I can tell its not
>> defined in any of the next 3 patches either... 
>>
>> What am I missing or it is missing?
>>
>> steved.
>>
> 
> You're right. That's a spot that I missed when I converted that code to
> use the static buffer instead of allocating a memory all over the
> place. That "portstr" should be "buf" instead.
(Continue reading)

Frans Pop | 2 Aug 2009 00:10
Picon

Re: nfs: __setup_str_nfs_root_setup causes a section type conflict

On Friday 31 July 2009, Frans Pop wrote:
> While compiling v2.6.31-rc4-294-gf5886c7 for parisc (64-bits) I ran
> into the following compilation error:
>
> /home/fjp/projects/kernel/linux-2.6/fs/nfs/nfsroot.c:403:
>     error: __setup_str_nfs_root_setup causes a section type conflict
> make[7]: *** [fs/nfs/nfsroot.o] Error 1

Helge Deller alerted me to the fact that the config I sent did not have 
CONFIG_ROOT_NFS set. I must have sent the config I used after disabling 
NFS because of the error :-/

But I can still reproduce the error with .31-rc5 and the attached config.

#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.31-rc5
# Sun Aug  2 00:04:27 2009
#
CONFIG_PARISC=y
CONFIG_MMU=y
CONFIG_STACK_GROWSUP=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_ARCH_HAS_ILOG2_U32 is not set
# CONFIG_ARCH_HAS_ILOG2_U64 is not set
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
(Continue reading)

Chuck Lever | 3 Aug 2009 15:11
Picon
Favicon

Re: Bug in server's export -- List of security flavors

On Jul 16, 2009, at 3:25 PM, Tom Haynes wrote:
> J. Bruce Fields wrote:
>> I don't see how it could be a problem for the client to try an
>> unadvertised flavor.  The server has to enforce the choice of flavor
>> anyway.
>
> Yes, the server needs to enforce it, but why is the client trying a  
> flavor that the server
> says it does not support?

If this mount request is generated by the kernel (kernels after 2.6.23  
or so) and not by the mount command, the kernel's mount client does  
not have support for reading the authlist returned by the server.  I  
sent patches to Trond for 2.6.32 to address this.

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@...
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Steve Dickson | 3 Aug 2009 16:49
Picon
Favicon

[Patch 0/8] NFS Mount Configuration File (Vers 2)

Hello,

This is an updated version of the mount configuration patches
I sent out a few months ago... The main difference in these
patches is this functionality is only enabled by a 
configuration flag (see patch 4/8 for details). 

I have been convinced that its probably best to leave it up to 
the individual users or distros to decide if they want a
system-wide mount configuration file and where the file should live. 

The following patch set introduces a configuration file where 
mount options can be define. The options in the file can be 
applied globally or per server or per mount point. 

The patch set reuses the configuration parsing code that
idmapd uses. I did added a couple enhancements like ignoring
blanks in certain definitions as well as at the beginning of 
assignment statements.

There are man pages include in the patch set but in a
nut shell, the configuration file has three basic types
of sections. A global section, server section and mount point
section. There can only be one global section and multiple 
server and mount point sections.

The mount command prioritize these sections in the following
way:
     * Options on the command line are always used.

(Continue reading)

Steve Dickson | 3 Aug 2009 16:51
Picon
Favicon

[Patch 1/8] NFS Mount Configuration File (Vers 2)

commit 6ac5162f456950052d2ae59f8d375ceee694d432
Author: Steve Dickson <steved <at> redhat.com>
Date:   Sun Aug 2 12:26:52 2009 -0400

    Move idmapd's configuration file parsing routines into
    the shared libnfs.a library, making them available to\
    other daemons and programs.

    Signed-off-by: Steve Dickson <steved <at> redhat.com>

diff --git a/support/include/Makefile.am b/support/include/Makefile.am
index 718abda..f5a77ec 100644
--- a/support/include/Makefile.am
+++ b/support/include/Makefile.am
 <at>  <at>  -14,6 +14,7  <at>  <at>  noinst_HEADERS = \
 	xio.h \
 	xlog.h \
 	xmalloc.h \
-	xcommon.h
+	xcommon.h \
+	conffile.h

 MAINTAINERCLEANFILES = Makefile.in
diff --git a/support/include/conffile.h b/support/include/conffile.h
new file mode 100644
index 0000000..3309788
--- /dev/null
+++ b/support/include/conffile.h
 <at>  <at>  -0,0 +1,67  <at>  <at> 
+/* $OpenBSD: conf.h,v 1.30 2004/06/25 20:25:34 hshoexer Exp $	 */
(Continue reading)

Steve Dickson | 3 Aug 2009 16:52
Picon
Favicon

[Patch 2/8] NFS Mount Configuration File (Vers 2)

commit 0fd0fe271ae99ed0f863f4c9e846bf793a616468
Author: Steve Dickson <steved <at> redhat.com>
Date:   Mon Mar 9 13:55:25 2009 -0400

    Taught conf_parse_line() to ignore spaces in the
     '[section]' parsing and before the assignment statements

    Signed-off-by: Steve Dickson <steved <at> redhat.com>

diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c
index eea888e..b36200b 100644
--- a/support/nfs/conffile.c
+++ b/support/nfs/conffile.c
 <at>  <at>  -50,11 +50,6  <at>  <at> 
 #include "xlog.h"

 static void conf_load_defaults (int);
-#if 0
-static int conf_find_trans_xf (int, char *);
-#endif
-
-size_t  strlcpy(char *, const char *, size_t);

 struct conf_trans {
 	TAILQ_ENTRY (conf_trans) link;
 <at>  <at>  -219,26 +214,48  <at>  <at>  conf_parse_line(int trans, char *line, size_t sz)
 	if (*line == '#' || *line == ';')
 		return;

+	/* Ignore blank lines */
(Continue reading)

Steve Dickson | 3 Aug 2009 16:53
Picon
Favicon

[Patch 3/8] NFS Mount Configuration File (Vers 2)

commit 528e270be6bb3e4a072cbbb7f3a8b378b64b7fba
Author: Steve Dickson <steved <at> redhat.com>
Date:   Mon Mar 9 13:57:10 2009 -0400

    Store values in lower case. This makes it easier to do string
    comparisons when reading lists from the configuration file.

    Signed-off-by: Steve Dickson <steved <at> redhat.com>

diff --git a/support/nfs/conffile.c b/support/nfs/conffile.c
index b36200b..f5e0f79 100644
--- a/support/nfs/conffile.c
+++ b/support/nfs/conffile.c
 <at>  <at>  -114,7 +114,16  <at>  <at>  conf_hash(char *s)
 	}
 	return hash;
 }
+/*
+ * Convert letter from upper case to lower case
+ */
+static inline upper2lower(char *str)
+{
+	char *ptr = str;

+	while (*ptr) 
+		*ptr++ = tolower(*ptr);
+}
 /*
  * Insert a tag-value combination from LINE (the equal sign is at POS)
  */
(Continue reading)

Steve Dickson | 3 Aug 2009 16:54
Picon
Favicon

[Patch 4/8] NFS Mount Configuration File (Vers 2)

commit 259bf96f9e2b6836529158ea1b7ee3a02e3266b7
Author: Steve Dickson <steved <at> redhat.com>
Date:   Sun Aug 2 12:28:19 2009 -0400

    Adds '--enable-mountconf' configuration flag that will
    enabled mount to read from a configuration file.
    The default value is disabled (or no)

    Adds '--with-mountfile' configuration flag that is used when
    mountconf is enabled to define the configuration file name.
    The default is /etc/nfsmount.conf.

    Signed-off-by: Steve Dickson <steved <at> redhat.com>

diff --git a/configure.ac b/configure.ac
index e0ca70e..5d26345 100644
--- a/configure.ac
+++ b/configure.ac
 <at>  <at>  -136,6 +136,31  <at>  <at>  AC_ARG_ENABLE(ipv6,
 	AC_SUBST(enable_ipv6)
 	AM_CONDITIONAL(CONFIG_IPV6, [test "$enable_ipv6" = "yes"])

+if test "$enable_mount" = yes; then
+	AC_ARG_ENABLE(mountconfig,
+	[AC_HELP_STRING([--enable-mountconf],
+                        [enable mount to use a configuration file])],
+	mountconfig=$enableval,
+	mountconfig=no)
+	if test "$enable_mountconfig" = yes; then
+		AC_DEFINE(MOUNT_CONFIG, 1, 
(Continue reading)


Gmane