X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fgnome-ask-password-agent.vala;h=c31c07e3db0de0f21f4963f543698a0a0cb1f651;hp=46813683afb7edcf12e3d7be1de91059a604830d;hb=576a01c873a79e9183292d434ec0b18af8cd36cf;hpb=202df05e0f01d79177dfeee6acf1748089f484a8 diff --git a/src/gnome-ask-password-agent.vala b/src/gnome-ask-password-agent.vala index 46813683a..c31c07e3d 100644 --- a/src/gnome-ask-password-agent.vala +++ b/src/gnome-ask-password-agent.vala @@ -91,7 +91,7 @@ public class MyStatusIcon : StatusIcon { GLib.Object(icon_name : "dialog-password"); set_title("System Password Request"); - directory = File.new_for_path("/var/run/systemd/ask-password/"); + directory = File.new_for_path("/run/systemd/ask-password/"); file_monitor = directory.monitor_directory(0); file_monitor.changed.connect(file_monitor_changed); @@ -165,7 +165,7 @@ public class MyStatusIcon : StatusIcon { if (not_after_as_string.scanf("%llu", out not_after) != 1) return false; - if (not_after < now) + if (not_after > 0 && not_after < now) return false; socket = key_file.get_string("Ask", "Socket"); @@ -239,10 +239,10 @@ public class MyStatusIcon : StatusIcon { null); OutputStream stream = new UnixOutputStream(to_process, true); -#if VALA_0_10 - stream.write(password, password.length, null); -#else +#if VALA_0_12 stream.write(password.data, null); +#else + stream.write(password, password.length, null); #endif } catch (Error e) { show_error(e.message);