summaryrefslogtreecommitdiffstats
path: root/contrib/amd/hlfsd
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-09-15 02:50:52 +0000
committerobrien <obrien@FreeBSD.org>1999-09-15 02:50:52 +0000
commit422815db966fe7dc38dfc5df2be5e83d5ea9f48c (patch)
treebabaa2d3f02bbec865446438f974c81f18ae2607 /contrib/amd/hlfsd
parentc9384f1d982e4695904ef82271714a049cd32827 (diff)
downloadFreeBSD-src-422815db966fe7dc38dfc5df2be5e83d5ea9f48c.zip
FreeBSD-src-422815db966fe7dc38dfc5df2be5e83d5ea9f48c.tar.gz
Virgin import of AMD (am-utils) v6.0.1
Diffstat (limited to 'contrib/amd/hlfsd')
-rw-r--r--contrib/amd/hlfsd/hlfsd.84
-rw-r--r--contrib/amd/hlfsd/hlfsd.c27
-rw-r--r--contrib/amd/hlfsd/hlfsd.h6
-rw-r--r--contrib/amd/hlfsd/homedir.c14
-rw-r--r--contrib/amd/hlfsd/nfs_prot_svc.c6
-rw-r--r--contrib/amd/hlfsd/stubs.c15
6 files changed, 32 insertions, 40 deletions
diff --git a/contrib/amd/hlfsd/hlfsd.8 b/contrib/amd/hlfsd/hlfsd.8
index 0d98302..956f30c 100644
--- a/contrib/amd/hlfsd/hlfsd.8
+++ b/contrib/amd/hlfsd/hlfsd.8
@@ -1,5 +1,5 @@
.\"
-.\" Copyright (c) 1997-1998 Erez Zadok
+.\" Copyright (c) 1997-1999 Erez Zadok
.\" Copyright (c) 1989 Jan-Simon Pendry
.\" Copyright (c) 1989 Imperial College of Science, Technology & Medicine
.\" Copyright (c) 1989 The Regents of the University of California.
@@ -36,7 +36,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: hlfsd.8,v 1.1.1.1 1998/11/05 02:04:55 ezk Exp $
+.\" $Id: hlfsd.8,v 1.2 1999/01/10 21:54:32 ezk Exp $
.\"
.\" HLFSD was written at Columbia University Computer Science Department, by
.\" Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@smarts.com>
diff --git a/contrib/amd/hlfsd/hlfsd.c b/contrib/amd/hlfsd/hlfsd.c
index 83b0b8d..6b0f78f 100644
--- a/contrib/amd/hlfsd/hlfsd.c
+++ b/contrib/amd/hlfsd/hlfsd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1998 Erez Zadok
+ * Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: hlfsd.c,v 1.2 1998/12/27 06:25:22 ezk Exp $
+ * $Id: hlfsd.c,v 1.5 1999/09/08 23:36:51 ezk Exp $
*
* HLFSD was written at Columbia University Computer Science Department, by
* Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu>
@@ -83,10 +83,6 @@ char *alt_spooldir = ALT_SPOOLDIR;
char *home_subdir = HOME_SUBDIR;
char *logfile = DEFAULT_LOGFILE;
char *passwdfile = NULL; /* alternate passwd file to use */
-#if 0
-char *progname;
-int foreground = 1; /* This is the top-level server */
-#endif
char *slinkname = 0;
char hostname[MAXHOSTNAMELEN + 1] = "localhost";
int cache_interval = DEFAULT_CACHE_INTERVAL;
@@ -96,10 +92,6 @@ int noverify = 0;
int orig_umask = 022;
int serverpid = 0;
nfstime startup;
-#if 0
-pid_t mypid; /* Current process id */
-#endif
-serv_state amd_state;
u_short nfs_port;
/* symbol must be available always */
@@ -109,12 +101,6 @@ char *mnttab_file_name = MNTTAB_FILE_NAME;
char *mnttab_file_name = NULL;
#endif /* not MOUNT_TABLE_ON_FILE */
-#if 0
-#ifdef DEBUG
-int debug_flags = 0;
-#endif /* DEBUG */
-#endif
-
/* forward declarations */
void hlfsd_going_down(int rc);
@@ -949,8 +935,13 @@ fatal(char *mess)
lessmess[messlen - 4] = '\0';
if (errno < sys_nerr)
- fprintf(stderr, "%s: %s: %s\n", am_get_progname(),
- lessmess, sys_errlist[errno]);
+ fprintf(stderr, "%s: %s: %s\n", am_get_progname(), lessmess,
+#ifdef HAVE_STRERROR
+ strerror(errno)
+#else /* not HAVE_STRERROR */
+ sys_errlist[errno]
+#endif /* not HAVE_STRERROR */
+ );
else
fprintf(stderr, "%s: %s: Error %d\n",
am_get_progname(), lessmess, errno);
diff --git a/contrib/amd/hlfsd/hlfsd.h b/contrib/amd/hlfsd/hlfsd.h
index 2c17792..e306ea3 100644
--- a/contrib/amd/hlfsd/hlfsd.h
+++ b/contrib/amd/hlfsd/hlfsd.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1998 Erez Zadok
+ * Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: hlfsd.h,v 1.1.1.1 1998/11/05 02:04:55 ezk Exp $
+ * $Id: hlfsd.h,v 1.2 1999/01/10 21:54:32 ezk Exp $
*
* HLFSD was written at Columbia University Computer Science Department, by
* Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu>
@@ -52,7 +52,7 @@
* MACROS AND CONSTANTS:
*/
-#define HLFSD_VERSION "hlfsd 1.1 (March 4, 1997-1998)"
+#define HLFSD_VERSION "hlfsd 1.1 (March 4, 1997-1999)"
#define PERS_SPOOLMODE 0755
#define OPEN_SPOOLMODE 01777
#define DOTSTRING "."
diff --git a/contrib/amd/hlfsd/homedir.c b/contrib/amd/hlfsd/homedir.c
index 427c2c1..b2897bf 100644
--- a/contrib/amd/hlfsd/homedir.c
+++ b/contrib/amd/hlfsd/homedir.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1998 Erez Zadok
+ * Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: homedir.c,v 1.2 1998/12/27 06:25:22 ezk Exp $
+ * $Id: homedir.c,v 1.4 1999/01/13 23:31:19 ezk Exp $
*
* HLFSD was written at Columbia University Computer Science Department, by
* Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu>
@@ -159,8 +159,8 @@ homedir(int userid)
if (found->child) { /* PARENT */
#ifdef DEBUG
if (lastchild)
- plog(XLOG_INFO, "cache spill uid = %d, pid = %d, home = %s",
- lastchild->uid, lastchild->child,
+ plog(XLOG_INFO, "cache spill uid = %ld, pid = %ld, home = %s",
+ (long) lastchild->uid, (long) lastchild->child,
lastchild->home);
#endif /* DEBUG */
lastchild = found;
@@ -270,7 +270,7 @@ delay(uid2home_t *found, int secs)
#ifdef DEBUG
if (found)
- dlog("delaying on child %d for %d seconds", found->child, secs);
+ dlog("delaying on child %ld for %d seconds", (long) found->child, secs);
#endif /* DEBUG */
tv.tv_usec = 0;
@@ -536,8 +536,8 @@ readent:
/* the rest of the fields are unimportant and not being considered */
- plog(XLOG_USER, "hlfsd_getpwent: name=%s, uid=%d, dir=%s",
- passwd_ent.pw_name, passwd_ent.pw_uid, passwd_ent.pw_dir);
+ plog(XLOG_USER, "hlfsd_getpwent: name=%s, uid=%ld, dir=%s",
+ passwd_ent.pw_name, (long) passwd_ent.pw_uid, passwd_ent.pw_dir);
return &passwd_ent;
}
diff --git a/contrib/amd/hlfsd/nfs_prot_svc.c b/contrib/amd/hlfsd/nfs_prot_svc.c
index 8efe211..3fdd196 100644
--- a/contrib/amd/hlfsd/nfs_prot_svc.c
+++ b/contrib/amd/hlfsd/nfs_prot_svc.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1998 Erez Zadok
+ * Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: nfs_prot_svc.c,v 1.1.1.1 1998/11/05 02:04:55 ezk Exp $
+ * $Id: nfs_prot_svc.c,v 1.3 1999/01/13 23:31:19 ezk Exp $
*
*/
@@ -228,7 +228,7 @@ nfs_program_2(struct svc_req *rqstp, SVCXPRT *transp)
(SVC_IN_ARG_TYPE) &argument)) {
plog(XLOG_ERROR,
"NFS xdr decode failed for %d %d %d",
- rqstp->rq_prog, rqstp->rq_vers, rqstp->rq_proc);
+ (int) rqstp->rq_prog, (int) rqstp->rq_vers, (int) rqstp->rq_proc);
svcerr_decode(transp);
return;
}
diff --git a/contrib/amd/hlfsd/stubs.c b/contrib/amd/hlfsd/stubs.c
index 637bf09..490166a 100644
--- a/contrib/amd/hlfsd/stubs.c
+++ b/contrib/amd/hlfsd/stubs.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997-1998 Erez Zadok
+ * Copyright (c) 1997-1999 Erez Zadok
* Copyright (c) 1989 Jan-Simon Pendry
* Copyright (c) 1989 Imperial College of Science, Technology & Medicine
* Copyright (c) 1989 The Regents of the University of California.
@@ -38,7 +38,7 @@
*
* %W% (Berkeley) %G%
*
- * $Id: stubs.c,v 1.1.1.1 1998/11/05 02:04:55 ezk Exp $
+ * $Id: stubs.c,v 1.3 1999/01/13 23:31:19 ezk Exp $
*
* HLFSD was written at Columbia University Computer Science Department, by
* Erez Zadok <ezk@cs.columbia.edu> and Alexander Dupuy <dupuy@cs.columbia.edu>
@@ -158,7 +158,8 @@ nfsproc_getattr_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
un_fattr.na_fileid = uid;
res.ns_u.ns_attr_u = un_fattr;
#ifdef DEBUG
- dlog("nfs_getattr: successful search for uid=%d, gid=%d", uid, gid);
+ dlog("nfs_getattr: successful search for uid=%ld, gid=%ld",
+ (long) uid, (long) gid);
#endif /* DEBUG */
} else { /* not found */
res.ns_status = NFSERR_STALE;
@@ -248,8 +249,8 @@ nfsproc_lookup_2_svc(nfsdiropargs *argp, struct svc_req *rqstp)
res.dr_u.dr_drok_u.drok_fhandle = un_fhandle;
res.dr_status = NFS_OK;
#ifdef DEBUG
- dlog("nfs_lookup: successful lookup for uid=%d, gid=%d: username=%s",
- uid, gid, untab[idx].username);
+ dlog("nfs_lookup: successful lookup for uid=%ld, gid=%ld: username=%s",
+ (long) uid, (long) gid, untab[idx].username);
#endif /* DEBUG */
return &res;
}
@@ -344,8 +345,8 @@ nfsproc_readlink_2_svc(am_nfs_fh *argp, struct svc_req *rqstp)
/* print info, but try to avoid repetitions */
if (userid != last_uid) {
- plog(XLOG_USER, "mailbox for uid=%d, gid=%d is %s",
- userid, groupid, (char *) res.rlr_u.rlr_data_u);
+ plog(XLOG_USER, "mailbox for uid=%ld, gid=%ld is %s",
+ (long) userid, (long) groupid, (char *) res.rlr_u.rlr_data_u);
last_uid = userid;
}
OpenPOWER on IntegriCloud