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

Diff for /src/usr.bin/mesg/mesg.c between version 1.12 and 1.13

version 1.12, 2016/07/07 09:26:26 version 1.13, 2018/08/03 06:57:34
Line 52 
Line 52 
         char *tty;          char *tty;
         int ch;          int ch;
   
         if (pledge("stdio rpath fattr", NULL) == -1)  
                 err(2, "pledge");  
   
         while ((ch = getopt(argc, argv, "")) != -1)          while ((ch = getopt(argc, argv, "")) != -1)
                 switch (ch) {                  switch (ch) {
                 case '?':                  case '?':
Line 66 
Line 63 
   
         if ((tty = ttyname(STDERR_FILENO)) == NULL)          if ((tty = ttyname(STDERR_FILENO)) == NULL)
                 err(2, "ttyname");                  err(2, "ttyname");
   
           if (unveil(tty, "rw") == -1)
                   err(1, "unveil");
           if (pledge("stdio rpath fattr", NULL) == -1)
                   err(1, "unveil");
   
         if (stat(tty, &sb) < 0)          if (stat(tty, &sb) < 0)
                 err(2, "%s", tty);                  err(2, "%s", tty);
   

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