Add an export option do disallow readdir plus.

Signed-off-by: Marc Eshel <eshel@us.ibm.com>
systemd: require rpcbind and start rpc.statd

Without rpcbind, ganesha.nfsd fails to start with:

    Register_program :DISP :FATAL :Cannot register NFS V3 on UDP

This change also includes a new systemd-unit for starting rpc.statd. When the
new nfs-ganesha-lock.service is started, the original nfs-lock.service is
stopped (if started), and the kernel lockd module unregisters the nlockmgr
program from the portmapper.

Signed-off-by: Niels de Vos <ndevos@redhat.com>
Acked-by: Frank S. Filz <ffilzlnx@mindspring.com>
Fixed build issue related to glib dbus python script consolidation

Patch e2dd540d132f8a16c01c9ba210d9eac5b833c35e introduced a small regression
regarding build process (removing old files). This simple patch allows to build
Ganesha with admin tools support without errors.

Signed-off-by: Thomas Favre-Bulle <thomas.favre-bulle@bull.net>
9P: brings information from export manager down to 9p protocol layer

Change-Id: I8fa711ddc70731b9d6b4fdf54b4e1842f2621c7e
Signed-off-by: Philippe DENIEL <philippe.deniel@cea.fr>
Don't grant a delegation when there is a conflicting open

The current code grants a delegation even though there are some opens
that conflict with granting the delegation. Possible rationale for this
omission is incorrect thinking that underlying FSAL, supporting the
delegation, would detect this and prevent us getting the lease lock.

Since we will have only one outstanding open call with FSAL, the first
call to acquire the lease lock for a write delegation will succeed even
if other NFS clients had opened the file for read or write.

We use cache_entry_t's share_state to know the number of prior read
opens and write opens to detect a conflict. If granting a delegation
would conflict with existing prior opens, we simply don't grant
delegation.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Frank S. Filz <ffilzlnx@mindspring.com>
Acked-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>
Update ntirpc submodule.

Take Bill's fix for RD4H and a change to remove an internal symbol from
rpc_com.h.

Signed-off-by: Matt Benjamin <matt@linuxbox.com>
Merge remote-tracking branch 'phdeniel/pull_request' into next

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Merge remote-tracking branch 'tfb/Pull_requests_v2.2-dev-12' into next

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Merge remote-tracking branch 'ndevos/systemd/requires-rpcbind' into next

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Merge remote-tracking branch 'malahal/deleg-grant' into next

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Merge remote-tracking branch 'marc/no-readdir-plus' into next

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Merge remote-tracking branch 'linuxbox2/2dev11' into next

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Add -Wno-strict-aliasing to maintainer mode compile flags

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
V2.2-dev-12

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
FSAL_GLUSTER : fixed pynfs failure - RDLK1

This testcase is related to readlink Op. Buffer into which symlink
is read was not NULL terminated. Fixed the same and also made changes
to update the buffer length accordingly.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
Updated spec file and cmake with dbus stat consolidated scripts

Removed deleted scripts from RPM packaging, added new ones.
Added new scripts to cmake build process as well.
Moved glib_dbus_stats.py to proper modules directory and changed import path
in ganesha_stats.py accordingly.

Signed-off-by: Thomas Favre-Bulle <thomas.favre-bulle@bull.net>
Acked-by: Malahal Naineni <malahal@us.ibm.com>
Make Ganesha honor install prefix

Currently, Ganesha has hard-coded locations of some of it's files, most
noteably it's configuration file.  Ganesha can be installed in an
alternate prefix, but it cannot run from that prefix without command
line options.

Change those hard-coded paths to indirect through SYSCONFDIR and
SYSSTATEDIR, so that Ganesha by default runs out of it's prefix.

Because cmake only has one install prefix (CMAKE_INSTALL_PREFIX), it is
difficult to properly install into the root of a filesystem.  To work
around this, Ganesha now by default installs into /usr, with config in
/etc/ganesha, and state in /var/run.  If CMAKE_INSTALL_PREFIX is set,
than it installs into bin/, lib/, etc, share/ and var/ inside that
prefix as normal.  DESTDIR= installs also work correctly in both cases.

Signed-off-by: Daniel Gryniewicz <dang@linuxbox.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Install a default ganesha.conf file

- Convert the vfs.conf file so it cannot run by default, rather than
  having it export /home
- Install it in the proper prefix location, makeing sure not to clobber
  any existing config file

Signed-off-by: Daniel Gryniewicz <dang@linuxbox.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Install config_samples into /usr/share/doc

Signed-off-by: Daniel Gryniewicz <dang@linuxbox.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
Fix the spec file to work with the new install prefix

Signed-off-by: Daniel Gryniewicz <dang@linuxbox.com>
Tested-by: Niels de Vos <ndevos@redhat.com>