--- /dev/null
+# files generated by autoconf, automake, autoheader and libtoolize
+aclocal.m4
+autom4te.cache
+compile
+config.guess
+config.log
+config.sub
+configure
+depcomp
+install-sh
+libtool
+ltmain.sh
+Makefile.in
+missing
+support/include/config.h.in
+# files generated by configure
+confdefs.h
+config.status
+conftest
+conftest.c
+conftest.cpp
+conftest.er1
+conftest.err
+.deps
+Makefile
+support/include/config.h
+support/include/stamp-h1
+# file generated during compilation
+*.o
+.libs
+lib*.a
+tools/rpcgen/rpcgen
+tools/rpcdebug/rpcdebug
+utils/exportfs/exportfs
+utils/idmapd/idmapd
+utils/lockd/lockd
+utils/mountd/mountd
+utils/nfsd/nfsd
+utils/nfsstat/nfsstat
+utils/nhfsstone/nhfsstone
+utils/rquotad/rquotad
+utils/showmount/showmount
+utils/statd/statd
+tools/locktest/testlk
+tools/getiversion/getiversion
+tools/getkversion/getkversion
+support/export/mount.h
+support/export/mount_clnt.c
+support/export/mount_xdr.c
+support/include/mount.h
+utils/statd/sm_inter.h
+utils/statd/sm_inter_clnt.c
+utils/statd/sm_inter_svc.c
+utils/statd/sm_inter_xdr.c
+# generic editor backup et al
+*~
AC_CHECK_LIB(nsl, main, [LIBNSL="-lnsl"])
AC_CHECK_LIB(crypt, crypt, [LIBCRYPT="-lcrypt"])
if test "$enable_nfsv4" = yes; then
- AC_CHECK_LIB(event, event_dispatch, [libevent=1], [AC_MSG_ERROR(libevent needed for nfsv4 support)])
- AC_CHECK_LIB(nfsidmap, nfs4_init_name_mapping, [libnfsidmap=1], [AC_MSG_ERROR(libnfsidmap needed for nfsv4 support)])
- AC_CHECK_HEADERS(event.h, ,[AC_MSG_ERROR(libevent needed for nfsv4 support)])
- AC_CHECK_HEADERS(nfsidmap.h, ,[AC_MSG_ERROR(libnfsidmap needed for nfsv4 support)])
+ AC_CHECK_LIB(event, event_dispatch, [libevent=1], AC_MSG_ERROR([libevent needed for nfsv4 support]))
+ AC_CHECK_LIB(nfsidmap, nfs4_init_name_mapping, [libnfsidmap=1], AC_MSG_ERROR([libnfsidmap needed for nfsv4 support]))
+ AC_CHECK_HEADERS(event.h, ,AC_MSG_ERROR([libevent needed for nfsv4 support]))
+ AC_CHECK_HEADERS(nfsidmap.h, ,AC_MSG_ERROR([libnfsidmap needed for nfsv4 support]))
dnl librpcsecgss already has a dependency on libgssapi,
dnl but we need to make sure we get the right version
if test "$enable_gss" = yes; then
- PKG_CHECK_MODULES([RPCSECGSS], [librpcsecgss >= 0.10], [],
- [AC_MSG_ERROR([Unable to locate information required to use librpcsecgss.
- If you have pkgconfig installed, you might try setting environment
- variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig])
+ PKG_CHECK_MODULES(RPCSECGSS, librpcsecgss >= 0.10, ,
+ [AC_MSG_ERROR([Unable to locate information required to use librpcsecgss.])
+ AC_MSG_ERROR([If you have pkgconfig installed, you might try setting environment])
+ AC_MSG_ERROR([variable PKG_CONFIG_PATH to /usr/local/lib/pkgconfig])
]
)
- PKG_CHECK_MODULES([GSSAPI], [libgssapi >= 0.9])
+ PKG_CHECK_MODULES(GSSAPI, libgssapi >= 0.9)
fi
fi
if test "$enable_gss" = yes; then
dnl 'gss' also depends on nfsidmap.h - at least for svcgssd_proc.c
- AC_CHECK_HEADERS(nfsidmap.h, ,[AC_MSG_ERROR(libnfsidmap needed for gss support)])
- AC_CHECK_HEADERS(spkm3.h, ,[AC_MSG_WARN(could not locate SPKM3 header; will not have SPKM3 support)])
+ AC_CHECK_HEADERS(nfsidmap.h, ,AC_MSG_ERROR([libnfsidmap needed for gss support]))
+ AC_CHECK_HEADERS(spkm3.h, ,AC_MSG_WARN([could not locate SPKM3 header; will not have SPKM3 support]))
+ dnl the nfs4_set_debug function doesn't appear in all version of the library
+ AC_CHECK_LIB(nfsidmap, nfs4_set_debug,
+ AC_DEFINE(HAVE_NFS4_SET_DEBUG,1,
+ [Whether nfs4_set_debug() is present in libnfsidmap]),)
dnl Check for Kerberos V5
AC_KERBEROS_V5
dnl This is not done until here because we need to have KRBLIBS set
dnl ("librpcsecgss=1" is so that it doesn't get added to LIBS)
- AC_CHECK_LIB(rpcsecgss, authgss_create_default, [librpcsecgss=1], [AC_MSG_ERROR(librpcsecgss needed for nfsv4 support)], $KRBLIBS)
+ AC_CHECK_LIB(rpcsecgss, authgss_create_default, [librpcsecgss=1], AC_MSG_ERROR([librpcsecgss needed for nfsv4 support]), $KRBLIBS)
AC_CHECK_LIB(rpcsecgss, authgss_set_debug_level,
AC_DEFINE(HAVE_AUTHGSS_SET_DEBUG_LEVEL, 1, [Define this if the rpcsec_gss library has the function authgss_set_debug_level]),, $KRBLIBS)
gethostbyaddr gethostbyname gethostname getmntent \
gettimeofday hasmntopt inet_ntoa innetgr memset mkdir pathconf \
realpath rmdir select socket strcasecmp strchr strdup \
- strerror strrchr strtol strtoul])
+ strerror strrchr strtol strtoul sigprocmask])
dnl *************************************************************
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(size_t)
+AC_CHECK_SIZEOF(socklen_t)
+
dnl *************************************************************
dnl Export some path names to config.h
#include <arpa/inet.h>
#include <stdlib.h>
#include <string.h>
+#include <ctype.h>
#include <netdb.h>
#include "xmalloc.h"
#include "misc.h"
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#) from_local.c 1.3 96/05/31 15:52:57";
#endif
*/
#include <errno.h>
+#include <unistd.h>
#include <rpc/rpc.h>
#include <rpc/pmap_prot.h>
#include <rpc/pmap_clnt.h>
#include <time.h>
#include "nfslib.h"
+#if SIZEOF_SOCKLEN_T - 0 == 0
+#define socklen_t int
+#endif
+
static void closedown(int sig);
int makesock(int port, int proto);
struct sockaddr_in saddr;
SVCXPRT *transp;
int sock;
- int asize;
+ socklen_t asize;
asize = sizeof(saddr);
sock = 0;
if (getsockname(0, (struct sockaddr *) &saddr, &asize) == 0
&& saddr.sin_family == AF_INET) {
- int ssize = sizeof (int);
+ socklen_t ssize = sizeof (int);
int fdtype = 0;
if (getsockopt(0, SOL_SOCKET, SO_TYPE,
(char *)&fdtype, &ssize) == -1)
break;
case AUTH_UNIX: {
struct authunix_parms *unix_cred;
+ time_t time;
struct tm *tm;
unix_cred = (struct authunix_parms *) rqstp->rq_clntcred;
- tm = localtime(&unix_cred->aup_time);
+ time = unix_cred->aup_time;
+ tm = localtime(&time);
snprintf(sp, buflen, "UNIX %d/%d/%d %02d:%02d:%02d %s %d.%d",
tm->tm_year, tm->tm_mon + 1, tm->tm_mday,
tm->tm_hour, tm->tm_min, tm->tm_sec,
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_clntout.c 1.11 89/02/22 (C) 1987 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_cout.c 1.13 89/02/22 (C) 1987 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_hout.c 1.12 89/02/22 (C) 1987 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_main.c 1.30 89/03/30 (C) 1987 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_parse.c 1.8 89/02/22 (C) 1987 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_sample.c 1.1 90/08/30 (C) 1987 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_scan.c 1.11 89/02/22 (C) 1987 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_svcout.c 1.29 89/03/30 (C) 1987 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_tblout.c 1.4 89/02/22 (C) 1988 SMI";
#endif
* Mountain View, California 94043
*/
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)rpc_util.c 1.11 89/02/22 (C) 1987 SMI";
#endif
errx(1, "Could not find group \"%s\"", nobodygroup);
nobodygid = gr->gr_gid;
+#ifdef HAVE_NFS4_SET_DEBUG
nfs4_set_debug(verbose, idmapd_warnx);
+#endif
if (conf_path == NULL)
conf_path = _PATH_IDMAPDCONF;
if (nfs4_init_name_mapping(conf_path))
struct idmap_client *ic = data;
struct idmap_msg im;
u_char buf[IDMAP_MAXMSGSZ + 1];
- size_t len, bsiz;
+ size_t len;
+ ssize_t bsiz;
char *bp, typebuf[IDMAP_MAXMSGSZ],
buf1[IDMAP_MAXMSGSZ], authbuf[IDMAP_MAXMSGSZ], *p;
unsigned long tmp;
/* Get rid of newline and terminate buffer*/
buf[len - 1] = '\0';
- bp = buf;
+ bp = (char *)buf;
memset(&im, 0, sizeof(im));
imconv(ic, &im);
buf[0] = '\0';
- bp = buf;
+ bp = (char *)buf;
bsiz = sizeof(buf);
/* Authentication name */
if (failed)
return NULL;
memset(fh.fh_handle, 0, sizeof(fh.fh_handle));
- fh.fh_size = qword_get(&bp, fh.fh_handle, NFS3_FHSIZE);
+ fh.fh_size = qword_get(&bp, (char *)fh.fh_handle, NFS3_FHSIZE);
return &fh;
}
static void usage(const char *, int exitcode);
static exports get_exportlist(void);
-static struct nfs_fh_len *get_rootfh(struct svc_req *, dirpath *, int *, int v3);
+static struct nfs_fh_len *get_rootfh(struct svc_req *, dirpath *, mountstat3 *, int v3);
int new_cache = 0;
struct nfs_fh_len *fh;
xlog(D_CALL, "MNT3(%s) called", *path);
- if ((fh = get_rootfh(rqstp, path, (int *) &res->fhs_status, 1)) != NULL) {
+ if ((fh = get_rootfh(rqstp, path, &res->fhs_status, 1)) != NULL) {
struct mountres3_ok *ok = &res->mountres3_u.mountinfo;
ok->fhandle.fhandle3_len = fh->fh_size;
- ok->fhandle.fhandle3_val = fh->fh_handle;
+ ok->fhandle.fhandle3_val = (char *)fh->fh_handle;
ok->auth_flavors.auth_flavors_len
= sizeof(flavors)/sizeof(flavors[0]);
ok->auth_flavors.auth_flavors_val = flavors;
}
static struct nfs_fh_len *
-get_rootfh(struct svc_req *rqstp, dirpath *path, int *error, int v3)
+get_rootfh(struct svc_req *rqstp, dirpath *path, mountstat3 *error, int v3)
{
struct sockaddr_in *sin =
(struct sockaddr_in *) svc_getcaller(rqstp->rq_xprt);
-#ifndef lint
+#if 0
static char sccsid[] = "@(#)nhfsstone.c 1.22 90/05/08 Copyright (c) 1990, Legato Systems Inc";
#endif
* Ported to Linux by Olaf Kirch <okir@monad.swb.de>
*/
+#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
int pid; /* process id */
int delay; /* msecs since last checked current time */
int randnum; /* a random number */
+#if HAVE_SIGPROCMASK
+ sigset_t oldmask; /* saved signal mask */
+#else
int oldmask; /* saved signal mask */
+#endif
int sampletime; /* secs between reading kernel stats */
char *opts; /* option parsing */
int pct;
(void) signal(SIGINT, cleanup);
(void) signal(SIGUSR1, startup);
+#if HAVE_SIGPROCMASK
+ {
+ sigset_t mask;
+ sigemptyset(&mask);
+ sigaddset(&mask, SIGUSR1);
+ sigprocmask(SIG_BLOCK, &mask, &oldmask);
+ }
+#else
+ /*
+ * sigblock() is marked deprecated in modern
+ * glibc and hence generates a warning.
+ */
oldmask = sigblock(sigmask(SIGUSR1));
+#endif
if (ncalls == 0) {
if (runtime == 0) {
exit(1);
}
+#if HAVE_SIGPROCMASK
+ sigsuspend(&oldmask);
+#else
sigpause(oldmask);
+#endif
/*
* Initialize counters
static pid_t mypid;
/* Turns on logging to console/stderr. */
+#if 0
static int opt_debug = 0; /* Will be command-line option, eventually */
+#endif
void log_init()
{
clnt = NL_NEXT(clnt);
}
+#ifdef RESTRICTED_STATD
failure:
+#endif
note(N_WARNING, "Received erroneous SM_UNMON request from %s for %s",
my_name, mon_name);
return (&result);
dprintf(N_DEBUG, "SM_UNMON_ALL request from %s with no "
"SM_MON requests from it.", my_name);
}
+#ifdef RESTRICTED_STATD
failure:
+#endif
return (&result);
}
#include "log.h"
#include "ha-callout.h"
+#if SIZEOF_SOCKLEN_T - 0 == 0
+#define socklen_t int
+#endif
+
#define MAXMSGSIZE (2048 / sizeof(unsigned int))
static unsigned long xid = 0; /* RPC XID counter */
struct rpc_msg mesg;
notify_list *lp = NULL;
XDR xdr, *xdrs = &xdr;
- int alen = sizeof(*sin);
+ socklen_t alen = sizeof(*sin);
/* Receive message */
if ((msglen = recvfrom(sockfd, msgbuf, sizeof(msgbuf), 0,
* two copies of each - one in main(), one static in log.c...
* It also eliminates the 256-char static in log.c */
char *name_p = NULL;
-char *version_p = NULL;
+const char *version_p = NULL;
/* PRC: a high-availability callout program can be specified with -H
* When this is done, the program will receive callouts whenever clients
#endif
if (!(run_mode & MODE_NODAEMON)) {
- int filedes, fdmax, tempfd;
+ int tempfd;
if (pipe(pipefds)<0) {
perror("statd: unable to create pipe");
* as to why they're global.
*/
extern char *name_p; /* program basename */
-extern char *version_p; /* program version */
+extern const char *version_p; /* program version */
extern int re_notify; /* time to re-read notify list */
change_state (void)
{
int fd, size;
- extern short int restart;
if ((fd = open (SM_STAT_PATH, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR)) == -1)
die ("open (%s): %s", SM_STAT_PATH, strerror (errno));