diff options
author | neilbrown <neilbrown> | 2001-12-20 02:03:26 +0000 |
---|---|---|
committer | neilbrown <neilbrown> | 2001-12-20 02:03:26 +0000 |
commit | 0bd51f4c931eb68c355140c721763be64213a3ca (patch) | |
tree | 4423cf98c479be1a037b28cf0e879c0507c47b39 /support | |
parent | 7ac2c918e16fd63aa81c3aeb0e4870cded076bba (diff) | |
download | nfs-utils-0bd51f4c931eb68c355140c721763be64213a3ca.tar.gz nfs-utils-0bd51f4c931eb68c355140c721763be64213a3ca.tar.xz nfs-utils-0bd51f4c931eb68c355140c721763be64213a3ca.zip |
See Changelog
Diffstat (limited to 'support')
-rw-r--r-- | support/export/client.c | 2 | ||||
-rw-r--r-- | support/export/export.c | 2 | ||||
-rw-r--r-- | support/export/xtab.c | 2 | ||||
-rw-r--r-- | support/include/nfslib.h | 2 | ||||
-rw-r--r-- | support/nfs/exports.c | 11 |
5 files changed, 14 insertions, 5 deletions
diff --git a/support/export/client.c b/support/export/client.c index da3a976..03f7917 100644 --- a/support/export/client.c +++ b/support/export/client.c @@ -70,7 +70,7 @@ client_lookup(char *hname, int canonical) } } else { for (clp = clientlist[htype]; clp; clp = clp->m_next) { - if (strcmp(hname, clp->m_hostname)==0) + if (strcasecmp(hname, clp->m_hostname)==0) break; } } diff --git a/support/export/export.c b/support/export/export.c index 4cfb448..f95e729 100644 --- a/support/export/export.c +++ b/support/export/export.c @@ -32,7 +32,7 @@ export_read(char *fname) nfs_export *exp; setexportent(fname, "r"); - while ((eep = getexportent()) != NULL) { + while ((eep = getexportent(0)) != NULL) { exp = export_lookup(eep->e_hostname, eep->e_path, 0); if (!exp) export_create(eep,0); diff --git a/support/export/xtab.c b/support/export/xtab.c index 54470c1..4daef00 100644 --- a/support/export/xtab.c +++ b/support/export/xtab.c @@ -32,7 +32,7 @@ xtab_read(char *xtab, int is_export) if ((lockid = xflock(xtab, "r")) < 0) return 0; setexportent(xtab, "r"); - while ((xp = getexportent()) != NULL) { + while ((xp = getexportent(is_export==0)) != NULL) { if (!(exp = export_lookup(xp->e_hostname, xp->e_path, is_export != 1)) && !(exp = export_create(xp, is_export!=1))) { continue; diff --git a/support/include/nfslib.h b/support/include/nfslib.h index 8736d49..92eb900 100644 --- a/support/include/nfslib.h +++ b/support/include/nfslib.h @@ -84,7 +84,7 @@ struct rmtabent { * configuration file parsing */ void setexportent(char *fname, char *type); -struct exportent * getexportent(void); +struct exportent * getexportent(int); void putexportent(struct exportent *xep); void endexportent(void); struct exportent * mkexportent(char *hname, char *path, char *opts); diff --git a/support/nfs/exports.c b/support/nfs/exports.c index 0c25277..7e0decf 100644 --- a/support/nfs/exports.c +++ b/support/nfs/exports.c @@ -61,7 +61,7 @@ setexportent(char *fname, char *type) } struct exportent * -getexportent(void) +getexportent(int fromkernel) { static struct exportent ee; char exp[512]; @@ -74,6 +74,15 @@ getexportent(void) freesquash(); ee.e_flags = EXPORT_DEFAULT_FLAGS; + /* some kernels assume the default is sync rather than + * async. More recent kernels always report one or other, + * but this test makes sure we assume same as kernel + * Ditto for wgather + */ + if (fromkernel) { + ee.e_flags &= ~NFSEXP_ASYNC; + ee.e_flags &= ~NFSEXP_GATHERED_WRITES; + } ee.e_maptype = CLE_MAP_IDENT; ee.e_anonuid = -2; ee.e_anongid = -2; |