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

Diff for /src/usr.bin/dc/dc.c between version 1.13 and 1.14

version 1.13, 2014/11/26 18:34:51 version 1.14, 2015/10/03 18:39:13
Line 47 
Line 47 
         char            *buf, *p;          char            *buf, *p;
         struct stat     st;          struct stat     st;
   
           if (tame("stdio rpath", NULL) == -1)
                   err(1, "tame");
   
         if ((buf = strdup("")) == NULL)          if ((buf = strdup("")) == NULL)
                 err(1, NULL);                  err(1, NULL);
Line 89 
Line 91 
                 file = fopen(argv[0], "r");                  file = fopen(argv[0], "r");
                 if (file == NULL)                  if (file == NULL)
                         err(1, "cannot open file %s", argv[0]);                          err(1, "cannot open file %s", argv[0]);
                   if (tame("stdio", NULL) == -1)
                           err(1, "tame");
                 if (fstat(fileno(file), &st) == -1)                  if (fstat(fileno(file), &st) == -1)
                         err(1, "%s", argv[0]);                          err(1, "%s", argv[0]);
                 if (S_ISDIR(st.st_mode))                  if (S_ISDIR(st.st_mode))
Line 103 
Line 107 
                  */                   */
                  return (0);                   return (0);
         }          }
           if (tame("stdio", NULL) == -1)
                   err(1, "tame");
         src_setstream(&src, stdin);          src_setstream(&src, stdin);
         reset_bmachine(&src);          reset_bmachine(&src);
         eval();          eval();

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14