From bce2c38942b5667f1019ef27b201531867edb2a1 Mon Sep 17 00:00:00 2001 From: David Zeuthen Date: Mon, 14 Sep 2009 12:06:37 -0400 Subject: Clarify comment on where to find process start-time on Linux Also handle 64-bit jiffies (rather than 63-bit) for maximum correctness. --- src/polkit/polkitunixprocess.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/polkit/polkitunixprocess.c b/src/polkit/polkitunixprocess.c index f8e6fd9..c690077 100644 --- a/src/polkit/polkitunixprocess.c +++ b/src/polkit/polkitunixprocess.c @@ -495,7 +495,7 @@ get_start_time_for_pid (pid_t pid, if (!g_file_get_contents (filename, &contents, &length, error)) goto out; - /* start time is the 19th token after the '(process name)' entry - since only this + /* start time is the token at index 19 after the '(process name)' entry - since only this * field can contain the ')' character, search backwards for this to avoid malicious * processes trying to fool us */ @@ -534,7 +534,7 @@ get_start_time_for_pid (pid_t pid, goto out; } - start_time = strtoll (tokens[19], &endp, 10); + start_time = strtoull (tokens[19], &endp, 10); if (endp == tokens[19]) { g_set_error (error, -- cgit v1.2.1