From: chip Date: Sun, 21 Jan 2001 04:26:06 +0000 (+0000) Subject: 2001-01-20 Chip Salzenberg X-Git-Tag: nfs-utils-0-3~2 X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=commitdiff_plain;h=b5cb3f2f03186c514af01b835296da084ae286d9 2001-01-20 Chip Salzenberg * support/include/xio.h (xgetc): Declare to return int. * support/nfs/xio.c (xgetc): Return int. (xgettok, xskip, xskipcomment): Use int for value of xgetc. * utils/statd/statd.c (main): Use int for value of getopt. * debian/changelog: Version 0.2.1-5. --- diff --git a/ChangeLog b/ChangeLog index 00a5ac0..87074ea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2001-01-20 Chip Salzenberg + + * support/include/xio.h (xgetc): Declare to return int. + * support/nfs/xio.c (xgetc): Return int. + (xgettok, xskip, xskipcomment): Use int for value of xgetc. + * utils/statd/statd.c (main): Use int for value of getopt. + * debian/changelog: Version 0.2.1-5. + 2000-12-10 Chip Salzenberg * utils/statd/monitor.c (sm_mon_1_svc): Fix buggy check for diff --git a/debian/changelog b/debian/changelog index 05a4ace..1a528b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +nfs-utils (1:0.2.1-5) unstable; urgency=low + + * Fix statd callback protection ("--secure-statd") to + 1. work with current kernels as far as possible, and + 2. allow for Trond's recent NFS patches, which change the + static callback RPC procedure. + * Store return values of getc and getopt in int variables: + they can return EOF, which requires an int. (From NMU) + + -- Chip Salzenberg Sat, 20 Jan 2001 20:03:07 -0800 + nfs-utils (1:0.2.1-4) unstable; urgency=medium * Warn about common errors in /etc/exports. (closes: #66421) diff --git a/support/include/xio.h b/support/include/xio.h index 608d265..a8e288e 100644 --- a/support/include/xio.h +++ b/support/include/xio.h @@ -18,7 +18,7 @@ int xflock(char *fname, char *type); void xfunlock(int lockid); void xfclose(XFILE *xfp); int xgettok(XFILE *xfp, char sepa, char *tok, int len); -char xgetc(XFILE *xfp); +int xgetc(XFILE *xfp); void xungetc(int c, XFILE *xfp); void xskip(XFILE *xfp, char *str); char xskipcomment(XFILE *xfp); diff --git a/support/nfs/xio.c b/support/nfs/xio.c index db5e2c3..cfdb1d1 100644 --- a/support/nfs/xio.c +++ b/support/nfs/xio.c @@ -87,7 +87,7 @@ int xgettok(XFILE *xfp, char sepa, char *tok, int len) { int i = 0; - char c = 0; + int c = 0; while (i < len && (c = xgetc(xfp)) != EOF && c != sepa && !isspace(c)) tok[i++] = c; @@ -101,10 +101,10 @@ xgettok(XFILE *xfp, char sepa, char *tok, int len) return 1; } -char +int xgetc(XFILE *xfp) { - char c = getc(xfp->x_fp); + int c = getc(xfp->x_fp); if (c == EOF) return c; @@ -139,7 +139,7 @@ xungetc(int c, XFILE *xfp) void xskip(XFILE *xfp, char *str) { - char c; + int c; while ((c = xgetc(xfp)) != EOF && strchr(str, c)); ungetc(c, xfp->x_fp); @@ -148,7 +148,7 @@ xskip(XFILE *xfp, char *str) char xskipcomment(XFILE *xfp) { - char c; + int c; while ((c = getc(xfp->x_fp)) != EOF && c != '\n'); return c; diff --git a/utils/statd/statd.c b/utils/statd/statd.c index f467e74..a63a6a2 100644 --- a/utils/statd/statd.c +++ b/utils/statd/statd.c @@ -121,7 +121,7 @@ int main (int argc, char **argv) { extern char *optarg; int pid; - char arg; + int arg; /* Default: daemon mode, no other options */ run_mode = 0;