Diff for /embedaddon/sudo/plugins/sudoers/iolog_path.c between versions 1.1.1.4 and 1.1.1.6

version 1.1.1.4, 2013/07/22 10:46:12 version 1.1.1.6, 2014/06/15 16:12:54
Line 194  expand_iolog_path(const char *prefix, const char *dir, Line 194  expand_iolog_path(const char *prefix, const char *dir,
             break;              break;
         case 1:          case 1:
             /* Trim trailing slashes from dir component. */              /* Trim trailing slashes from dir component. */
            while (dst - path - 1 > prelen && dst[-1] == '/')            while (dst > path + prelen + 1 && dst[-1] == '/')
                 dst--;                  dst--;
             /* The NUL will be replaced with a '/' at the end. */              /* The NUL will be replaced with a '/' at the end. */
             if (dst + 1 >= pathend)              if (dst + 1 >= pathend)
Line 250  expand_iolog_path(const char *prefix, const char *dir, Line 250  expand_iolog_path(const char *prefix, const char *dir,
             struct tm *timeptr;              struct tm *timeptr;
   
             time(&now);              time(&now);
            timeptr = localtime(&now);            if ((timeptr = localtime(&now)) == NULL)
                 goto bad;
   
             /* Use sudoers locale for strftime() */              /* Use sudoers locale for strftime() */
             sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, &oldlocale);              sudoers_setlocale(SUDOERS_LOCALE_SUDOERS, &oldlocale);
   
            /* We only calls strftime() on the current part of the buffer. */            /* We only call strftime() on the current part of the buffer. */
             tmpbuf[sizeof(tmpbuf) - 1] = '\0';              tmpbuf[sizeof(tmpbuf) - 1] = '\0';
             len = strftime(tmpbuf, sizeof(tmpbuf), dst0, timeptr);              len = strftime(tmpbuf, sizeof(tmpbuf), dst0, timeptr);
   

Removed from v.1.1.1.4  
changed lines
  Added in v.1.1.1.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>