PolicyKit: Branch 'master'

David Zeuthen david at kemper.freedesktop.org
Mon Sep 14 09:11:01 PDT 2009


 src/polkit/polkitunixprocess.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bce2c38942b5667f1019ef27b201531867edb2a1
Author: David Zeuthen <davidz at redhat.com>
Date:   Mon Sep 14 12:06:37 2009 -0400

    Clarify comment on where to find process start-time on Linux
    
    Also handle 64-bit jiffies (rather than 63-bit) for maximum
    correctness.

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,


More information about the hal-commit mailing list