~ubuntu-branches/debian/stretch/nfs-utils/stretch

« back to all changes in this revision

Viewing changes to support/export/export.c

  • Committer: Bazaar Package Importer
  • Author(s): Anibal Monsalve Salazar, Anibal Monsalve Salazar, Ben Hutchings
  • Date: 2010-04-06 16:11:22 UTC
  • mfrom: (1.2.18 upstream)
  • Revision ID: james.westby@ubuntu.com-20100406161122-x7erw0q8xiitoyp6
Tags: 1:1.2.2-1
[ Anibal Monsalve Salazar ]
* New upstream release 
  Build depend on libcap-dev
  Set configure option --enable-nfsv41
* X-ref nfsd({7,8})
  02-524255-manpages.patch by Cyril Brulebois
  Closes: 524255

[ Ben Hutchings ]
* Change maintainer to Debian kernel team; move Aníbal to uploaders and
  add myself to uploaders
* Check for nfsd in /proc/filesystems rather than looking for signs of it in
  /proc/kallsyms (Closes: #563104, #572736)
* Document the -n option to svcgssd, thanks to Alberto Gonzalez Iniesta
  (Closes: #451402, #550270)
* Replace upstream reference in package descriptions with Homepage fields,
  and do not refer to the obsolete CVS repository
* Update policy version to 3.8.4; no changes required
* Override lintian error 'init.d-script-missing-dependency-on-remote_fs';
  the init script does work without /usr mounted

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
static nfs_export *
29
29
                export_allowed_internal(struct hostent *hp, char *path);
30
30
 
 
31
static void warn_duplicated_exports(nfs_export *exp, struct exportent *eep)
 
32
{
 
33
        if (exp->m_export.e_flags != eep->e_flags) {
 
34
                xlog(L_ERROR, "incompatible duplicated export entries:");
 
35
                xlog(L_ERROR, "\t%s:%s (0x%x) [IGNORED]", eep->e_hostname,
 
36
                                eep->e_path, eep->e_flags);
 
37
                xlog(L_ERROR, "\t%s:%s (0x%x)", exp->m_export.e_hostname,
 
38
                                exp->m_export.e_path, exp->m_export.e_flags);
 
39
        } else {
 
40
                xlog(L_ERROR, "duplicated export entries:");
 
41
                xlog(L_ERROR, "\t%s:%s", eep->e_hostname, eep->e_path);
 
42
                xlog(L_ERROR, "\t%s:%s", exp->m_export.e_hostname,
 
43
                                exp->m_export.e_path);
 
44
        }
 
45
}
 
46
 
31
47
int
32
48
export_read(char *fname)
33
49
{
36
52
 
37
53
        setexportent(fname, "r");
38
54
        while ((eep = getexportent(0,1)) != NULL) {
39
 
          exp = export_lookup(eep->e_hostname, eep->e_path, 0);
40
 
          if (!exp)
41
 
            export_create(eep,0);
42
 
          else {
43
 
            if (exp->m_export.e_flags != eep->e_flags) {
44
 
              xlog(L_ERROR, "incompatible duplicated export entries:");
45
 
              xlog(L_ERROR, "\t%s:%s (0x%x) [IGNORED]", eep->e_hostname,
46
 
                   eep->e_path, eep->e_flags);
47
 
              xlog(L_ERROR, "\t%s:%s (0x%x)", exp->m_export.e_hostname,
48
 
                   exp->m_export.e_path, exp->m_export.e_flags);
49
 
            }
50
 
            else {
51
 
              xlog(L_ERROR, "duplicated export entries:");
52
 
              xlog(L_ERROR, "\t%s:%s", eep->e_hostname, eep->e_path);
53
 
              xlog(L_ERROR, "\t%s:%s", exp->m_export.e_hostname,
54
 
                   exp->m_export.e_path);
55
 
            }
56
 
          }
 
55
                exp = export_lookup(eep->e_hostname, eep->e_path, 0);
 
56
                if (!exp)
 
57
                        export_create(eep, 0);
 
58
                else
 
59
                        warn_duplicated_exports(exp, eep);
57
60
        }
58
61
        endexportent();
59
 
 
60
62
        return 0;
61
63
}
62
64