diff --git a/procps-v3.3.3-w-notruncate.diff b/procps-v3.3.3-w-notruncate.diff index 987e212..ed14c3d 100644 --- a/procps-v3.3.3-w-notruncate.diff +++ b/procps-v3.3.3-w-notruncate.diff @@ -16,9 +16,9 @@ - printf("%-*.*s%-9.8s", userlen + 1, userlen, uname, u->ut_line); + int utlnlen = 8; + if (formtype > 1) { -+ userlen = UT_NAMESIZE; -+ fromlen = UT_HOSTSIZE; -+ utlnlen = UT_LINESIZE; ++ userlen = strnlen(uname, UT_NAMESIZE); ++ fromlen = strnlen(u->ut_host, UT_HOSTSIZE); ++ utlnlen = strnlen(u->ut_line, UT_LINESIZE); + } + printf("%-*.*s%-*.*s", userlen + 1, userlen, uname, utlnlen + 1, utlnlen, u->ut_line); if (from) diff --git a/procps.changes b/procps.changes index 2452c32..8a9208b 100644 --- a/procps.changes +++ b/procps.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Jun 6 11:17:37 UTC 2012 - werner@suse.de + +- Make our w-notruncate patch file lines dynamically that is use + the string and not the umtp field lengths + ------------------------------------------------------------------- Wed Jun 6 10:35:41 UTC 2012 - werner@suse.de