ID= -> TSID= for transcript ID

This commit is contained in:
Todd C. Miller
2009-09-07 14:18:06 +00:00
parent 95c41c8973
commit 0040571c97

View File

@@ -658,7 +658,7 @@ get_timestr()
#define LL_GROUP_STR "GROUP="
#define LL_ENV_STR "ENV="
#define LL_CMND_STR "COMMAND="
#define LL_ID_STR "ID="
#define LL_TSID_STR "TSID="
/*
* Allocate and fill in a new logline.
@@ -689,7 +689,7 @@ new_logline(message, serrno)
if (runas_gr != NULL)
len += sizeof(LL_GROUP_STR) + 2 + strlen(runas_gr->gr_name);
if (sudo_user.sessid[0] != '\0')
len += sizeof(LL_ID_STR) + 2 + strlen(sudo_user.sessid);
len += sizeof(LL_TSID_STR) + 2 + strlen(sudo_user.sessid);
if (sudo_user.env_vars != NULL) {
size_t evlen = 0;
struct list_member *cur;
@@ -744,7 +744,7 @@ new_logline(message, serrno)
goto toobig;
}
if (sudo_user.sessid[0] != '\0') {
if (strlcat(line, LL_ID_STR, len) >= len ||
if (strlcat(line, LL_TSID_STR, len) >= len ||
strlcat(line, sudo_user.sessid, len) >= len ||
strlcat(line, " ; ", len) >= len)
goto toobig;