LINUX_KMEM_CACHE_CREATE_TAKES_DTOR
LINUX_CONFIG_H_EXISTS
LINUX_COMPLETION_H_EXISTS
+ LINUX_EXPORTFS_H_EXISTS
LINUX_DEFINES_FOR_EACH_PROCESS
LINUX_DEFINES_PREV_TASK
LINUX_FS_STRUCT_SUPER_HAS_ALLOC_INODE
LINUX_GET_SB_HAS_STRUCT_VFSMOUNT
LINUX_STATFS_TAKES_DENTRY
LINUX_FREEZER_H_EXISTS
+ LINUX_HAVE_SVC_ADDR_IN
if test "x$ac_cv_linux_freezer_h_exists" = "xyes" ; then
AC_DEFINE(FREEZER_H_EXISTS, 1, [define if you have linux/freezer.h])
fi
if test "x$ac_cv_linux_config_h_exists" = "xyes" ; then
AC_DEFINE(CONFIG_H_EXISTS, 1, [define if config.h exists])
fi
+ if test "x$ac_cv_linux_exportfs_h_exists" = "xyes"; then
+ AC_DEFINE(EXPORTFS_H_EXISTS, 1, [define if linux/exportfs.h exists])
+ fi
if test "x$ac_cv_linux_defines_for_each_process" = "xyes" ; then
AC_DEFINE(DEFINED_FOR_EACH_PROCESS, 1, [define if for_each_process defined])
fi
else
AC_MSG_WARN([your kernel does not have a usable symlink cache API])
fi
+ if test "x$ac_cv_linux_have_svc_addr_in" = "xyes"; then
+ AC_DEFINE(HAVE_SVC_ADDR_IN, 1, [define if svc_add_in exists])
+ fi
:
fi
esac
("$Header$");
#include <linux/module.h> /* early to avoid printf->printk mapping */
+#include <linux/fs.h>
+#ifdef EXPORTFS_H_EXISTS
+#include <linux/exportfs.h>
+#endif
#include "afs/sysincludes.h"
#include "afsincludes.h"
#include "afs/afs_dynroot.h"
#if !defined(AFS_NONFSTRANS) || defined(AFS_AIX_IAUTH_ENV)
#include <linux/module.h> /* early to avoid printf->printk mapping */
+#include <linux/fs.h>
#include "afs/sysincludes.h"
#include "afsincludes.h"
#include "nfsclient.h"
struct nfs_server_thread *ns;
struct afs_exporter *outexp;
struct AFS_UCRED *credp;
+ struct sockaddr_in *addr;
int code;
code = afs_orig_authtab[rqstp->rq_authop->flavour]->accept(rqstp, authp);
/* XXX maybe we should fail this with rpc_system_err? */
return SVC_OK;
}
+#if HAVE_SVC_ADDR_IN
+ addr = svc_addr_in(rqstp);
+#else
+ addr = &rqstp->rq_addr;
+#endif
ns->active = 1;
ns->flavor = rqstp->rq_authop->flavour;
ns->code = EACCES;
- ns->client_addr = rqstp->rq_addr;
+ ns->client_addr = *addr;
ns->client_addrlen = rqstp->rq_addrlen;
ns->client_uid = rqstp->rq_cred.cr_uid;
ns->client_gid = rqstp->rq_cred.cr_gid;
else
ns->client_g1 = -1;
- /* NB: Don't check the length; it's not always filled in! */
- if (rqstp->rq_addr.sin_family != AF_INET) {
+ if (addr->sin_family != AF_INET) {
printk("afs: NFS request from non-IPv4 client (family %d len %d)\n",
- rqstp->rq_addr.sin_family, rqstp->rq_addrlen);
+ addr->sin_family, rqstp->rq_addrlen);
goto done;
}
* clients to afs_nobody */
if (credp->cr_uid == -1)
credp->cr_uid = -2;
- code = afs_nfsclient_reqhandler(0, &credp, rqstp->rq_addr.sin_addr.s_addr,
+ code = afs_nfsclient_reqhandler(0, &credp, addr->sin_addr.s_addr,
&ns->uid, &outexp);
if (!code && outexp) EXP_RELE(outexp);
if (!code) ns->code = 0;
extern void osi_FreeSmallSpace(void *adata);
extern void *osi_AllocLargeSpace(size_t size);
extern void *osi_AllocSmallSpace(size_t size);
+extern void shutdown_osinet(void);
/* afs_osi_pag.c */
extern int afs_setpag();
ac_cv_linux_completion_h_exists=no)])
AC_MSG_RESULT($ac_cv_linux_completion_h_exists)])
+AC_DEFUN([LINUX_EXPORTFS_H_EXISTS], [
+ AC_MSG_CHECKING([for linux/exportfs.h existence])
+ AC_CACHE_VAL([ac_cv_linux_exportfs_h_exists], [
+ AC_TRY_KBUILD(
+[#include <linux/exportfs.h>],
+[return;],
+ ac_cv_linux_exportfs_h_exists=yes,
+ ac_cv_linux_exportfs_h_exists=no)])
+ AC_MSG_RESULT($ac_cv_linux_exportfs_h_exists)])
AC_DEFUN([LINUX_DEFINES_FOR_EACH_PROCESS], [
AC_MSG_CHECKING([for defined for_each_process])
ac_cv_linux_fs_struct_fop_has_sendfile=no)])
AC_MSG_RESULT($ac_cv_linux_fs_struct_fop_has_sendfile)])
+AC_DEFUN([LINUX_HAVE_SVC_ADDR_IN], [
+ AC_MSG_CHECKING([whether svc_addr_in exists])
+ AC_CACHE_VAL([ac_cv_linux_have_svc_addr_in], [
+ AC_TRY_KBUILD(
+[#include <linux/sunrpc/svc.h>],
+[svc_addr_in(NULL);],
+ ac_cv_linux_have_svc_addr_in=yes,
+ ac_cv_linux_have_svc_addr_in=no)])
+ AC_MSG_RESULT($ac_cv_linux_have_svc_addr_in)])
+