[BACK]Return to mandocdb.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / mandoc

Diff for /src/usr.bin/mandoc/mandocdb.c between version 1.154 and 1.155

version 1.154, 2015/10/12 21:16:32 version 1.155, 2015/10/12 22:30:27
Line 338 
Line 338 
         size_t            j, sz;          size_t            j, sz;
         int               ch, i;          int               ch, i;
   
           if (pledge("stdio rpath wpath cpath fattr proc exec", NULL) == -1) {
                   perror("pledge");
                   return (int)MANDOCLEVEL_SYSERR;
           }
   
         memset(&conf, 0, sizeof(conf));          memset(&conf, 0, sizeof(conf));
         memset(stmts, 0, STMT__MAX * sizeof(sqlite3_stmt *));          memset(stmts, 0, STMT__MAX * sizeof(sqlite3_stmt *));
   
Line 419 
Line 424 
         argc -= optind;          argc -= optind;
         argv += optind;          argv += optind;
   
           if (nodb && pledge("stdio rpath", NULL) == -1) {
                   perror("pledge");
                   return (int)MANDOCLEVEL_SYSERR;
           }
   
         if (OP_CONFFILE == op && argc > 0) {          if (OP_CONFFILE == op && argc > 0) {
                 warnx("-C: Too many arguments");                  warnx("-C: Too many arguments");
                 goto usage;                  goto usage;
Line 445 
Line 455 
                          * The existing database is usable.  Process                           * The existing database is usable.  Process
                          * all files specified on the command-line.                           * all files specified on the command-line.
                          */                           */
                           if (!nodb && pledge("stdio rpath wpath cpath fattr",
                               NULL) == -1) {
                                   perror("pledge");
                                   exitcode = (int)MANDOCLEVEL_SYSERR;
                                   goto out;
                           }
                         use_all = 1;                          use_all = 1;
                         for (i = 0; i < argc; i++)                          for (i = 0; i < argc; i++)
                                 filescan(argv[i]);                                  filescan(argv[i]);

Legend:
Removed from v.1.154  
changed lines
  Added in v.1.155