~ubuntu-branches/ubuntu/karmic/checkpolicy/karmic

« back to all changes in this revision

Viewing changes to parse_util.c

  • Committer: Bazaar Package Importer
  • Author(s): Caleb Case, Caleb Case, Joseph Jackson IV
  • Date: 2008-02-09 21:34:46 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20080209213446-hqazy6s0r3lpdekc
Tags: 2.0.9-0ubuntu1
[ Caleb Case ]
* New upstream SVN HEAD.
 + Added support for policy capabilities from Todd Miller.
 + Initialize the source file name from the command line argument so
   that checkpolicy/checkmodule report something more useful than
   "unknown source".
 + Merged remove use of REJECT and trailing context in lex rules; make
   ipv4 address parsing like ipv6 from James Carter.
 + Merged handle unknown policydb flag support from Eric Paris.
   Adds new command line options -U {allow, reject, deny} for selecting
   the flag when a base module or kernel policy is built.
 + Merged fix for segfault on duplicate require of sensitivity from
   Caleb Case.
 + Merged fix for dead URLs in checkpolicy man pages from Dan Walsh.

[ Joseph Jackson IV ]
* debian/control
  - Update Debian Maintainer field

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
extern queue_t id_queue;
30
30
extern unsigned int policydb_errors;
31
31
extern unsigned long policydb_lineno;
32
 
extern char source_file[];
33
32
extern policydb_t *policydbp;
34
33
extern int mlspol;
 
34
extern void set_source_file(const char *name);
35
35
 
36
36
int read_source_policy(policydb_t * p, const char *file, const char *progname)
37
37
{
40
40
                fprintf(stderr, "%s:  unable to open %s\n", progname, file);
41
41
                return -1;
42
42
        }
 
43
        set_source_file(file);
43
44
 
44
45
        if ((id_queue = queue_create()) == NULL) {
45
46
                fprintf(stderr, "%s: out of memory!\n", progname);
58
59
        }
59
60
        rewind(yyin);
60
61
        init_parser(2);
61
 
        source_file[0] = '\0';
 
62
        set_source_file(file);
62
63
        yyrestart(yyin);
63
64
        if (yyparse() || policydb_errors) {
64
65
                fprintf(stderr,