2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Fix printing of TSID in "sudoreplay -l"

This commit is contained in:
Todd C. Miller
2012-04-06 16:34:43 -04:00
parent c8ce3a0a85
commit ce8fd0ea39

View File

@@ -229,7 +229,7 @@ static int parse_timing(const char *buf, const char *decimal, int *idx, double *
(s)[5] == '/' && \
isalnum((unsigned char)(s)[6]) && isalnum((unsigned char)(s)[7]) && \
(s)[8] == '/' && (s)[9] == 'l' && (s)[10] == 'o' && (s)[11] == 'g' && \
(s)[9] == '\0')
(s)[12] == '\0')
int
main(int argc, char *argv[])
@@ -753,12 +753,12 @@ list_session(char *logfile, REGEX_T *re, const char *user, const char *tty)
/* Convert from /var/log/sudo-sessions/00/00/01/log to 000001 */
cp = logfile + strlen(session_dir) + 1;
if (IS_IDLOG(cp)) {
idbuf[0] = cp[7];
idbuf[1] = cp[6];
idbuf[2] = cp[4];
idbuf[3] = cp[3];
idbuf[4] = cp[1];
idbuf[5] = cp[0];
idbuf[0] = cp[0];
idbuf[1] = cp[1];
idbuf[2] = cp[3];
idbuf[3] = cp[4];
idbuf[4] = cp[6];
idbuf[5] = cp[7];
idbuf[6] = '\0';
idstr = idbuf;
} else {