X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=utils%2Fmountd%2Fv4root.c;h=34d098ad28d18ee3441f2a068b6acdae8122ea5d;hb=52a7a44f95fab091becece32a6995a409fd59fd1;hp=708eb614b92cc88aee2fa752c7cf1abf0a998c3f;hpb=adee9b7bddedcddb8de4e0b7c2f778148b1f4d2b;p=nfs-utils.git diff --git a/utils/mountd/v4root.c b/utils/mountd/v4root.c index 708eb61..34d098a 100644 --- a/utils/mountd/v4root.c +++ b/utils/mountd/v4root.c @@ -55,13 +55,16 @@ static nfs_export pseudo_root = { .m_warned = 0, }; -void set_pseudofs_security(struct exportent *pseudo, struct exportent *source) +static void +set_pseudofs_security(struct exportent *pseudo, struct exportent *source) { struct sec_entry *se; int i; if (source->e_flags & NFSEXP_INSECURE_PORT) pseudo->e_flags |= NFSEXP_INSECURE_PORT; + if ((source->e_flags & NFSEXP_ROOTSQUASH) == 0) + pseudo->e_flags &= ~NFSEXP_ROOTSQUASH; for (se = source->e_secinfo; se->flav; se++) { struct sec_entry *new; @@ -92,7 +95,8 @@ v4root_create(char *path, nfs_export *export) exp = export_create(&eep, 0); if (exp == NULL) return NULL; - xlog(D_CALL, "v4root_create: path '%s'", exp->m_export.e_path); + xlog(D_CALL, "v4root_create: path '%s' flags 0x%x", + exp->m_export.e_path, exp->m_export.e_flags); return &exp->m_export; } @@ -118,7 +122,8 @@ v4root_support(void) return 0; } -int pseudofs_update(char *hostname, char *path, nfs_export *source) +static int +pseudofs_update(char *hostname, char *path, nfs_export *source) { nfs_export *exp;